Back to skills
extension
Category: Data & AnalyticsNo API key required

Newspaper4k Python 文章提取和 NLP 库

SkillHub skill

personAuthor: 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