Skip to content

Commit

Permalink
[deviantart] handle decode errors for extended_fetch results (#655)
Browse files Browse the repository at this point in the history
This isn't going to solve the underlying problem, but it should at
least provide the server response when those errors happen.
  • Loading branch information
mikf committed Mar 24, 2020
1 parent 88ebbad commit 1b82d36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gallery_dl/extractor/deviantart.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,10 @@ def deviation_extended_fetch(self, deviation_id, user, kind):
if response.status_code == 404:
raise exception.StopExtraction(
"Your account must use the Eclipse interface.")
return response.json()
try:
return response.json()
except Exception:
return {"error": response.text}

def deviation_metadata(self, deviations):
""" Fetch deviation metadata for a set of deviations"""
Expand Down

0 comments on commit 1b82d36

Please sign in to comment.