Test requests.head for deredir()

This commit is contained in:
jeancf 2022-11-30 20:52:36 +01:00
parent 43d46a1b20
commit cf4d1d67c7

View File

@ -188,7 +188,7 @@ def deredir_url(url):
ret = None
try:
# Download the page
ret = requests.get(url, headers=headers, timeout=5)
ret = requests.head(url, headers=headers, timeout=5)
except:
# If anything goes wrong keep the URL intact
return url