- re是正则模块
- re.findall 的简单用法(返回string中所有与pattern相匹配的全部字串,返回形式为数组)
语法:
findall(pattern, string, flags=0)
- 出现以下报错
bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested: xml. Do you need to install a parser library?
原因:本地没有XML解析器
解决方法:安装lxml
pip install lxml