diff options
| author | 2020-05-03 00:06:40 -0400 | |
|---|---|---|
| committer | 2020-05-03 00:06:40 -0400 | |
| commit | 90e50db2e3c38f523bb5195d295290b06e5cedb0 (patch) | |
| tree | 4759dc0faea79f83fa5074e2d0bd82b18a9caaea /gallery_dl/extractor/newgrounds.py | |
| parent | d5b96ce44b7809f5ae01e3e9d70a1d58fe21ccf5 (diff) | |
New upstream version 1.13.6upstream/1.13.6
Diffstat (limited to 'gallery_dl/extractor/newgrounds.py')
| -rw-r--r-- | gallery_dl/extractor/newgrounds.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gallery_dl/extractor/newgrounds.py b/gallery_dl/extractor/newgrounds.py index bb87a69..17fe935 100644 --- a/gallery_dl/extractor/newgrounds.py +++ b/gallery_dl/extractor/newgrounds.py @@ -288,7 +288,7 @@ class NewgroundsMediaExtractor(NewgroundsExtractor): class NewgroundsArtExtractor(NewgroundsExtractor): """Extractor for all images of a newgrounds user""" subcategory = "art" - pattern = r"(?:https?://)?([^.]+)\.newgrounds\.com/art/?$" + pattern = r"(?:https?://)?([\w-]+)\.newgrounds\.com/art/?$" test = ("https://tomfulp.newgrounds.com/art", { "pattern": NewgroundsImageExtractor.pattern, "count": ">= 3", @@ -298,7 +298,7 @@ class NewgroundsArtExtractor(NewgroundsExtractor): class NewgroundsAudioExtractor(NewgroundsExtractor): """Extractor for all audio submissions of a newgrounds user""" subcategory = "audio" - pattern = r"(?:https?://)?([^.]+)\.newgrounds\.com/audio/?$" + pattern = r"(?:https?://)?([\w-]+)\.newgrounds\.com/audio/?$" test = ("https://tomfulp.newgrounds.com/audio", { "pattern": r"https://audio.ngfiles.com/\d+/\d+_.+\.mp3", "count": ">= 4", @@ -308,7 +308,7 @@ class NewgroundsAudioExtractor(NewgroundsExtractor): class NewgroundsMoviesExtractor(NewgroundsExtractor): """Extractor for all movies of a newgrounds user""" subcategory = "movies" - pattern = r"(?:https?://)?([^.]+)\.newgrounds\.com/movies/?$" + pattern = r"(?:https?://)?([\w-]+)\.newgrounds\.com/movies/?$" test = ("https://tomfulp.newgrounds.com/movies", { "pattern": r"https://uploads.ungrounded.net(/alternate)?/\d+/\d+_.+", "range": "1-10", @@ -319,7 +319,7 @@ class NewgroundsMoviesExtractor(NewgroundsExtractor): class NewgroundsUserExtractor(NewgroundsExtractor): """Extractor for a newgrounds user profile""" subcategory = "user" - pattern = r"(?:https?://)?([^.]+)\.newgrounds\.com/?$" + pattern = r"(?:https?://)?([\w-]+)\.newgrounds\.com/?$" test = ( ("https://tomfulp.newgrounds.com", { "pattern": "https://tomfulp.newgrounds.com/art$", @@ -414,6 +414,6 @@ class NewgroundsFollowingExtractor(NewgroundsFavoriteExtractor): @staticmethod def _extract_favorites(page): return [ - "https://" + user.rpartition('"')[2] + "https://" + user.rpartition('"')[2].lstrip("/:") for user in text.extract_iter(page, 'class="item-user', '"><img') ] |
