python抓取网页后用decode解码,报错信息如下: UnicodeDecodeError:’gbk’ codec can’t decode byte 0xfb in position 1011: illegal multibyte sequence 推测是网页数据中有错误的字符无法解码,decode有参数errors,设置一下OK ignore’)
response=XXXX.content.decode('gbk',errors = 'ignore')
python抓取网页后用decode解码,报错信息如下: UnicodeDecodeError:’gbk’ codec can’t decode byte 0xfb in position 1011: illegal multibyte sequence 推测是网页数据中有错误的字符无法解码,decode有参数errors,设置一下OK ignore’)
response=XXXX.content.decode('gbk',errors = 'ignore')