[deviantart] disable JWT updates (#4548, #4563)

back to lowres images ...
This commit is contained in:
Mike Fährmann
2023-09-22 16:57:28 +02:00
parent 8064663bda
commit 9d8317d963
2 changed files with 16 additions and 1 deletions

View File

@@ -1349,6 +1349,20 @@ Description
* ``"none"``: Don't download textual content.
extractor.deviantart.jwt
------------------------
Type
``bool``
Default
``false``
Description
Update `JSON Web Tokens <https://jwt.io/>`__ (the ``token`` URL parameter)
of otherwise non-downloadable, low-resolution images
to be able to download them in full resolution.
Note: This got patched by DeviantArt on 2023-09-19 and no longer works.
extractor.deviantart.mature
---------------------------
Type

View File

@@ -42,6 +42,7 @@ class DeviantartExtractor(Extractor):
self.offset = 0
def _init(self):
self.jwt = self.config("jwt", False)
self.flat = self.config("flat", True)
self.extra = self.config("extra", False)
self.original = self.config("original", True)
@@ -122,7 +123,7 @@ class DeviantartExtractor(Extractor):
if self.original and deviation["is_downloadable"]:
self._update_content(deviation, content)
else:
elif self.jwt:
self._update_token(deviation, content)
yield self.commit(deviation, content)