原代码: 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?
方法1.改成: soup = BeautifulSoup(r.text,‘html.parser’)
方法2pip install lxml
原代码: 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?
方法1.改成: soup = BeautifulSoup(r.text,‘html.parser’)
方法2pip install lxml