【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")

 

  

posted @ 2020-03-21 20:20  Mr·Xu  阅读(405)  评论(0编辑  收藏  举报