Skip to content

Commit

Permalink
[deviantart] fix KeyError: 'premium_folder_data' (#5063)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jan 15, 2024
1 parent 4cedf37 commit 90b3823
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gallery_dl/extractor/deviantart.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,11 @@ def _fetch_premium(self, deviation):
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"):
Expand Down

0 comments on commit 90b3823

Please sign in to comment.