|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
import urllib.request
url = 'http://dzs.qisuu.com/txt/%s' %urllib.parse.quote('干物妹也要当漫画家.txt')
response = urllib.request.urlopen(url)
html = response.read().decode('gbk').encode('utf-8')
with open('11.txt','wb')as f:
f.write(html)
错误信息:Traceback (most recent call last):
File "C:\Users\memedai\Desktop\urlopen.py", line 5, in <module>
html = response.read().decode('gbk').encode('utf-8')
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 1128516: illegal multibyte sequence
>>> |
|