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

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

posted @ 2019-11-16 15:36  多米_dmxq#top  阅读(3515)  评论(0)    收藏  举报