From 223a4e79cd066263999b2a503d0ee8bc5420be44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 29 Jul 2021 15:54:04 +0200 Subject: [PATCH] [newgrounds] fix using 'category-tranfer' (#1274) --- gallery_dl/extractor/newgrounds.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gallery_dl/extractor/newgrounds.py b/gallery_dl/extractor/newgrounds.py index 4fdfac9968..377ca9b36a 100644 --- a/gallery_dl/extractor/newgrounds.py +++ b/gallery_dl/extractor/newgrounds.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2018-2020 Mike Fährmann +# Copyright 2018-2021 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -33,7 +33,6 @@ def __init__(self, match): def items(self): self.login() - yield Message.Version, 1 for post_url in self.posts(): try: @@ -59,7 +58,7 @@ def items(self): def posts(self): """Return urls of all relevant image pages""" - return self._pagination(self.subcategory) + return self._pagination(self._path) def login(self): username, password = self._get_auth_info() @@ -336,7 +335,7 @@ def posts(self): class NewgroundsArtExtractor(NewgroundsExtractor): """Extractor for all images of a newgrounds user""" - subcategory = "art" + subcategory = _path = "art" pattern = r"(?:https?://)?([\w-]+)\.newgrounds\.com/art/?$" test = ("https://tomfulp.newgrounds.com/art", { "pattern": NewgroundsImageExtractor.pattern, @@ -346,7 +345,7 @@ class NewgroundsArtExtractor(NewgroundsExtractor): class NewgroundsAudioExtractor(NewgroundsExtractor): """Extractor for all audio submissions of a newgrounds user""" - subcategory = "audio" + subcategory = _path = "audio" pattern = r"(?:https?://)?([\w-]+)\.newgrounds\.com/audio/?$" test = ("https://tomfulp.newgrounds.com/audio", { "pattern": r"https://audio.ngfiles.com/\d+/\d+_.+\.mp3", @@ -356,7 +355,7 @@ class NewgroundsAudioExtractor(NewgroundsExtractor): class NewgroundsMoviesExtractor(NewgroundsExtractor): """Extractor for all movies of a newgrounds user""" - subcategory = "movies" + subcategory = _path = "movies" pattern = r"(?:https?://)?([\w-]+)\.newgrounds\.com/movies/?$" test = ("https://tomfulp.newgrounds.com/movies", { "pattern": r"https://uploads.ungrounded.net(/alternate)?/\d+/\d+_.+",