采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
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+ 案例 & 可接单级项目,全面提升爬虫实战能力
338 2
292 2
581 2
523 2
369 2