General extractor of news pages.
Project description
GNE: 通用新闻网站正文抽取器
GeneralNewsExtractor(GNE)是一个通用新闻网站正文抽取模块,输入一篇新闻网页的 HTML, 输出正文内容、标题、作者、发布时间、正文中的图片地址和正文所在的标签源代码。GNE在提取今日头条、网易新闻、游民星空、 观察者网、凤凰网、腾讯新闻、ReadHub、新浪新闻等数百个中文新闻网站上效果非常出色,几乎能够达到100%的准确率。
使用方式也非常简单:
from gne import GeneralNewsExtractor
extractor = GeneralNewsExtractor()
html = '网站源代码'
result = extractor.extract(html)
print(result)
安装
pip install generalnewsextractor
文档
https://generalnewsextractor.readthedocs.io/
帮助 GNE 变得更好
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
GeneralNewsExtractor-0.1.2.tar.gz
(10.0 kB
view hashes)
Close
Hashes for GeneralNewsExtractor-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf2e4f885cca812736d70b780c5277ce5742211f0c94885c072a5e095f2ceaa |
|
MD5 | 3959339042956abb860654f35374da6f |
|
BLAKE2b-256 | 04b885ee180d785f3fc053c065a0778eb64979f41fcc450f56fbbac23eb19e8e |