From 7eeb1d696c8f1a97fbb664266cb8d851ee68e4b0 Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 10 Nov 2021 23:25:03 +0100 Subject: [PATCH] crawler: clean up code --- morss/crawler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morss/crawler.py b/morss/crawler.py index 0aee646..5b9e38b 100644 --- a/morss/crawler.py +++ b/morss/crawler.py @@ -102,7 +102,7 @@ def adv_get(url, post=None, timeout=None, *args, **kwargs): encoding= detect_encoding(data, con) return { - 'data':data, + 'data': data, 'url': con.geturl(), 'con': con, 'contenttype': contenttype, @@ -428,7 +428,7 @@ class HTTPRefreshHandler(BaseHandler): https_response = http_response -def parse_headers(text=u'\n\''): +def parse_headers(text=u'\n\n'): if sys.version_info[0] >= 3: # python 3 return message_from_string(text)