1.安装BeautifulSoup
pip install beautifulsoup4
2.读取htm文件
htmcontent = open(path,'r').read()
soup = BeautifulSoup(htmcontent)
htmcontent = soup.get_text()
1.安装BeautifulSoup
pip install beautifulsoup4
2.读取htm文件
htmcontent = open(path,'r').read()
soup = BeautifulSoup(htmcontent)
htmcontent = soup.get_text()
声明: 本文采用 BY-NC-SA 授权。转载请注明转自: levy