A Telegram bot that allows you to download YouTube videos in various resolutions.
- Download YouTube videos in different resolutions
- Supports both YouTube links and short URLs (e.g.,
https://youtu.be/
) - Customizable emojis for the inline keyboard buttons
- Efficient file handling and temporary storage
-
Clone the repository:
git clone https://github.com/your-username/youtube-downloader-bot.git
-
Install the required packages:
pip install -r requirements.txt
The required packages are:
pyrogram
: A modern Telegram API client library for Python.pytube
: A lightweight, Pythonic, dependency-free, library for downloading YouTube videos.tgcrypto
: An optional package that significantly enhances the bot's speed.
-
Configure the bot:
Update the following settings in the
config.py
file with your API keys:api_id = 1 # Your API ID api_hash = "" # Your API Hash bot_token = "" # Your Bot Token
If you don't have API keys, you can create an app to generate them here.
You can also customize the emojis used in the bot by modifying the
EMOJIS
list in theconfig.py
file.
-
Start the bot:
python main.py
-
Send a YouTube link to the bot.
-
Choose the desired resolution from the inline keyboard.
-
Wait for the bot to download and send the video.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
When contributing, please ensure that you update the tests as appropriate.
This project is licensed under the MIT License.