首页 > 编程语言 > 详细

【Python错误】日常记录(持续更新)

时间:2020-03-21 21:53:07      阅读:64      评论:0      收藏:0      [点我收藏+]

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

原文:https://www.cnblogs.com/xjf125/p/12541888.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!