Added tolerance for encoding exception

This commit is contained in:
JC Francois 2019-10-19 09:50:29 +02:00
parent 37970200c0
commit 7cac6bb6c0

View File

@ -222,7 +222,7 @@ def main(argv):
match = re.search(r'<meta name="twitter:image(?:|:src)" content="(.+?)".*?>', r.text)
if match is not None:
photos.append(match.group(1))
except ConnectionError:
except (ConnectionError, requests.exceptions.ContentDecodingError):
pass
# Add dictionary with content of tweet to list