mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-02-12 03:18:14 +00:00
Add tolerance for TooManyRedirects in media search in linked page
This commit is contained in:
parent
bb226e54a9
commit
fdab0a0836
5
twoot.py
5
twoot.py
|
@ -227,7 +227,10 @@ def main(argv):
|
||||||
if match is not None:
|
if match is not None:
|
||||||
url = match.group(1).replace('&', '&') # Remove HTML-safe encoding from URL if any
|
url = match.group(1).replace('&', '&') # Remove HTML-safe encoding from URL if any
|
||||||
photos.append(url)
|
photos.append(url)
|
||||||
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout, requests.exceptions.ContentDecodingError):
|
except (requests.exceptions.ConnectionError,
|
||||||
|
requests.exceptions.Timeout,
|
||||||
|
requests.exceptions.ContentDecodingError,
|
||||||
|
requests.exceptions.TooManyRedirects):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Add dictionary with content of tweet to list
|
# Add dictionary with content of tweet to list
|
||||||
|
|
Loading…
Reference in New Issue
Block a user