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