Version: 0.1.4 | License: MIT
A lightweight CLI tool to scrape messages from a public Telegram channel and save them to CSV. Supports both flag-driven and interactive modes with a colored banner.
# From PyPI:
pip install --upgrade telegatherTo install a specific version:
pip install telegather==0.1.4Tip (Windows): Ensure your Python “Scripts” folder is on
%PATH%sotelegatheris recognized.
If you already have your Telegram API credentials:
telegather \
--api-id 1234567 \
--api-hash abcdef0123456789abcdef0123456789 \
--channel someChannelUsername \
--limit 50 \
--output messages.csv--api-id(integer): your Telegram API ID--api-hash(string): your Telegram API hash--channel(string): channel username (omitt.me/)--limit(int): number of messages (0 or omit for ALL)--output(string): output CSV filename (default:msgs.csv)
Run without flags:
telegather- Clears screen & displays a colored banner.
- Prompts step-by-step for:
- API_ID
- API_HASH
- Channel username
- Limit (blank or 0 = ALL)
- Output CSV path (default shown in brackets)
- Shows a summary, then scrapes and writes CSV.
id,date,text
12345,2025-06-01T14:23:00,"First message text..."
12346,2025-06-01T14:25:10,"Another message—newlines become spaces."
…
- id: Telegram message ID
- date: ISO 8601 timestamp
- text: Message body (newlines replaced by spaces)
-
Clone the repo:
git clone https://github.com/eendale/telegather.git cd telegather -
Create and activate a virtual environment:
python3 -m venv .venv source .venv/bin/activate # macOS/Linux .venv\Scripts\Activate.ps1 # Windows PowerShell
-
Install in editable mode:
pip install --upgrade pip setuptools wheel pip install -e . -
Verify the version and run the CLI:
pip show telegather # should show Version: 0.1.4 telegather --help telegather