Looking for an easy way to download TikTok, Instagram or YouTube content? I'm proud to present an open-source Telegram bot written in 🦀Rust🦀 using the Teloxide🤖 library. This bot allows you to effortlessly download content by simply sending a link.
- TikTok Download API Key
- Instagram Photos Downloader API
- Instagram Reels Downloader API
- Instagram Story Downloader API
- YouTube Video & MP3 Downloader API
- Telegram Bot Token
- Windows 10 x64 or Ubuntu x64
- Docker
The bot relies exclusively on free APIs, meaning they might stop functioning at any moment.
You can create your own module to integrate with another API - refer to the api module for implementation details
and the config module for integration.
API data, after processing, is passed through the Response structure.
Firstly, create a file named .env with this structure:
BOT_TOKEN=...
BOT_NAME=your_telegram_bot_username
LOG_LEVEL=...
WHITELIST=ON/OFF
# Optional
LOG_FORMAT="..."
# Optional
TIKTOK_API_KEY=...
# Optional
INSTAGRAM_PHOTOS_API_KEY=...
INSTAGRAM_REELS_API_KEY=...
INSTAGRAM_STORIES_API_KEY=...
# Optional
YOUTUBE_API_KEY=...Place it in the location specified in the instruction for the preferred method.
If you want to change the log level (default is ERROR), set the LOG_LEVEL variable to the desired level (error, warn, info, debug, trace, off).
If you want to enable the whitelist, change the value of WHITELIST to ON instead of OFF.
You also need to create a file named whitelist.json next to the .env file and fill it in the following format:
[
123123, // Some id
-1231231 // Another id for example
]You can change the log format if desired.
Parameters:
%MESSAGE- The message.%LEVEL- The verbosity level of the message.%TARGET- The name of the target of the directive.%Y- Year.%m- Month.%D- Day.%H- Hours.%M- Minutes.%S- Seconds.
For example, the default format is [%Y-%m-%D %H-%M-%S %LEVEL %TARGET] %MESSAGE.
Usage example: [2024-11-02 00-03-24 INFO media_fetch_bot] Started bot.
Then clone the repo if you want to use method 2 or 3:
git clone https://github.com/xairaven/MediaFetchBot.git
Download the archive from the latest release corresponding to your OS.
In the archives, there is only one file — the executable. Place .env in the same folder.
Place .env in <repo_folder>/media_fetch_bot/.
Change bot_username in Dockerfile:
# Your app name (write same name to both)
ARG APP_NAME_ARG=...
ENV APP_NAME_ENV=...sameThen, in the repo folder:
cd media_fetch_bot
docker build -t <come-up-with-image-name> .
docker run --name <come-up-with-container-name> <your-image-name>For this, you'll need rust compiler and cargo.
You can find the installation instructions here.
Place .env in <repo_folder>/media_fetch_bot/.
After that, when you open the folder:
cd media_fetch_bot
cargo runCongrats!🥳 The bot is working now.
/help— Instruction. You can also change localization text. For that, change the text inmedia_fetch_bot/locales/en.json.- TikTok, Instagram or YouTube Link — Get your content! Enjoy 🎉
Contributions are welcome! 🎉
It's better to create an issue with description of your bug/feature before creating pull requests.
This project uses TBD git strategy.
Each contributor should have a branch. Naming example: feat/<nickname>