crawler: make AutoUA match http(s) type

master
pictuga 2020-04-05 16:07:51 +02:00
parent d20f6237bd
commit bf86c1e962
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ class UAHandler(BaseHandler):
class AutoRefererHandler(BaseHandler): class AutoRefererHandler(BaseHandler):
def http_request(self, req): def http_request(self, req):
req.add_unredirected_header('Referer', 'http://%s' % req.host) req.add_unredirected_header('Referer', '%s://%s' % (req.type, req.host))
return req return req
https_request = http_request https_request = http_request