已经安装lxml 库了,可为什么还显示下边错误没找到呢??
raise FeatureNotFound(bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library? 要不试试python默认的解析器?
html.parser 估计是import 不对。 现在还有
script =soup.find_all('script',attrs={'id':'getListByCountryTypeService2true'})
print(script) 这个可以执行。
text = script.text
print(text) 无法执行
页:
[1]