[deviantart] match '/gallery/recommended-for-you' URLs (#7168)

This commit is contained in:
Mike Fährmann
2025-03-17 09:49:11 +01:00
parent 8bdd543935
commit 6532cf9075
2 changed files with 9 additions and 4 deletions

View File

@@ -891,7 +891,8 @@ class DeviantartGalleryExtractor(DeviantartExtractor):
"""Extractor for all deviations from an artist's gallery"""
subcategory = "gallery"
archive_fmt = "g_{_username}_{index}.{extension}"
pattern = BASE_PATTERN + r"/gallery(?:/all|/?\?catpath=)?/?$"
pattern = (BASE_PATTERN + r"/gallery"
r"(?:/all|/recommended-for-you|/?\?catpath=)?/?$")
example = "https://www.deviantart.com/USER/gallery/"
def deviations(self):

View File

@@ -53,7 +53,6 @@ __tests__ = (
"userid" : "9AE51FC7-0278-806C-3FFF-F4961ABF9E2B",
"username": "shimoda7",
},
"category_path" : str,
"content" : {
"filesize" : int,
"height" : int,
@@ -149,7 +148,7 @@ __tests__ = (
"folders" : 1,
"original": 0,
},
"#count" : 3,
"#count" : 10,
"description": str,
"folders" : list,
@@ -177,6 +176,12 @@ __tests__ = (
"#class" : deviantart.DeviantartGalleryExtractor,
},
{
"#url" : "https://www.deviantart.com/shimoda7/gallery/recommended-for-you",
"#category": ("", "deviantart", "gallery"),
"#class" : deviantart.DeviantartGalleryExtractor,
},
{
"#url" : "https://www.deviantart.com/shimoda7/gallery/?catpath=/",
"#category": ("", "deviantart", "gallery"),
@@ -273,7 +278,6 @@ __tests__ = (
"userid" : "1A12BA26-33C2-AA0A-7678-0B6DFBA7AC8E",
"username": "gdldev"
},
"category_path" : "",
"content" : {
"filename" : "banner_by_gdldev_dgntyqc.png",
"filesize" : 84510,