mirror of
https://gitlab.com/jeancf/twoot.git
synced 2025-02-17 13:58: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
|
ret = None
|
||||||
try:
|
try:
|
||||||
# Download the page
|
# Download the page
|
||||||
ret = requests.get(url, timeout=5)
|
ret = requests.get(url, headers=headers, timeout=5)
|
||||||
except:
|
except:
|
||||||
# If anything goes wrong keep the URL intact
|
# If anything goes wrong keep the URL intact
|
||||||
return url
|
return url
|
||||||
|
@ -97,6 +97,7 @@ def deredir_url(url):
|
||||||
# Return the URL that the page was downloaded from
|
# Return the URL that the page was downloaded from
|
||||||
return ret.url
|
return ret.url
|
||||||
|
|
||||||
|
|
||||||
def _remove_trackers_query(query_str):
|
def _remove_trackers_query(query_str):
|
||||||
"""
|
"""
|
||||||
private function
|
private function
|
||||||
|
|
Loading…
Reference in New Issue
Block a user