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:
parent
75fa1a5553
commit
fbebc58189
@ -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
|
||||
|
@ -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+/.*",
|
||||
|
Loading…
x
Reference in New Issue
Block a user