【Python错误】日常记录(持续更新)
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")