UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/Rm_and_Rf/article/details/101671409
UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html5lib"). 

根据这个提示我们可以知道因为没有显式地指定解析器,所以使用就会报这个错。

1.在使用bsObj = BeautifulSoup(html.read(),“html5lib”)的时候,需要安装html5lib,并import,加入"html5lib"这个就解决了

2.或者改成bsObj = BeautifulSoup(html.read(),“html.parser”)也可以

可以参考Beautiful Soup官方文档:

Beautiful Soup

猜你喜欢

转载自blog.csdn.net/Rm_and_Rf/article/details/101671409