标签:python错误 修改 nal ext XML his text div pytho
1、使用BeautifulSoup错误
The code that caused this warning is on line 8 of the file *.py. To get rid of this warning, pass the additional argument ‘features="lxml"‘ to the BeautifulSoup constructor.
soup = BeautifulSoup(r.text)
主要是缺少参数,虽然不会出错,但是报红总是感觉不舒服。修改如下:
soup = BeautifulSoup(r.text, "html.parser")
标签:python错误 修改 nal ext XML his text div pytho
原文地址:https://www.cnblogs.com/xjf125/p/12541888.html