Added tolerance for encoding exception

This commit is contained in:
JC Francois 2019-10-19 09:53:48 +02:00
parent 65b3065a75
commit 55f188b9f9

View File

@ -223,7 +223,7 @@ def main(argv):
if match is not None:
url = match.group(1).replace('&', '&') # Remove HTML-safe encoding from URL if any
photos.append(url)
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout):
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout, requests.exceptions.ContentDecodingError):
pass
# Add dictionary with content of tweet to list