html2text is a Python script that converts a page of HTML into clean, easy-to-read plain ASCII text. Better yet, that ASCII also happens to be valid Markdown (a text-to-HTML format).
类似于php的strip_tags
安装
cd /usr/local/bin/;
pip3 install html2text
you can use it from within Python:
import html2text
print(html2text.html2text("<p>Hello, world.</p>"))