mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +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:
parent
88ebbadc58
commit
1b82d36ab2
@ -1044,7 +1044,10 @@ class DeviantartAPI():
|
|||||||
if response.status_code == 404:
|
if response.status_code == 404:
|
||||||
raise exception.StopExtraction(
|
raise exception.StopExtraction(
|
||||||
"Your account must use the Eclipse interface.")
|
"Your account must use the Eclipse interface.")
|
||||||
|
try:
|
||||||
return response.json()
|
return response.json()
|
||||||
|
except Exception:
|
||||||
|
return {"error": response.text}
|
||||||
|
|
||||||
def deviation_metadata(self, deviations):
|
def deviation_metadata(self, deviations):
|
||||||
""" Fetch deviation metadata for a set of deviations"""
|
""" Fetch deviation metadata for a set of deviations"""
|
||||||
|
Loading…
Reference in New Issue
Block a user