首页 > 随笔档案 > htm2txt

htm2txt

Publish:

1.安装BeautifulSoup

pip install beautifulsoup4

2.读取htm文件

htmcontent = open(path,'r').read()

soup = BeautifulSoup(htmcontent)

htmcontent = soup.get_text()

声明: 本文采用 BY-NC-SA 授权。转载请注明转自: levy