[deviantart] improve 'index' extraction for stash files (#5335)

pull/5372/head
Mike Fährmann 6 months ago
parent 1d6260f456
commit a650fd3177
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -213,7 +213,9 @@ class DeviantartExtractor(Extractor):
"""Adjust the contents of a Deviation-object"""
if "index" not in deviation:
try:
if deviation["url"].startswith("https://sta.sh"):
if deviation["url"].startswith((
"https://www.deviantart.com/stash/", "https://sta.sh",
)):
filename = deviation["content"]["src"].split("/")[5]
deviation["index_base36"] = filename.partition("-")[0][1:]
deviation["index"] = id_from_base36(

Loading…
Cancel
Save