Added tolerance for malformed URL in picture download

This commit is contained in:
JC Francois 2020-04-09 18:17:13 +02:00
parent f635fb5eda
commit a95006fae6

View File

@ -409,10 +409,12 @@ def main(argv):
if match is not None:
url = match.group(1).replace('&', '&') # Remove HTML-safe encoding from URL if any
photos.append(url)
# Give up if anything goes wrong
except (requests.exceptions.ConnectionError,
requests.exceptions.Timeout,
requests.exceptions.ContentDecodingError,
requests.exceptions.TooManyRedirects):
requests.exceptions.TooManyRedirects,
requests.exceptions.MissingSchema):
pass
# Check if video was downloaded