mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-23 20:11:11 +00:00
modified get request in deredir_url()
This commit is contained in:
parent
e11102f4a6
commit
9625c2128b
3
twoot.py
3
twoot.py
|
@ -86,7 +86,7 @@ def deredir_url(url):
|
|||
ret = None
|
||||
try:
|
||||
# Download the page
|
||||
ret = requests.get(url, timeout=5)
|
||||
ret = requests.get(url, headers=headers, timeout=5)
|
||||
except:
|
||||
# If anything goes wrong keep the URL intact
|
||||
return url
|
||||
|
@ -97,6 +97,7 @@ def deredir_url(url):
|
|||
# Return the URL that the page was downloaded from
|
||||
return ret.url
|
||||
|
||||
|
||||
def _remove_trackers_query(query_str):
|
||||
"""
|
||||
private function
|
||||
|
|
Loading…
Reference in New Issue
Block a user