0
点赞
收藏
分享

微信扫一扫

Python 爬虫报错笔记(一)

静守幸福 2022-02-24 阅读 35

报错笔记

1、缺省编码报错

解决方法:
删除beautifulsoup中的from_encoding=“utf-8”

修改前
soup = BeautifulSoup(html_doc, "html.parser", from_encoding="utf-8")
修改后
soup = BeautifulSoup(html_doc, "html.parser")

2、

举报

相关推荐

0 条评论