From 3e886caaaba79b7fa8fa600004739e4a5e3b8795 Mon Sep 17 00:00:00 2001 From: pictuga Date: Fri, 30 Oct 2020 22:41:16 +0100 Subject: [PATCH] crawler: drop encoding setting --- morss/crawler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morss/crawler.py b/morss/crawler.py index cbf5b92..164fa75 100644 --- a/morss/crawler.py +++ b/morss/crawler.py @@ -104,7 +104,7 @@ def adv_get(url, timeout=None, *args, **kwargs): } -def custom_handler(follow=None, delay=None, encoding=None): +def custom_handler(follow=None, delay=None): handlers = [] # as per urllib2 source code, these Handelers are added first @@ -123,7 +123,7 @@ def custom_handler(follow=None, delay=None, encoding=None): handlers.append(HTTPRefreshHandler()) handlers.append(UAHandler(random.choice(DEFAULT_UAS))) handlers.append(BrowserlyHeaderHandler()) - handlers.append(EncodingFixHandler(encoding)) + handlers.append(EncodingFixHandler()) if follow: handlers.append(AlternateHandler(MIMETYPE[follow]))