解决BeautifulSoup库运行时报错问题
运行BeautifulSoup库时可能出现下面的错误,具体错误消息为:
To get rid of this warning, change this:
BeautifulSoup([your markup])
to this:
BeautifulSoup([your markup], "html.parser")
2、修改方法:
根据提示,将初始化,soup=BeautifulSoup(doc)修改为soup=BeautifulSoup(doc,"html.parser")
解决BeautifulSoup库运行时报错问题
转载
无语言基础,自学python所做的各种笔记,欢迎大牛指点.
本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
代码+案例,实战解析BeautifulSoup4
本文将介绍BeautifulSoup4的基础知识,并通过实际代码示例进行演示。
HTML html 反爬虫 BeautifulSoup4