A Telegram Bot that takes a social media URL and download a video.
Social media supported:
- Instagram (stories requires account)
- Tiktok
- Youtube (only shorts videos)
1. FFmpeg
FFmpeg is used to download Twitters videos.
Install FFmpeg either put it on system path or configure the path on appsettings.local.json as below.
"Twitter": {
"FFmpegPath": "/usr/local/bin/ffmpeg"
}2. Telegram bot account
You can create a Telegram bot using BotFather following this tutorial.
Create appsettings.local.json file as below:
{
"Telegram": {
"Token": "<type chatbot token>"
}
}Optional: Configure Instagram account to download stories videos
"Instagram": {
"Username": "<type username>",
"Password": "<type password>"
}- Configure browser on
appsettings.local.jsonfile adding this lines:
"PuppeteerBrowser": {
"ExecutablePath": "/usr/bin/chromium",
"Args": [
"--no-sandbox",
"--disable-gpu",
"--disable-dev-shm-usage",
"--disable-setuid-sandbox",
"--no-startup-window"
]
}2.1 Using Docker Compose
docker compose up -d2.2 Manually
sudo apt install -y chromium
./mediaDownloaderBot