mirror of
https://git.sr.ht/~cadence/NewLeaf
synced 2024-12-22 13:06:59 +00:00
Remove "unknown download error" prefix
The reason for the error is known and is returned.
This commit is contained in:
parent
7737ea3ba5
commit
e3595a455e
@ -184,8 +184,13 @@ def extract_video(id):
|
||||
"error": "Received unexpected status code {}.".format(e.exc_info[1].code)
|
||||
}
|
||||
else:
|
||||
if e.exc_info and e.exc_info[1]:
|
||||
message = str(e.exc_info[1])
|
||||
message = message.replace("Video unavailable\n", "") # Remove redundant lead string, if present
|
||||
else:
|
||||
message = "Unknown extraction error."
|
||||
result = {
|
||||
"error": "Unknown download error: {}".format(e.exc_info[1])
|
||||
"error": message
|
||||
}
|
||||
|
||||
except Exception:
|
||||
|
Loading…
Reference in New Issue
Block a user