1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 12:12:34 +01:00

[deviantart:stash] recognize 'deviantart.com/stash/…' URLs

This commit is contained in:
Mike Fährmann 2024-03-15 18:14:55 +01:00
parent 76683c5f5c
commit 5716430c35
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 9 additions and 2 deletions

View File

@ -678,7 +678,8 @@ class DeviantartStashExtractor(DeviantartExtractor):
"""Extractor for sta.sh-ed deviations"""
subcategory = "stash"
archive_fmt = "{index}.{extension}"
pattern = r"(?:https?://)?sta\.sh/([a-z0-9]+)"
pattern = (r"(?:https?://)?(?:(?:www\.)?deviantart\.com/stash|sta\.sh)"
r"/([a-z0-9]+)")
example = "https://sta.sh/abcde"
skip = Extractor.skip

View File

@ -361,7 +361,7 @@ __tests__ = (
},
{
"#url" : "https://sta.sh/022c83odnaxc",
"#url" : "https://www.deviantart.com/stash/022c83odnaxc",
"#category": ("", "deviantart", "stash"),
"#class" : deviantart.DeviantartStashExtractor,
"#pattern" : r"https://wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/940f2d05-c5eb-4917-8192-7eb6a2d508c6/dcvdmbc-e506cdcf-3208-4c20-85ab-0bfa8a7bcb16.png\?token=ey.+",
@ -388,6 +388,12 @@ __tests__ = (
"url" : "https://www.deviantart.com/stash/022c83odnaxc",
},
{
"#url" : "https://sta.sh/022c83odnaxc",
"#category": ("", "deviantart", "stash"),
"#class" : deviantart.DeviantartStashExtractor,
},
{
"#url" : "https://sta.sh/21jf51j7pzl2",
"#comment" : "multiple stash items",