1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2025-01-31 19:51:34 +01:00

[deviantart] add 'intermediary' option (#4955)

This commit is contained in:
Mike Fährmann 2023-12-21 02:23:22 +01:00
parent 75fa1a5553
commit fbebc58189
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 13 additions and 1 deletions

View File

@ -1373,6 +1373,17 @@ Description
It is possible to use ``"all"`` instead of listing all values separately.
extractor.deviantart.intermediary
---------------------------------
Type
``bool``
Default
``true``
Description
For older non-downloadable images,
download a higher-quality ``/intermediary/`` version.
extractor.deviantart.journals
-----------------------------
Type

View File

@ -48,6 +48,7 @@ class DeviantartExtractor(Extractor):
self.quality = self.config("quality", "100")
self.original = self.config("original", True)
self.comments = self.config("comments", False)
self.intermediary = self.config("intermediary", True)
self.api = DeviantartOAuthAPI(self)
self.group = False
@ -136,7 +137,7 @@ class DeviantartExtractor(Extractor):
elif self.jwt:
self._update_token(deviation, content)
elif content["src"].startswith("https://images-wixmp-"):
if deviation["index"] <= 790677560:
if self.intermediary and deviation["index"] <= 790677560:
# https://github.com/r888888888/danbooru/issues/4069
intermediary, count = re.subn(
r"(/f/[^/]+/[^/]+)/v\d+/.*",