From 67937a6313d7545f1abb61ead633f1a182560fdd Mon Sep 17 00:00:00 2001 From: Jing Ling Date: Thu, 23 Jan 2020 00:29:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E5=8A=A0=E5=85=BC=E5=AE=B9=E7=9A=84?= =?UTF-8?q?=E8=A7=A3=E7=A0=81=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oneforall/common/request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oneforall/common/request.py b/oneforall/common/request.py index c5ac7bf..ad49db3 100644 --- a/oneforall/common/request.py +++ b/oneforall/common/request.py @@ -92,9 +92,9 @@ async def fetch(session, url): proxy=config.get_proxy) as resp: try: - text = await resp.text(encoding='gb2312') # 先尝试用fb2312解码 + text = await resp.text(encoding='gb18030') # 先尝试用gb18030解码 except UnicodeDecodeError: - text = await resp.text(errors='ignore') + text = await resp.text(encoding='utf-8', errors='ignore') return resp, text except Exception as e: return e