Skip to content

Commit

Permalink
[newgrounds] fix using 'category-tranfer' (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jul 29, 2021
1 parent 4e95cef commit 223a4e7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions gallery_dl/extractor/newgrounds.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -33,7 +33,6 @@ def __init__(self, match):

def items(self):
self.login()
yield Message.Version, 1

for post_url in self.posts():
try:
Expand All @@ -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()
Expand Down Expand Up @@ -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,
Expand All @@ -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",
Expand All @@ -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+_.+",
Expand Down

0 comments on commit 223a4e7

Please sign in to comment.