mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-02-21 07:42:08 +00:00
Remove HTML-safe encoding from URL if any
This commit is contained in:
parent
203a147fad
commit
0222eb175b
3
twoot.py
3
twoot.py
|
@ -221,7 +221,8 @@ def main(argv):
|
|||
# Matches the first instance of either twitter:image or twitter:image:src meta tag
|
||||
match = re.search(r'<meta name="twitter:image(?:|:src)" content="(.+?)".*?>', r.text)
|
||||
if match is not None:
|
||||
photos.append(match.group(1))
|
||||
url = match.group(1).replace('&', '&') # Remove HTML-safe encoding from URL if any
|
||||
photos.append(url)
|
||||
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout):
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user