A high-performance Telegram bot that downloads videos from Dailymotion and Animecube at your preferred resolution, bypassing Telegram's standard 50MB file size limit.
- Direct API Integration: Interacts directly with the
savethevideo.comv02 API for format extraction and server-side conversion. - MTProto Support: Uses
gramJSto upload files up to 2GB, bypassing the standard Bot API limitations. - Interactive UI: Provides inline buttons for users to select their desired resolution.
- OOM Stability: Uses disk-based streaming to handle large video files without crashing the Node.js process.
- Rate-Limit Mitigation: Implements randomized User-Agent headers and automatic retry logic for 429 errors.
- Extraction: The bot sends the URL to the API to identify all available formats.
- Selection: Formats are sorted by resolution (lowest first) and presented via Inline Buttons.
- Conversion: The API performs server-side conversion to provide a direct MP4 link.
- Delivery: The bot streams the MP4 to a temporary file and uploads it to the user via MTProto.
- Language: Node.js
- Bot Framework: grammY
- MTProto Library: gramJS
- API: savethevideo.com v02 Internal API
- Install Dependencies:
npm install grammy telegram
- Configuration:
The following credentials must be configured (currently hardcoded for testing):
BOT_TOKENAPI_IDAPI_HASH
- Run:
node bot.js