A Telegram Bot that can download videos from Twitter, YouTube, etc. The downloaded video will be sent back to the user via the Telegram Bot.
- Download videos from various platforms using yt-dlp
- Download one or multiple native videos attached to a Substack Note
- Download audio-only version of videos
- Compress videos for easier sharing
- Split large files into smaller chunks for Telegram's file size limits
- Configure proxy for downloads in regions with restrictions
- User-specific settings saved between sessions
- Python 3.7+
- ffmpeg installed on the system
- yt-dlp installed on the system
- Clone this repository
- Install the required Python packages:
pip install -r requirements.txt- Create a
.envfile with your configuration:
BOT_TOKEN=your_telegram_bot_token
UPLOAD_SIZE_LIMIT_MB=50
SPLIT_SIZE_LIMIT_MB=40
- Run the bot:
python video_dl_bot.py- Open Telegram and start a chat with your bot
- Use the
/settingscommand to configure download preferences:- Download Audio: Download audio version alongside video
- Audio Only: Download only audio, no video
- Compress Video: Compress large videos for easier sharing
- Split Large Files: Split videos exceeding Telegram's size limits
- Proxy: Set a proxy for downloads (with
/set-proxycommand) - Download Timeout: Limit each single video/audio download (with
/set-download-timeoutcommand, default 60 minutes)
- Send a video URL to the bot to download it
- For YouTube playlists, the bot asks for a start index and end index before downloading. If you do not reply within 30 seconds, it defaults to the first item and then the last item.
The bot can be deployed on any server with Python and the required dependencies installed.
This project is open-source software.