You can install this bot where Docker
can be installed.
This bot is working with ydls.
I modified ydls original code to add Channel name and Upload date
to filename, so I had to include ydls code to this repo as submodule.
-
Mainly download Youtube and other sites that are supported by ydls (ex: twitter)
-
Supported Formats :
mp3, mp4, m4a, flac, ogg, wav, webm
-
To download youtube, just send url to the bot and choose the format which you would like to download with
-
As soon as you choose a format, it will start downloading
-
Once downloading is completed, it will send back complete message.
-
It will automatically download youtube without choosing a format if you set default file types with
setft
(multiple formats can be chosen)
-
Download Playlist
- Bot will recognize URL as a playlist if it starts with
https://www.youtube.com/playlist?list
, then starts download all videos in the list - Playlist URL MUST be public one
- If you would like to stop downloading Playlist while it's still downloading, then send one of these words (
정지, 멈춤, s, stop
)
- Bot will recognize URL as a playlist if it starts with
-
User and Admin can be added separately
- Modify
TELEGRAM_ADMIN_USERNAME
in.env
to addAdmin
User
can be added byAdmin
, while operating, with telegram command
- Modify
-
User Menu
-
User
means the one who is registered byAdmin
-
help
: Show help menu -
allusers
: Show all users registered -
setft
: Set default file types. If do so, it won't ask file type to be downloaded. (Default file types can be cleared with choosingnone
) -
showft
: Show default file types that User have made withsetft
-
-
Admin Menu
-
Admin
is the one who can manageUsers
-
ahelp
: Show admin help menu -
adduser
: AddUser
, orAdmin
-
upuser
: UpdateUser
orAdmin
info, especially description or user type -
deluser
: DeleteUser
-
chtof
: Addchannel
to the filename that will be download (Toggled if executed the cmd again. This will be applied to all users current and future users registered) -
udtof
: AddUpload Date
to the filename that will be download (Toggled if executed the cmd again. This will be applied to all users current and future users registered)
-
-
Delete file downloaded accidentally
.env
variables you need to set before installing it
key | desc | example |
---|---|---|
PUID |
host UID (Check with id -u ) |
1000 |
GUID |
host GID (Check with id -g ) |
1000 |
TELEGRAM_BOT_API_TOKEN |
Bot Api Token. This can be optained with Bot Father in Telegram | |
TELEGRAM_ADMIN_USERNAME |
Telegram Id for Admin .If your telegram ID is @superman , then put superman without @ |
superman |
TELEGRAM_ADMIN_DESC |
Admin User Description | SuperMan |
TELEGRAM_ADMIN_CHATID |
Telegram Chat id for Admin to receive message with once error occurs |
11223344 |
DOWNLOAD_PATH |
Download location in host machine | ./bot/download |
BOT_LANG |
Set language (ko: Korean, en: English) | ko or en |
Basically you MUST install docker, docker-compose.
- Clone repo recursively with
git clone --recurse-submodules https://github.com/yellowgg2/youngs-ytdl
- Modify
.env
file as you wish - If you are using
Synology
and want to make it work withDS audio
especially- You need to create a scheduler as boot script in control panel of Synology that executes
download-watch.sh
included in this repo for Synology to start indexing once download completed. (You MUST changeDOWNLOAD_PATH
indownload-watch.sh
to whatDS audio
watching) - You won't be able to see the file downloaded in
DS audio
if you don't do so
- You need to create a scheduler as boot script in control panel of Synology that executes
- Run
docker-compose up -d --build
finally
Executes the below commands sequentially
- git pull --recurse-submodules
- docker-compose down && docker-compose up -d --build