[deviantart] fix KeyError: 'premium_folder_data' (#5063)
This commit is contained in:
@@ -452,9 +452,11 @@ class DeviantartExtractor(Extractor):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
dev = self.api.deviation(deviation["deviationid"], False)
|
dev = self.api.deviation(deviation["deviationid"], False)
|
||||||
folder = dev["premium_folder_data"]
|
folder = deviation["premium_folder_data"]
|
||||||
username = dev["author"]["username"]
|
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 \
|
if not has_access and folder["type"] == "watchers" and \
|
||||||
self.config("auto-watch"):
|
self.config("auto-watch"):
|
||||||
|
|||||||
Reference in New Issue
Block a user