From 7cac6bb6c08487ee60bc1ef12248e1eac3e04aff Mon Sep 17 00:00:00 2001 From: JC Francois Date: Sat, 19 Oct 2019 09:50:29 +0200 Subject: [PATCH] Added tolerance for encoding exception --- twoot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twoot.py b/twoot.py index be227e4..b2ea65b 100755 --- a/twoot.py +++ b/twoot.py @@ -222,7 +222,7 @@ def main(argv): match = re.search(r'', 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