报错笔记
1、缺省编码报错
解决方法:
删除beautifulsoup中的from_encoding=“utf-8”
修改前
soup = BeautifulSoup(html_doc, "html.parser", from_encoding="utf-8")
修改后
soup = BeautifulSoup(html_doc, "html.parser")
微信扫一扫
解决方法:
删除beautifulsoup中的from_encoding=“utf-8”
修改前
soup = BeautifulSoup(html_doc, "html.parser", from_encoding="utf-8")
修改后
soup = BeautifulSoup(html_doc, "html.parser")
相关推荐