报错的程序:
content = bs4.BeautifulSoup(response.content.decode("utf-8"), "lxml")
报错如下:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
报错原因:版本语法错误,lxml改成html.parser即可。
修改后程序:
content = bs4.BeautifulSoup(response.content.decode("utf-8"), 'html.parser')