mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-02-21 07:42:08 +00:00
Added tolerance for encoding exception
This commit is contained in:
parent
37970200c0
commit
7cac6bb6c0
2
twoot.py
2
twoot.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user