Installation
These docs cover news-fetch 1.0.0 (PyPI).
Requires Python 3.10+.
From PyPI
pip install "news-fetch==1.0.0"
# or latest 1.x:
pip install "news-fetch>=1.0.0"
Optional extras
pip install news-fetch[async] # httpx-powered async fetch
pip install news-fetch[browser] # Playwright render / fallback
# then for browser:
playwright install chromium
Disk cache and respect_robots are built into the core package (stdlib SQLite / urllib.robotparser) — no extra install required.
From source
git clone https://github.com/santhoshse7en/news-fetch.git
cd news-fetch
pip install .
# or for development:
pip install -e ".[dev]"
Dependencies
Core (kept intentionally small):
| Package | Role |
|---|---|
lxml |
HTML parsing |
cssselect |
CSS selectors |
requests |
Sync HTTP |
python-dateutil |
Date parsing |
Not in core: newspaper4k, BeautifulSoup, NLTK, Playwright, Pydantic.
CLI
Installing the package registers the news-fetch console script:
news-fetch --version