忽略解码错误

This commit is contained in:
shmilylty
2019-08-28 17:59:48 +08:00
parent c8fb3a2faf
commit 372a2de406
+1 -1
View File
@@ -74,7 +74,7 @@ async def fetch(session, url, semaphore):
try:
text = await resp.text(encoding='gb2312') # 先尝试用fb2312解码
except UnicodeDecodeError:
text = await resp.text()
text = await resp.text(errors='ignore')
return resp, text