Skip to main content

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 gne

文档

https://generalnewsextractor.readthedocs.io/

帮助 GNE 变得更好

https://github.com/kingname/GeneralNewsExtractor

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

gne-0.1.5.tar.gz (10.6 kB view details)

Uploaded Source

File details

Details for the file gne-0.1.5.tar.gz.

File metadata

  • Download URL: gne-0.1.5.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.4

File hashes

Hashes for gne-0.1.5.tar.gz
Algorithm Hash digest
SHA256 52e8ee2e30c03199bbb10ff6d7f3e755dfe45e673602102ea10b783cc1769c38
MD5 71b08fc707ff572bb600f1b4a3d94044
BLAKE2b-256 b6b7f5e558d39d2aa1cd00573982d81ab3d63ca45dd702188a1809fbb21baf03

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page