summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/newgrounds.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/newgrounds.py')
-rw-r--r--gallery_dl/extractor/newgrounds.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/gallery_dl/extractor/newgrounds.py b/gallery_dl/extractor/newgrounds.py
index 17fe935..84794ad 100644
--- a/gallery_dl/extractor/newgrounds.py
+++ b/gallery_dl/extractor/newgrounds.py
@@ -224,10 +224,7 @@ class NewgroundsImageExtractor(NewgroundsExtractor):
self.post_url = "https://www.newgrounds.com/art/view/{}/{}".format(
self.user, match.group(3))
else:
- url = match.group(0)
- if not url.startswith("http"):
- url = "https://" + url
- self.post_url = url
+ self.post_url = text.ensure_http_scheme(match.group(0))
def posts(self):
return (self.post_url,)
@@ -414,6 +411,6 @@ class NewgroundsFollowingExtractor(NewgroundsFavoriteExtractor):
@staticmethod
def _extract_favorites(page):
return [
- "https://" + user.rpartition('"')[2].lstrip("/:")
+ text.ensure_http_scheme(user.rpartition('"')[2])
for user in text.extract_iter(page, 'class="item-user', '"><img')
]