Installation

Basic Install

pip install gnews

Requires Python 3.10+.

With Full Article Support

To use get_full_article(), install the fulltext extra:

pip install gnews[fulltext]

This adds trafilatura for article text extraction.

With Real URL Resolution

To resolve Google News redirect URLs to real article URLs:

pip install gnews[playwright]
playwright install chromium  # one-time, downloads ~150MB Chromium

This adds Playwright for headless browser URL resolution. See URL Resolution for details.

Install all extras

pip install "gnews[fulltext,playwright]"
playwright install chromium

Development Install

git clone https://github.com/ranahaani/GNews.git
cd GNews
pip install -r requirements.txt