diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index 9cbb21c2..a22417a8 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -699,7 +699,7 @@ class DeviantartStashExtractor(DeviantartExtractor): if uuid: deviation = self.api.deviation(uuid) deviation["index"] = text.parse_int(text.extr( - page, 'gmi-deviationid="', '"')) + page, '\\"deviationId\\":', ',')) yield deviation return diff --git a/test/results/deviantart.py b/test/results/deviantart.py index 2ffc485a..1bb5ecdd 100644 --- a/test/results/deviantart.py +++ b/test/results/deviantart.py @@ -364,9 +364,28 @@ __tests__ = ( "#url" : "https://sta.sh/022c83odnaxc", "#category": ("", "deviantart", "stash"), "#class" : deviantart.DeviantartStashExtractor, - "#pattern" : r"https://wixmp-[^.]+\.wixmp\.com/f/.+/.+\.png\?token=.+", + "#pattern" : r"https://wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/940f2d05-c5eb-4917-8192-7eb6a2d508c6/dcvdmbc-e506cdcf-3208-4c20-85ab-0bfa8a7bcb16.png\?token=ey.+", "#count" : 1, "#sha1_content": "057eb2f2861f6c8a96876b13cca1a4b7a408c11f", + + "content": { + "filename": "01_by_justatest235723_dcvdmbc.png", + "filesize": 380, + "width" : 128, + "height" : 128, + "src" : r"re:https://wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/940f2d05-c5eb-4917-8192-7eb6a2d508c6/dcvdmbc-e506cdcf-3208-4c20-85ab-0bfa8a7bcb16.png\?token=ey.+", + }, + "da_category" : "Uncategorized", + "date" : "dt:2018-12-26 14:49:27", + "deviationid" : "A4A6AD52-8857-46EE-ABFE-86D49D4FF9D0", + "download_filesize": 380, + "extension" : "png", + "filename" : "01_by_justatest235723-dcvdmbc", + "index" : 778297656, + "index_base36" : "cvdmbc", + "published_time": 1545835767, + "title" : "01", + "url" : "https://www.deviantart.com/stash/022c83odnaxc", }, {