use head for redirect
This commit is contained in:
parent
afbbc032ee
commit
a57727a1c7
@ -96,7 +96,7 @@ class MainHandler(tornado.web.RequestHandler):
|
|||||||
proxy = proxies.get(provider)
|
proxy = proxies.get(provider)
|
||||||
src = providers[provider] + self.request.uri
|
src = providers[provider] + self.request.uri
|
||||||
try:
|
try:
|
||||||
resp = requests.get(src)
|
resp = requests.head(src)
|
||||||
if resp is not None:
|
if resp is not None:
|
||||||
src = resp.url
|
src = resp.url
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user