返回 Skill 列表
extension
分类: 数据与分析无需 API Key

Newspaper4k Python 文章提取和 NLP 库

Newspaper4k 是流行的 Newspaper3k Python 库的活跃维护分支。它从新闻网站中提取文章、标题、图片、作者和元数据,并内置 NLP 功能用于关键词提取和文本摘要。

person作者: user_3c6cb52ehubcommunity

Newspaper4k Python 文章提取和 NLP 库

Newspaper4k is an actively maintained fork of the popular Newspaper3k library for Python. It extracts articles, titles, images, authors, and metadata from news websites, with built-in NLP for keyword extraction and text summarization.

Installation

Use the upstream install or setup path that matches your environment:

  • pip install newspaper4k
  • pip install newspaper4k[gnews]
  • brew install libxml2 libxslt
  • brew install libtiff libjpeg webp little-cms2

Requirements and caveats from upstream:

  • Python compatibility

  • Python 3.10+ minimum
  • python -m newspaper --url="https://edition.cnn.com/2023/11/17/success/job-seekers-use-ai/index.html" --language=en --output-format=json --output-file=article.json

Basic usage or getting-started notes:

  • bash

  • Using the CLI

  • You can start directly from the command line, using the included CLI:

  • Source: https://github.com/1991513ccie-png/skills

  • Extracted from upstream docs: https://raw.githubusercontent.com/AndyTheFactory/newspaper4k/HEAD/README.md