From 220cfe244e2db27b4c15109217d598e56e717e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 30 Jul 2021 00:20:53 +0200 Subject: [PATCH] [deviantart] get original files for GIF previews (#1731) --- gallery_dl/extractor/deviantart.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index 163d7ba98e..900fde8cf1 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -95,8 +95,7 @@ def items(self): if "content" in deviation: content = deviation["content"] - if self.original and deviation["is_downloadable"] and \ - text.ext_from_url(content["src"]) != "gif": + if self.original and deviation["is_downloadable"]: self._update_content(deviation, content) if content["src"].startswith("https://images-wixmp-"): @@ -807,11 +806,20 @@ class DeviantartDeviationExtractor(DeviantartExtractor): (("https://www.deviantart.com/josephbiwald/art/Destiny-2-804940104"), { "pattern": r"https://images-wixmp-\w+\.wixmp\.com/.*,q_100," }), - # non-download URL for GIFs (#242) + # GIF (#242) (("https://www.deviantart.com/skatergators/art/COM-Moni-781571783"), { "pattern": (r"https://images-wixmp-\w+\.wixmp\.com" r"/f/[^/]+/[^.]+\.gif\?token="), }), + # Flash animation with GIF preview (#1731) + ("https://www.deviantart.com/yuumei/art/Flash-Comic-214724929", { + "pattern": r"https://api-da\.wixmp\.com/_api/download" + r"/file\?downloadToken=.+", + "keyword": { + "filename": "flash_comic_tutorial_by_yuumei-d3juatd", + "extension": "swf", + }, + }), # sta.sh URLs from description (#302) (("https://www.deviantart.com/uotapo/art/INANAKI-Memo-590297498"), { "options": (("extra", 1), ("original", 0)),