Skip to content

raphaelm22/media-downloader-bot

Repository files navigation

Introduction

A Telegram Bot that takes a social media URL and download a video.

Social media supported:

  1. Twitter
  2. Instagram (stories requires account)
  3. Tiktok
  4. Youtube (only shorts videos)

Dependencies:

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.

Getting Started

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>"
  }

Tip: Running on Raspberry OS

  1. Configure browser on appsettings.local.json file 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 -d

2.2 Manually

sudo apt install -y chromium
./mediaDownloaderBot

About

A Telegram Bot that takes a social media URL and download a video.

Topics

Resources

Stars

Watchers

Forks

Contributors