From dcfdb75a157644faa612d9e257f0aaf402d64eb4 Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 27 May 2020 21:34:43 +0200 Subject: [PATCH] crawler: fix chinese encoding support --- morss/crawler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/crawler.py b/morss/crawler.py index 101563e..ee485e7 100644 --- a/morss/crawler.py +++ b/morss/crawler.py @@ -221,7 +221,7 @@ class GZIPHandler(BaseHandler): def detect_encoding(data, resp=None): enc = detect_raw_encoding(data, resp) - if enc == 'gb2312': + if enc.lower() == 'gb2312': enc = 'gbk' return enc