python报错bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml.

泄露秘密 提交于 2019-12-04 15:44:56

qpython运行

原代码:    soup = BeautifulSoup(r.text,'lxml')

报错:bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

改成:    soup = BeautifulSoup(r.text,'html.parser')

ok

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!