[newgrounds] add 'games' extractor (#2955)

pull/2979/head
Mike Fährmann 2 years ago
parent 68f11e02a9
commit 0393e59535
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1749,7 +1749,7 @@ Description
when processing a user profile.
Possible values are
``"art"``, ``"audio"``, ``"movies"``.
``"art"``, ``"audio"``, ``"games"``, ``"movies"``.
You can use ``"all"`` instead of listing all values separately.

@ -538,7 +538,7 @@ Consider all sites to be NSFW unless otherwise known.
<tr>
<td>Newgrounds</td>
<td>https://www.newgrounds.com/</td>
<td>Art, Audio, Favorites, individual Images, Media Files, Movies, Search Results, User Profiles</td>
<td>Art, Audio, Favorites, Games, individual Images, Media Files, Movies, Search Results, User Profiles</td>
<td>Supported</td>
</tr>
<tr>

@ -434,6 +434,17 @@ class NewgroundsMoviesExtractor(NewgroundsExtractor):
})
class NewgroundsGamesExtractor(NewgroundsExtractor):
"""Extractor for a newgrounds user's games"""
subcategory = _path = "games"
pattern = r"(?:https?://)?([\w-]+)\.newgrounds\.com/games/?$"
test = ("https://tomfulp.newgrounds.com/games", {
"pattern": r"https://uploads.ungrounded.net(/alternate)?/\d+/\d+_.+",
"range": "1-10",
"count": 10,
})
class NewgroundsUserExtractor(NewgroundsExtractor):
"""Extractor for a newgrounds user profile"""
subcategory = "user"
@ -454,6 +465,7 @@ class NewgroundsUserExtractor(NewgroundsExtractor):
return self._dispatch_extractors((
(NewgroundsArtExtractor , base + "art"),
(NewgroundsAudioExtractor , base + "audio"),
(NewgroundsGamesExtractor , base + "games"),
(NewgroundsMoviesExtractor, base + "movies"),
), ("art",))

Loading…
Cancel
Save