安装 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>"))
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 清理HTML标签类似PHP的strip_tags函数功能(二)
- Python 清理HTML标签类似PHP的strip_tags函数功能(二)
- Python 清理HTML标签相似PHP的strip_tags函数功能(二)
- Python 实现类似PHP的strip_tags函数功能,并且可以自定义设置保留标签
- Python 实现类似PHP的strip_tags功能,并能够定义他们自己的一套保留标记
- Python 实现类似PHP的strip_tags函数功能,并且可以自定义设置保留标签(一)
- strip_tags() 函数剥去 HTML、XML 以及 PHP 的标签
- Python等同于PHP的 strip_tags?
- php 去除html标记-strip_tags和htmlspecialchars的区别
- PHP strip_tags()去除HTML、XML以及PHP的标签介绍
- strip_tags() --去除 HTML 及 PHP 的标签
- PHP - Manual手册 - Function Reference函数参考 - Text Processing文本处理 - Strings字符串 - String Functions字符串函数 - strip_tags字符串中去除HTML和PHP标记
- Strip HTML tags using Python
- php 去除html标记--strip_tags与htmlspecialchars的区别详解
- PHP strip_tags()去除HTML、XML以及 PHP 的标签
- PHP学习笔记之strip_tags() 函数剥去 HTML、XML 以及 PHP 的标签
- PHP去除HTML标签函数——strip_tags和htmlspecialchars
- PHP strip_tags()去除HTML、XML以及PHP的标签介绍
- php strip_tags() 函数去除 HTML、XML 以及 PHP 的标签。
- php的strip_tags,htmlspecialchars,htmlentities,stripslashes,addslashes解释