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")
原文地址:https://www.cnblogs.com/xjf125/p/12541888.html
时间: 2024-10-19 00:49:39