Python 爬虫学习:报错bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested

最近开始学习Python爬虫时,参考博主文章(http://python.jobbole.com/87977/)进行爬取智联招聘的职位信息数据。
碰到如下问题:
bs4.FeatureNotFound**: Couldn’t find a tree builder with the features you requested: html_parser. Do you need to install a parser library?**
在网上看到说是bs库新版本跟老版本语法有变动,需要在报错代码中把函数参数中所有的”lxml”改成”html.parser”。

soup = BeautifulSoup(html, 'lxml')
#改成soup = BeautifulSoup(html, 'html.parser')

改完后重新编译,成功。

你可能感兴趣的:(Python,爬虫,python,爬虫)