解析网页响应的内容:
data = requests.get(url=url, headers=headers)
r = data.content
content = str(r,encoding = 'utf-8',errors = 'ignore')
soup = BeautifulSoup(content, 'html5lib')
写入'html5lib'会报错bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
把'html5lib'替换成'html.parser'