Skip to content

Commit

Permalink
[deviantart] get original files for GIF previews (#1731)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jul 29, 2021
1 parent 7a0da4f commit 220cfe2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions gallery_dl/extractor/deviantart.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-"):
Expand Down Expand Up @@ -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)),
Expand Down

0 comments on commit 220cfe2

Please sign in to comment.