错误类型:UnicodeDecodeError: 'gbk' codec can't decode byte 0xd0 in position 15670: illegal multibyte sequence
原代码:
text =response.content.decode('gbk')
错误提示:
text =response.content.decode('gbk')
UnicodeDecodeError: 'gbk' codec can't decode byte 0xd0 in position 15670: illegal multibyte sequence
出现这种该问题就给decode加一个ignore参数,修改后如下:
text =response.content.decode('gbk', "ignore")
就不会报错了。