#python# error:illegal multibyte sequence

读取html遇到illegal multibyte sequence

1.第一种情况:更换编码方式

查看网页源码,找到charset,得到该网页编码方式

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

2.第二种情况:尽管更换了编码方式依然报错

将gb2312更换为gb18030

posted @ 2019-08-16 18:50  rfrf  阅读(1660)  评论(0编辑  收藏  举报