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

[deviantart] fix KeyError: 'premium_folder_data' (#5063)

This commit is contained in:
Mike Fährmann 2024-01-15 17:30:03 +01:00
parent 4cedf378d5
commit 90b382304a
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -452,9 +452,11 @@ class DeviantartExtractor(Extractor):
return None
dev = self.api.deviation(deviation["deviationid"], False)
folder = dev["premium_folder_data"]
folder = deviation["premium_folder_data"]
username = dev["author"]["username"]
has_access = folder["has_access"]
# premium_folder_data is no longer present when user has access (#5063)
has_access = ("premium_folder_data" not in dev) or folder["has_access"]
if not has_access and folder["type"] == "watchers" and \
self.config("auto-watch"):