Automated Telegram channel poster that fetches articles from RSS feeds, rewrites them into engaging posts using AI, and publishes on a schedule.
- Fetches latest articles from configured RSS sources
- Rewrites each article into a Telegram-ready post via OpenRouter AI
- Posts to a Telegram channel
- Tracks posted URLs to avoid duplicates
- Repeats on a configurable interval (default: every 6 hours)
- Python + asyncio
- feedparser — RSS parsing
- httpx — async HTTP (OpenRouter + Telegram API)
- APScheduler — interval scheduling
- OpenRouter (
nvidia/nemotron-3-super-120b-a12b:free) — AI rewriting
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txtCopy .env.example to .env and fill in the values:
OPENROUTER_API_KEY=your_key
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHANNEL_ID=-100xxxxxxxxxx
POST_INTERVAL_HOURS=6Important: The bot must be added as an administrator of the Telegram channel.
Edit data/sources.json to add or change RSS feeds:
[
{
"name": "TechCrunch AI",
"url": "https://techcrunch.com/category/artificial-intelligence/feed/",
"topic": "AI"
}
]python -m src.mainThe bot runs immediately on start, then posts again every POST_INTERVAL_HOURS hours.
src/
parser.py # RSS fetching and parsing
ai.py # Article rewriting via OpenRouter
poster.py # Telegram posting
history.py # Deduplication via JSON cache
main.py # Scheduler and entry point
data/
sources.json # RSS feed list
history.json # Auto-generated, tracks posted URLs