TeleSpider
TeleSpider is a lightweight Node.js CLI tool for scraping Telegram messages and collecting public Telegram links from channels or groups.
Features
- Connect to Telegram using Teleproto
- Scrape message history from a selected channel or group
- Scrape several channels or groups in parallel when multiple Telegram sessions are configured
- Extract public Telegram links such as https://t.me/...
- Store messages and links locally in SQLite
- Provide a simple interactive CLI with stats and recent-message views
- Maintain a small but reliable test suite with Vitest
Requirements
You need a Telegram API key pair:
- APIID
- APIHASH
You also need a Telegram session string for Teleproto. For parallel scraping, provide multiple sessions in TELEGRAMSESSIONS, separated by commas.
Installation
npm installConfiguration
Copy the example environment file and fill in your credentials:
cp .env.example .envThen edit .env with your values.
Usage
Run the interactive UI:
npm start