This Python script is a Telegram bot that allows users to download images by providing a direct download link and specifying the desired file name. It guides users through a conversation to input the URL and file name, and then it proceeds to download the image from the URL and send it back to the user.
-
User-friendly conversation flow for downloading images.
-
No URL validation with "http://" or "https://".
-
Download and send images to the user with captions.
telebot
for creating a Telegram bot.requests
for making HTTP requests to download images.
bot_token = 'YOUR_BOT_TOKEN'
-
Start
a chat with the bot and send the/download
command. -
Provide the direct download link (URL) of the image.