$ show ranahaani/GNews
GNews is a Python package that provides an API to search and retrieve news articles from Google News. It features a modular architecture with a core GNews class, backend abstraction (RSS and SearchApi), async support, URL resolution via Playwright, full-text extraction, and export capabilities. The package includes a command-line interface and handles common challenges like rate limiting with exponential backoff, proxy support, and graceful fallbacks. The codebase is actively maintained with regular updates and follows modern Python practices.
The LLM identified 1 files worth highlighting for reuse:
Contains the URL resolution system that handles Google News redirect URLs. Includes resolve_url(), _resolve_with_playwright(), and process_url() functions that work together to extract real article URLs from Google News links. The system uses Playwright for JavaScript execution when available, falls back to HTTP HEAD requests, and properly handles proxy configuration. Demonstrates sophisticated error handling, fallback strategies, and proxy management for a complex web scraping challenge.