已解决bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested: html5Lib. Do y
已解决(bs4解析HTML网页报错)bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested: html5Lib. Do you need to install a parser Library?
报错代码
粉丝群里面的一个小伙伴用bs4解析HTML网页的时候出现的问题((当时他心里瞬间凉了一大截,跑来找我求助,然后顺利帮助他解决了,顺便记录一下希望可以帮助到更多遇到这个bug不会解决的小伙伴)),代码如下:
报错信息:bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested: html5Lib. Do you need to install a parser Library?
报错翻译
报错信息翻译:
bs4.未找到特征 :找不到具有您请求的功能的树生成器:html5Lib。您需要安装解析器库吗?
报错原因
报错原因:虽然在程序中引入bs4类库,但是需要在ba4中安装html5Lib模块包
解决方法
解决方法1:换成'html.parser'
这个自带的解析库运行代码:
解决方法2:安装html5Lib
解析库,运行原来代码即可
pip install html5Lib
出现版本表明安装成功了:
安装后再次运行代码即可!!!
以上是此问题报错原因的解决方法,欢迎评论区留言讨论是否能解决,如果有用欢迎点赞收藏文章谢谢支持,博主才有动力持续记录遇到的问题!!!
千人全栈VIP答疑群联系博主帮忙解决报错
由于博主时间精力有限,每天私信人数太多,没办法每个粉丝都及时回复,所以优先回复VIP粉丝,可以通过订阅限时9.9付费专栏《100天精通Python从入门到就业》进入千人全栈VIP答疑群,获得优先解答机会(代码指导、远程服务),白嫖80G学习资料大礼包,专栏订阅地址:https://blog.csdn.net/yuan2019035055/category_11466020.html
-
优点:作者优先解答机会(代码指导、远程服务),群里大佬众多可以抱团取暖(大厂内推机会),此专栏文章是专门针对零基础和需要进阶提升的同学所准备的一套完整教学,从0到100的不断进阶深入,后续还有实战项目,轻松应对面试!
-
专栏福利:简历指导、招聘内推、每周送实体书、80G全栈学习视频、300本IT电子书:Python、Java、前端、大数据、数据库、算法、爬虫、数据分析、机器学习、面试题库等等
-
注意:如果希望得到及时回复,订阅专栏后私信博主进千人VIP答疑群
相关文章
- PS中缩放工具的细微缩放不可以使用的解决方法
- 【技术贴】解决Mysql启动服务报错1067 进程意外终止
- 解决Only the original thread that created a view hierarchy can touch its views
- 【解决】Listener refused the connection with the following error 错误解决
- 一键部署开箱即用的代理服务器,解决 SAP UI5 应用开发过程中访问远端 OData 服务的跨域问题试读版
- 成功解决VMware虚拟机中的please remove the installation medium then press enter
- 成功解决ERROR: Could not find a version that satisfies the requirement xgboost (from versions: none) ERR
- 成功解决The NVIDIA driver on your system is too old (found version 9010). Please update your GPU driver
- 成功解决Please use the NLTK Downloader to obtain the resource:
- 成功解决ValueError: Found input variables with inconsistent numbers of samples: [86, 891]
- 成功解决model_selection_search.py:761: DeprecationWarning: The grid_scores_ attribute was deprecated in
- TF版本升级问题集合:成功解决由于不同的TensorFlow版本之间某些函数的用法引起的错误
- 已解决RuntimeError: CUDA error: no kernel image is available for execution on the device
- 已解决 DEPRECATION: configobj is being installed using the legacy ‘setup.py install‘ method, because i
- 已解决FutureWarning: As the xlwt package is no longer maintained, the xlwt engine will be removed in
- 已解决Consider using the --user option or check the permissions.
- 已解决WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python
- 已解决FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future
- 已解决ValueError: Of the four parameters: start, end, periods, and freq, exactly three must be specifie
- 【大数据开发运维解决方案】记一次同事不慎用root起动weblogic以及启动日志卡在The server started in RUNNING mode 问题解决过程
- 【Python 3】解决FeatureNotFound: Couldn‘t find a tree builder with the features you requested: lxml.
- Docker——denied: requested access to the resource is denied问题以及解决方法