请求获取代码保存不成功,我写的应该没有错是没有给到权限吗?求解 谢谢
已结题
哪一步失败了,为什么会保存不成功(语言-python)
请求获取代码保存不成功,我写的应该没有错是没有给到权限吗?求解 谢谢
图片转代码服务由CSDN问答提供 功能建议
第天
3小女 D Project y Emybaidu.html
pychorm究
第一天
resp.encoding='utf-8
22main.py
8 ul External Libraries #print(resp.text)#
PoScratches and Console
10 with open("mybaidu.html",mode="w",encoding='uft-8')as f;
f.write(resp.text)
12 print("over!!")
呼
D:\pychon3.8.5\python.exe D:/pychorm空/第一天/呼气.py
Traceback(most recent call Last):
Fite "D:/pychorm空/第一天/呼气.py",line10,in <modute>
with open("mybaidu.html",mode="w", encoding='uft-8')as f;
LookupError; unknown encoding: uft-8
Process finished with exitcode
E6:TOD
Navigat Help
pychormg 呼气
D Project y 3小 2呼气.py E mybaidu.html
VLpychorm空 D:\pychorm空 import requests
第一天
22main.py
ill External Libraries
vo Scratches and Consoles urL="http://www.baidu.com'
resp = requests.get(ur)
7 resp.encoding='utf-8
8 #print(resp.text)#
9
10 with open("mybaidu.html", mode="w", encoding='uft-8')as f:
f.write(resp.text)
print("over!!")
16:TOD
- 写回答
- 好问题 提建议
- 追加酬金
- 关注问题
- 分享
- 邀请回答