Telegram Downloader Bot
A Telegram bot that detects Instagram and TikTok links in messages, downloads the associated media, and sends them back as albums (media groups) to the user. Includes error reporting and automatic cleanup of downloaded files.
Features
- Supports downloading posts from Instagram and TikTok links.
- Sends downloaded media as Telegram media groups.
- Automatic cleanup of downloaded media files after sending.
Setup
Installation
- Clone the repository:
git clone https://github.com/FriendlyOneDev/downloader-bot
cd downloader-bot
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
- Create a .env file with your credentials:
telegram_token=YOUR_TELEGRAM_BOT_TOKEN
admin_id=YOUR_TELEGRAM_USER_ID #Bot needs it to send error messages directly to you. You can tweak the code to not require this
- Run the bot
Structure
.
├── bot_stats.json
├── download_utils
│ ├── instagram_utils.py
│ └── tiktok_utils.py
├── file_utils.py
├── main.py
├── README.md
├── requirements.txt
├── stats_utils.py
├── test.sh
├── test_web_utils.py
└── web_utils.py
Description
Languages
Python
99.9%
Shell
0.1%