1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00

[deviantart] force legacy version for single deviations

Let's see how long this works ...

DeviantArt is rolling out a new version of their website, including a
new internal and potentially usable API (rewrite incoming, yay).

The issue with the new layout is that it doesn't include the "old"
UUIDs for single deviations, i.e. mapping a numeric deviation ID to its
UUID counterpart is impossible with the new layout.
This commit is contained in:
Mike Fährmann 2019-06-20 19:18:37 +02:00
parent a01f99728c
commit 76ae9957c2
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -408,7 +408,12 @@ class DeviantartDeviationExtractor(DeviantartExtractor):
def deviations(self):
url = "{}/{}/{}".format(self.root, self.user, self.path)
response = self.request(url, expect=range(400, 500))
cookies = {"userinfo": (
'__167217c8e6aac1a3331f;{"username":"","uniqueid":"ab2e8b184471bf0'
'e3f8ed3ee7a3220aa","vd":"Bc7vEx,BdC7Fy,A,J,A,,B,A,B,BdC7Fy,BdC7XU'
',J,J,A,BdC7XU,13,A,B,A,,A,A,B,A,A,,A","attr":56}'
)}
response = self.request(url, cookies=cookies, expect=range(400, 500))
deviation_id = text.extract(response.text, '//deviation/', '"')[0]
if response.status_code >= 400 or not deviation_id:
raise exception.NotFoundError("image")