From 2f542005d195ee3321ad0f6590173eacc0134517 Mon Sep 17 00:00:00 2001 From: pictuga Date: Tue, 3 Mar 2015 00:59:00 +0800 Subject: [PATCH] 2to3: urllib host --- morss/crawler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morss/crawler.py b/morss/crawler.py index 47893f9..794acbf 100644 --- a/morss/crawler.py +++ b/morss/crawler.py @@ -181,8 +181,8 @@ class UAHandler(BaseHandler): class AutoRefererHandler(BaseHandler): def http_request(self, req): - if req.get_host() != 'feeds.feedburner.com': - req.add_unredirected_header('Referer', 'http://%s' % req.get_host()) + if req.host != 'feeds.feedburner.com': + req.add_unredirected_header('Referer', 'http://%s' % req.host) return req https_request = http_request