From bf86c1e9625cfb1273b67371bbc0f69265f93b19 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 5 Apr 2020 16:07:51 +0200 Subject: [PATCH] crawler: make AutoUA match http(s) type --- morss/crawler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/crawler.py b/morss/crawler.py index d401382..ad4315d 100644 --- a/morss/crawler.py +++ b/morss/crawler.py @@ -197,7 +197,7 @@ class UAHandler(BaseHandler): class AutoRefererHandler(BaseHandler): 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 https_request = http_request