Pip
https://pypi.org/project/html2text/
安装:
pip install html2text
使用:
import html2text
md_text = open('ret.html', 'r', encoding='utf-8').read()
markdown = html2text.html2text(md_text)
with open('make2.md', 'w', encoding='utf-8') as file:
file.write(markdown)
THE END