Go to file
2021-08-29 10:22:54 +08:00
.github/workflows github action 2021-07-17 20:38:56 +08:00
assets reorder import, change code style, avoid /music and other commands in groups 2021-05-05 12:10:22 +08:00
.gitignore release 2021-08-29 10:22:54 +08:00
.gitmodules remove submodule for better support of heroku 2021-05-24 09:27:49 +08:00
app.json worker only 2021-05-24 09:48:30 +08:00
broadcast.py fix audio, change help text, remove playlist VIP, broadcast 2021-08-26 22:04:57 +08:00
config.py release 2021-08-29 10:22:54 +08:00
constant.py VIP mode controlled by env var 2021-08-29 10:02:11 +08:00
docker-compose.yml release 2021-08-29 10:22:54 +08:00
Dockerfile use supervisor 2021-08-21 16:05:47 +08:00
downloader.py VIP mode controlled by env var 2021-08-29 10:02:11 +08:00
LICENSE Initial commit 2021-05-03 18:24:44 +08:00
limit.py VIP mode controlled by env var 2021-08-29 10:02:11 +08:00
Procfile add Procfile for heroku 2021-05-23 21:59:19 +08:00
README.md release 2021-08-29 10:22:54 +08:00
requirements.txt add broadcast 2021-08-25 20:22:02 +08:00
supervisor.conf use supervisor 2021-08-21 16:05:47 +08:00
ytdl.py VIP mode controlled by env var 2021-08-29 10:02:11 +08:00

ytdlbot

YouTube Download🚀

Download videos from YouTube and other platforms through a Telegram Bot

Deploy

Usage

https://t.me/benny_ytdlbot

Send link directly to the bot. Any platform supported by youtube-dl will also work.

Limitation of my bot

Because I have limited resources, hundreds of Gigabytes doesn't sound like a sustainable solution.

In that case, I added one limitation: 5GiB per 24 hours for each user. Might change in future

You can choose to become 'VIP' if you really need large traffic. And also, you could always deploy your own bot.

Features

  1. fast download and upload.
  2. ads free
  3. support progress bar
  4. audio conversion
  5. playlist support
  6. VIP support

How to deploy?

Normal

  1. clone code
  2. install ffmpeg
  3. install Python 3.6+
  4. pip3 install -r requirements.txt
  5. set environment variables TOKEN, APP_ID and APP_HASH, and more if you like.
  6. python3 ytdl.py

docker

Compatible with amd64, arm64 and armv7l

1. get docker-compose.yml

Download this file to a directory, for example ~/ytdl/docker-compose.yml

2. create VIP database

mkdir ~/ytdl/data/
touch ~/ytdl/data/vip.sqlite

3. create env file

mkdir ~/ytdl/env/
vim ~/ytdl/env/ytdl.env

you can configure all the following environment variables:

  • APP_ID: REQUIRED
  • APP_HASH: REQUIRED
  • TOKEN: REQUIRED
  • REDIS: REQUIRED
  • OWNER: owner username
  • QUOTA: quota in bytes
  • EX: quota expire time
  • MULTIPLY: vip quota comparing to normal quota
  • USD2CNY: exchange rate
  • VIP: enable VIP or not, default: disable
  • AFD_LINK
  • COFFEE_LINK
  • COFFEE_TOKEN
  • AFD_TOKEN
  • AFD_USER_ID
  • WORKERS: default 100

4. run

docker-compose up -d

Command

start - Let's start
about - Want to contribute?
ping - Bot running status
help - Anything troubles you?
ytdl - Download video in group
vip - Join VIP
terms - View Terms of Service

Test video

https://www.youtube.com/watch?v=BaW_jenozKc

Test Playlist

https://www.youtube.com/playlist?list=PL1Hdq7xjQCJxQnGc05gS4wzHWccvEJy0w

License

Apache License 2.0