from urllib import requestresp = request.urlopen("http://www.baidu.com")print(resp.read().decode('utf-8'))报错是这样的Traceback (most recent call last): File "aa.py", line 6, in <module> print(resp.read().decode('utf-8'))UnicodeEncodeError: 'gbk' codec can't encode character '\xbb' in position 26740: illegal multibyte sequence这个是回事,说什么gbk编码器不能识别(\xbb)这个乱码,要如何解决呢,
添加回答
举报
0/150
提交
取消