您的位置:首页 > 编程语言 > Python开发

安装 html2text - python下类似php的strip_tags

2014-05-22 14:11 501 查看
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>"))
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python