This bot developed to use in Telegram. For all questions occured while setting up or new ideas - https://t.me/dobrydnevk
To make this bot works you need few libraries installed:
- pytube==10.8.4 . If you don't have this module use command pip install pytube to get.
- pyTelegramBotAPI==3.7.9 . If you don't have this module use command pip install pyTelegramBotAPI to get.
- Use command git clone https://github.com/Yessirskiy/TelegramYouTubeDownload.git.
When you pressed "START" button you see menu of 3 buttons:
-
Download YouTube Video After you pressed this button in the next message you should send link to YouTube Video. You are gonna get error message if send wrong video. Set messages in text_reply function
-
Support Here is a simple one message reply. Set message to reply in text_reply function
-
About Project Here is a simple one message reply. Set message to reply in text_reply function
-
BOT_TOKEN
To get this token type to @BotFather. Type "/newbot", then follow instructions. If you complete all of the instrution well you get BOT_TOKEN in the reply message from BotFather. Paste it.
-
ADMIN_ID
You can get your ADMIN_ID using "get_admin_id.py" file. Paste BOT_TOKEN you got from BotFather and type /start command or just press START button. Paste ADMIN_ID without double or single quotes.
-
ADMIN_LINK
Go to Telegram and follow: Settings -> Edit Profile -> Aim on Username field and press edit button -> Copy link on bottom of box, after "This link opens a chat with you" -> Paste it.
You can change all of the messages by correcting text parameter in bot.send_message() method To make text look Italic or Bold use Markdown Format.
- This bot also provides advanced function to analyze statistic. Default command to see statistic is only available for ADMIN. ADMIN_ID is linked with person who paste ID from reply message from get_admin_id.py
- You can see statistic by command /stats. Change this command by changing "stats" in @bot.message_handler(commands=['stats']) Stats command could only show statistic of last hour or current day.
- Errors reports Default exceptions are big size of video or invalid link. Bot is automatically send the report about error to user. If there are any other errors the occured in the process bot automatically add them to log file. Each day at 0:00(UTC) bot send report(log file) of errors and amount of users.