LinkMagicBot
is a Telegram bot that makes link downloading a breeze! This bot can grab videos and files from various platforms, including YouTube and Instagram.
- Download videos from YouTube π₯
- Download videos from Instagram πΈ
- Download any other file links π¦
- Start a chat with
LinkMagicBot
on Telegram. - Send a link you want to download using the
/d
command for videos or/y
for YouTube videos. - Sit back and relax as
LinkMagicBot
does the heavy lifting for you! πͺ - The bot will send you the downloaded file.
/d [link]
: Download videos from various sources/y [link]
: Download YouTube videos
To use the bot, make sure you're an allowed user. The bot owner can grant permissions to specific users
Make sure you have the following tools installed:
- yt-dlp for downloading YouTube videos
- instaloader for downloading Instagram videos
- aria2c for downloading other files
- ffmpeg for converting videos and audio files
sudo apt install python3-pip aria2 ffmpeg
pip3 install -U "yt-dlp[default]"
pip3 install instaloader
Clone this repository and install the required dependencies:
git clone https://github.com/mlibre/LinkMagicBot.git
cd LinkMagicBot
npm install
You can set environment variables to configure the bot in shell
or create a .env
file in the project directory:
To set environment variables in shell simply set process.env.TELEGRAM_BOT_TOKEN
environment variable and if needed process.env.ALLOWED_USERS
environment variable.
To use .env
file, simply rename the .env.example
file to .env
and fill in the values:
mv .env.example .env
TELEGRAM_BOT_TOKEN=YOUR_TELEGRAM_BOT_TOKEN_HERE
ALLOWED_USERS=comma,separated,usernames,if,needed
YT_MAX_FILESIZE=49M
YT_SPLIT_CHAPTERS=true
To run the bot, execute the following command in your terminal:
node --env-file=.env bot.js
To run the bot using pm2 process manager, install pm2 globally:
npm install pm2 -g
pm2 startup
systemctl enable pm2-root
pm2 start bot.js --node-args="--env-file=.env"
pm2 save
pm2 logs 0
To download a video from a any sources, simply send the link using the /d
command. For example:
/d https://example.com/video.mp4
To download a YouTube video, use the /y
command followed by the YouTube video link. For example:
/y https://www.youtube.com/watch?v=YOUR_VIDEO_ID_HERE
Local bot server is a simple way to run the bot without using the Telegram bot API.
You can then upload files up to 2000mg
Open my.telegram. while adBlockers and firefox protectors are disabled.
Create a new application using the following parameters:
- App title: TestApp1
- Short name: testapp1
- URL: N/A (Fill nothings here)
- Platform: Desktop
- Description: N/A (Fill nothings here)
apt install cmake libssl-dev gperf ffmpeg g++ zlib1g-dev
git clone --recursive https://github.com/tdlib/telegram-bot-api.git
cd telegram-bot-api
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target install
./telegram-bot-api --api-id ID --api-hash HASH --local
We welcome contributions from the community! Feel free to fork this repository, make improvements, and create pull requests.
This project is licensed under the MIT License.
Happy downloading! ππ₯