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

qpython run

Original code: 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?

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

ok

Guess you like

Origin www.cnblogs.com/jiangsonglin/p/11871999.html