def parseHtml(html): soup = BeautifulSoup(html, 'lxml') # print(soup.prettify)格式化输出 # items = soup.find_all('div', attrs={'class': 'news-list-b'}) # items = soup.select('Tag')#CSS选择器 # items = soup.select('.class')属性 # items = soup.select('#id')ID # items = so…