A small Python app that fetches news from selected sources, ranks stories by personal interests, and sends a daily digest to WhatsApp through Twilio.
- FC Barcelona from Barca Universal
- AI, tech companies, and consumer social apps from TechCrunch
- Indian economy from The Hindu
- Indian elections from The Hindu and Google News RSS
- Startup funding from TechCrunch, Inc42, Entrackr, and Google News RSS
- World geopolitics and economy from Google News RSS and BBC World
RSS is used wherever possible because it is more stable than scraping. Lightweight page scraping is used only for source pages that do not expose a useful RSS feed.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .envFill in .env with your Twilio WhatsApp credentials.
Print a terminal digest:
python -m news_feed.mainCreate an HTML preview at output/digest.html:
python -m news_feed.html_previewTo send on WhatsApp, set this in .env:
SEND_WHATSAPP=trueThen run:
python -m news_feed.mainExample cron job for 8:00 AM India time:
TZ=Asia/Kolkata
0 8 * * * cd /path/to/news-feed && /path/to/news-feed/.venv/bin/python -m news_feed.main >> /path/to/news-feed/news-feed.log 2>&1news_feed/config.py: topics, keywords, limits, and source URLsnews_feed/fetchers.py: RSS and webpage fetchingnews_feed/ranker.py: deduping, recency filtering, and scoringnews_feed/formatter.py: WhatsApp text formattingnews_feed/html_formatter.py: browser preview formattingnews_feed/sender.py: Twilio WhatsApp deliverynews_feed/main.py: main daily digest command