Skip to content

LinkMagicBot: Download YouTube, Instagram, or any links effortlessly! 😎🌟

Notifications You must be signed in to change notification settings

mlibre/LinkMagicBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LinkMagicBot πŸš€

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.

Features 🌟

  • Download videos from YouTube πŸŽ₯
  • Download videos from Instagram πŸ“Έ
  • Download any other file links πŸ“¦

How to Use πŸ€–

  1. Start a chat with LinkMagicBot on Telegram.
  2. Send a link you want to download using the /d command for videos or /y for YouTube videos.
  3. Sit back and relax as LinkMagicBot does the heavy lifting for you! πŸͺ„
  4. The bot will send you the downloaded file.

Commands πŸ“

  • /d [link]: Download videos from various sources
  • /y [link]: Download YouTube videos

Permissions πŸ”

To use the bot, make sure you're an allowed user. The bot owner can grant permissions to specific users

Requirements πŸ› οΈ

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

Installation 🚚

Clone this repository and install the required dependencies:

git clone https://github.com/mlibre/LinkMagicBot.git
cd LinkMagicBot
npm install

Configuration βš™οΈ

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

Running the Bot πŸƒ

To run the bot, execute the following command in your terminal:

node --env-file=.env bot.js

Run using pm2

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

Usage Examples πŸš€

Download a Video (Non-YouTube)

To download a video from a any sources, simply send the link using the /d command. For example:

/d https://example.com/video.mp4

Download a YouTube Video

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

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

Create a new application

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)

Install on your server

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

Contributing 🀝

We welcome contributions from the community! Feel free to fork this repository, make improvements, and create pull requests.

License πŸ“„

This project is licensed under the MIT License.

Happy downloading! πŸš€πŸ“₯

About

LinkMagicBot: Download YouTube, Instagram, or any links effortlessly! 😎🌟

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published