summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/newgrounds.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2020-06-01 23:11:37 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2020-06-01 23:11:37 -0400
commita70a3246927b72f1ded37acd55ee719515441b5b (patch)
tree57f0d3ab0b1387b665325f42a24b8aab63cbce07 /gallery_dl/extractor/newgrounds.py
parent90e50db2e3c38f523bb5195d295290b06e5cedb0 (diff)
New upstream version 1.14.0.upstream/1.14.0
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')
]