1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[deviantart] handle decode errors for extended_fetch results (#655)

This isn't going to solve the underlying problem, but it should at
least provide the server response when those errors happen.
This commit is contained in:
Mike Fährmann 2020-03-24 20:49:54 +01:00
parent 88ebbadc58
commit 1b82d36ab2
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -1044,7 +1044,10 @@ class DeviantartAPI():
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"""