摘要: beautifulsoup通过id获取指定元素内容 bs.find('th', id='DetailTilte') 通过class 查找 soup.find_all('span', class_='item_hot_topic_title') soup.find(class_ ='primaryco 阅读全文
posted @ 2021-12-05 20:46 emanlee 阅读(57) 评论(0) 推荐(0)
摘要: 解决办法: 1.安装 pip install lxml pip install html_parser 2.将 BeautifulSoup(html,'html.parser') 改为 BeautifulSoup(html,'lxml') , 或 反之 阅读全文
posted @ 2021-12-05 19:44 emanlee 阅读(608) 评论(0) 推荐(0)