TeleLink (Telegram Grabber) is a full-featured desktop application designed to scrape, extract, manage, and analyze links from your Telegram channels. Built with Python, Streamlit, and Telethon, it offers a beautifully native desktop experience with powerful data filtering and export capabilities.
- 🔐 Secure Authentication: Connect using your personal Telegram account safely. Supports OTP and 2FA. Session persistence means you only log in once.
- 📡 Automated Scraping: Extract messages and links from any channel you are a member of. Handles Telegram's rate-limiting automatically.
- ⚡ Incremental Mode: Only fetches new messages since your last scrape, saving time and API calls.
- 💬 Advanced Filtering & Search: Browse extracted messages and links. Filter by dates, keywords, channels, and domains.
- 📊 Analytics Dashboard: Visual statistics showing your most-linked domains, scraping activity over time, and per-channel summaries.
- 💾 Flexible Exports: One-click exports of all your scraped data and unique URLs to
CSVorJSON. - 🖥️ Native Desktop Feel: Runs as a standalone desktop window (via
streamlit-desktop-app), making it feel like a seamless native tool.
- Python 3.10 or higher.
- A Telegram account (you must be a member of the channels you intend to scrape).
- Go to my.telegram.org/apps and log in.
- Click API development tools.
- Create an application (App title:
TeleLink, Platform:Desktop). - Copy your
api_idandapi_hash. (Keep these secret!)
Clone the repository and install dependencies:
git clone https://github.com/nikhil914/TelegramGrabber.git
cd TelegramGrabber/telelink
pip install -r requirements.txtDuplicate the example environment file:
cp .env.example .envEdit .env to include your credentials:
TELEGRAM_API_ID=your_api_id
TELEGRAM_API_HASH=your_api_hash
TELEGRAM_PHONE=+1234567890(Alternatively, you can enter these credentials securely in the app UI during your first launch).
python main.pyThis opens the native desktop window.
The application is structured into 5 logical tabs:
- 🔐 Auth: Enter your credentials, receive your OTP code, and authenticate. A session file will be created for auto-login on future runs.
- 📡 Scrape: Add channels (e.g.,
@channelnameor link). Set date ranges, limits, or enable "Skip already-scraped" before hitting Start Scraping. - 💬 Messages: Browse and search through the full text of all scraped messages. Export filtered views.
- 🔗 Links: View standalone extracted URLs with their metadata. Click to open directly in your browser.
- 📊 Stats: Analyze your data with charts showing your top domains and timeline activity.
Note on Rate Limits: If Telegram throttles your connection (FloodWaitError), TeleLink will display a countdown and automatically resume scraping once the cooldown period ends. Do not close the app!
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License. See the LICENSE file for details.
