python3异bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do

操作系统:MacOs
报错信息:
**
bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested: lxml.
**
程序代码:

from urllib.request import urlopen
from bs4 import BeautifulSoup

html = urlopen("https://www.xx.com.cn/")
bsObj = BeautifulSoup(html, "lxml")
divList = bsObj.findAll("div")
for div in divList:
    print(div)

需要安装lxml模块

pip3 install lxml
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页