mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-30 15:31:11 +00:00
Added tolerance for malformed URL in picture download
This commit is contained in:
parent
f635fb5eda
commit
a95006fae6
4
twoot.py
4
twoot.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user