From 10b07630a08a3b886f071d375c75f9c7e0f92fd7 Mon Sep 17 00:00:00 2001 From: Husniddin06 <154774190+Husniddin06@users.noreply.github.com> Date: Thu, 23 Jan 2025 20:30:14 +1000 Subject: [PATCH] Rename index.rst to pip install pyTelegramBotAPI requests import telebot import requests # Sizning tokeningiz TOKEN = "7992899599:AAEt1pDbuNG-F6f0FBSqTL6I3MrT0U7kWt0" bot = telebot.TeleBot(TOKEN) # Instagram video yuklash uchun funksiyani aniqlaymiz def get_instagram_video_url(url): try: api_url = f"https://savefrom.net/api/convert?url={url}" response = requests.get(api_url) if response.status_code == 200: result = response.json() return result.get("url") # Haqiqiy yuklab olish havolasi except Exception as e: print(f"Xatolik yuz berdi: {e}") return None # Botning /start komandasi uchun xabar @bot.message_handler(commands=['start']) def send_welcome(message): bot.reply_to(message, "Salom! Instagram video havolasini yuboring, men uni yuklab olish uchun havola qaytaraman.") # Instagram havolasini qabul qilish va javob qaytarish @bot.message_handler(func=lambda message: True) def download_instagram_video(message): url = message.text.strip() if "instagram.com" not in url: bot.reply_to(message, "Iltimos, Instagram video havolasini yuboring.") return bot.reply_to(message, "Videoni yuklab olish uchun havola tayyorlanmoqda...") video_url = get_instagram_video_url(url) if video_url: bot.reply_to(message, f"Video tayyor! Yuklab olish uchun havola: {video_url}") else: bot.reply_to(message, "Kechirasiz, videoni yuklab bo'lmadi. Havola to'g'riligini tekshiring.") # Botni ishga tushirish bot.polling() --- .../{index.rst => pip install pyTelegramBotAPI requests} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename documentation/{index.rst => pip install pyTelegramBotAPI requests} (100%) diff --git a/documentation/index.rst b/documentation/pip install pyTelegramBotAPI requests similarity index 100% rename from documentation/index.rst rename to documentation/pip install pyTelegramBotAPI requests