mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-12-18 00:00:17 +00:00
Fix bug in remove_link_redirections
This commit is contained in:
parent
b817d8942c
commit
92a60e2fad
2
twoot.py
2
twoot.py
|
@ -187,7 +187,7 @@ def deredir_url(url):
|
||||||
ret = None
|
ret = None
|
||||||
try:
|
try:
|
||||||
# Download the page
|
# Download the page
|
||||||
ret = requests.head(url, headers=headers, timeout=5)
|
ret = requests.head(url, headers=headers, allow_redirects=True, timeout=5)
|
||||||
except:
|
except:
|
||||||
# If anything goes wrong keep the URL intact
|
# If anything goes wrong keep the URL intact
|
||||||
return url
|
return url
|
||||||
|
|
Loading…
Reference in New Issue
Block a user