美文网首页
爬取时出现报错 encoding error : input c

爬取时出现报错 encoding error : input c

作者: 红石_ | 来源:发表于2018-05-14 12:41 被阅读0次

爬当当的时候遇到的encoding error : input conversion failed due to input error, bytes 0xAC 0x4E 0x00 0x00
原因是bs4解析dom时会读取html的<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
可能这时输入的已经是解码的字符串,而编码不一定对,可以删除这行或者直接给二进制字符串

相关文章

网友评论

      本文标题:爬取时出现报错 encoding error : input c

      本文链接:https://www.haomeiwen.com/subject/kyvddftx.html