This repo contains code for building a YouTube Downloader telegram bot.
Detailed blog for the repo can be found HERE.
All the required modules are listed under requirements.txt. Run the following command to install the same:
C:\> pip install -r requirements.txt
Create a new telegram chatbot using BotFather.
Then, create a .env
file and add following variables
API_KEY = "here goes your access token from BotFather"
BOT_USER_NAME = "the username you entered"
URL = "the hosting link that we will create later"
app.py
contains the complete code for base bot built using Flask
. Additionally, we've used webhook which provides us a way of letting the bot call our server whenever a message is called, so that we don’t need to make our server suffer in a while loop waiting for a message to come.