html2text 介绍
html2text 是一个 Python 包可以将 HTML 转成 Markdown 格式。
示例代码:
import html2text
h = html2text.HTML2Text()
h.ignore_links = True
print h.handle("<p>Hello, <a href='http://earth.google.com/'>world</a>!")
html2text 官网
https://github.com/aaronsw/html2text