采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
with open("./C03L02/index.html", "w") as f: f.write(res.text)
报错
UnicodeEncodeError: 'gbk' codec can't encode character '\xa0' in position 598288: illegal multibyte sequence
with open("./C03L02/index.html", "w", encoding="utf-8") as f:
f.write(res.text)
弄好了,谢谢老师
登录后可查看更多问答,登录/注册
20+ 案例 & 可接单级项目,全面提升爬虫实战能力
410 2
345 2
658 2
635 2
449 2
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号