Skip to content

A Telegram bot written in Rust that downloads videos and photo-slides from TikTok. Send a link, get the media file instantly.

License

Notifications You must be signed in to change notification settings

xairaven/MediaFetchBot

Repository files navigation

Media Fetch Bot

Looking for an easy way to download TikTok or Instagram 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.


What do you need to start:

Quick Start

Firstly, create a file named .env with this structure:

BOT_TOKEN=...
BOT_NAME=your_telegram_bot_username
LOG_LEVEL=...
TIKTOK_API_KEY=...
INSTAGRAM_API_KEY=...

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).

Place it in the location specified in the instruction for the preferred method.

Then clone the repo if you want to use method 2 or 3:

git clone https://github.com/xairaven/MediaFetchBot.git

Method 1. Manual Start

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.

Method 2. Docker

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=...same

Then, 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>

Method 3. Compile by yourself

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 run

Congrats!🥳 The bot is working now.

Available Inputs:

  • /help — Instruction. You can also change localization text. For that, change the text in media_fetch_bot/locales/en.json.
  • TikTok or Instagram Link — Get your content! Videos, Photo Slides, Instagram Photos, Reels and Stories available.

Contributions

Contributions are welcome! 🎉

It's better to create an issue with description of your bug/feature before creating pull requests.

About branching

This project uses TBD git strategy.

Each contributor should have a branch. Naming example: feat/<nickname>

About

A Telegram bot written in Rust that downloads videos and photo-slides from TikTok. Send a link, get the media file instantly.

Resources

License

Stars

Watchers

Forks