解决BeautifulSoup库运行时报错问题

解决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")
原文地址:https://www.cnblogs.com/dengyg200891/p/5350236.html