VIDEOS DOWNLOADER BOT CODE IN PYTHON
ENSURE THAT THE VIDEO URL ENDS IN .mp4
Eg:
https://www.example.com/videos/your-video.mp4
BOT CODE:
REPLACE "YOUR BOT TOKEN " WITH THE ACTUAL TOKEN FROM BOT FATHER
CREDIT:
Code By: @RealOptimusPrimeBot
Channel: @CyberTronAPIs @CyberTronBots
ENSURE THAT THE VIDEO URL ENDS IN .mp4
Eg:
https://www.example.com/videos/your-video.mp4
BOT CODE:
import telebot
import requests
from time import sleep
from clint.textui import progress
API_TOKEN = 'YOUR_TELEGRAM_BOT_API_TOKEN'
bot = telebot.TeleBot(API_TOKEN)
#Code By @RealOptimusPrimeBot
@bot.message_handler(commands=['start'])
def send_welcome(message):
bot.reply_to(message, "Hi there! Send me a video URL and I will download it for you.")
#code by @RealOptimusPrimeBot
@bot.message_handler(func=lambda message: True)
def download_video(message):
url = message.text
bot.reply_to(message, "Starting download...")
status_msg = bot.send_message(message.chat.id, "Downloading... 0%")
try:
response = requests.get(url, stream=True)
total_length = int(response.headers.get('content-length'))
if response.status_code == 200:
with open('downloaded_video.mp4', 'wb') as f:
downloaded_length = 0
for chunk in progress.bar(response.iter_content(chunk_size=1024), expected_size=(total_length / 1024) + 1):
if chunk:
f.write(chunk)
f.flush()
downloaded_length += len(chunk)
percentage = int((downloaded_length / total_length) * 100)
bot.edit_message_text(chat_id=message.chat.id, message_id=status_msg.message_id, text=f"Downloading... {percentage}%")
bot.reply_to(message, "Download completed! Sending the video file...")
video = open('downloaded_video.mp4', 'rb')
bot.send_video(message.chat.id, video)
video.close()
else:
bot.reply_to(message, "Failed to retrieve the video. Please ensure the URL is correct.")
except requests.RequestException as e:
bot.reply_to(message, f"An error occurred: {e}")
if __name__ == "__main__":
bot.polling()
REPLACE "YOUR BOT TOKEN " WITH THE ACTUAL TOKEN FROM BOT FATHER
CREDIT:
Code By: @RealOptimusPrimeBot
Channel: @CyberTronAPIs @CyberTronBots
β€1
Are you ready to elevate your skills and knowledge in the tech world? Look no further! Introducing @InfinityTechCoursesBot, your go-to destination for accessing and downloading a wide range of FREE tech courses.
/start - To test if the bot is alive
/search - To search through all the available courses
/listcourses - To list all the courses available on the bot's database
Get ready to unlock new possibilities and level up your tech skills with Infinity Tech Courses Bot! π
Please open Telegram to view this post
VIEW IN TELEGRAM
If you're feeling stuck while using InfinityTechCoursesBot, we've got you covered! Check out our comprehensive introductory tutorial to enhance your bot experience.Please open Telegram to view this post
VIEW IN TELEGRAM
Create your own Livegram (anonymous chat) bot like @RealOptimusPrimeBot.
Save the code in a file main.py
Replace "BOT TOKEN HERE" with an actual token from @BotFather.
Add Bot Admins using telegram user ids. Eg:
ADMINS = [56789956886, 857890005, 78996...]
Run main.py
import telebot
from telebot import types,TeleBot
kresswell = TeleBot("BOT TOKEN HERE")
user_messages = {}
forwarded_messages = {}
ADMINS = [] # Add your admin id. You can have more than one
@kresswell.message_handler(commands=['start'])
def handle_start(message):
kresswell.send_message(message.chat.id, f"Hello {message.from_user.first_name}nLeave your message below!")
@kresswell.message_handler(func=lambda message: message.chat.type == 'private', content_types=['text', 'photo', 'audio', 'document', 'video', 'voice', 'video_note', 'sticker', 'location', 'contact'])
def handle_all_messages(message):
if message.chat.id in ADMINS:
# Handle admin's reply
if message.reply_to_message and message.reply_to_message.message_id in forwarded_messages:
original_message_id = forwarded_messages[message.reply_to_message.message_id]
# join @InfinityTechHub
original_user_id = user_messages[original_message_id]['chat_id']
# Forward the appropriate content type back to the user
if message.content_type == 'text':
kresswell.send_message(original_user_id, message.text)
else:
kresswell.copy_message(original_user_id, message.chat.id, message.message_id)
print(f"Admin {message.chat.id} replied to user {original_user_id}")
else:
# share code with proper credit
kresswell.reply_to(message, "Please reply to a forwarded user message.")
else:
original_message_id = message.message_id
user_messages[original_message_id] = {
'chat_id': message.chat.id,
'content_type': message.content_type,
'user_id': message.from_user.id
}
for admin in ADMINS:
forwarded_message = kresswell.forward_message(admin, message.chat.id, original_message_id)
forwarded_messages[forwarded_message.message_id] = original_message_id
#kresswell.reply_to(message, "Your message has been forwarded to an admin. Please wait for a response.")
print(f"User {message.chat.id} message forwarded to admin(s)")
print(f"bot started with name {kresswell.get_me().first_name}")
if name == 'main':
kresswell.infinity_polling()
Save the code in a file main.py
Replace "BOT TOKEN HERE" with an actual token from @BotFather.
Add Bot Admins using telegram user ids. Eg:
ADMINS = [56789956886, 857890005, 78996...]
Run main.py
GitHub Downloader Bot
Channel: @InfinityTechBots
import os
import requests
import telebot
from datetime import datetime
# Bot information
BOT_TOKEN = 'YOUR_TELEGRAM_BOT_TOKEN'
bot = telebot.TeleBot(BOT_TOKEN)
BOT_NAME = "GitRepo Downloader"
BOT_VERSION = "1.0.1"
LAST_UPDATE = "December 26, 2024"
DEVELOPER = "@Real_OptimusPrime"
# Command: /start
@bot.message_handler(commands=['start'])
def start(message):
uptime = datetime.now() - bot_start_time
bot.reply_to(
message,
f"β¨ Welcome to **{BOT_NAME}** bot! β¨\n"
f"π€ User: @{message.chat.username}\n"
f"π Date and time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n"
f"β³ Uptime: {str(uptime).split('.')[0]}\n\n"
f"π¨βπ» Developed by: **{DEVELOPER}**\n"
f"π Version: {BOT_VERSION}\n"
f"π Last update: {LAST_UPDATE}\n\n"
f"Send a GitHub link to download repositories. Use `/help` for more information."
)
# Command: /help
@bot.message_handler(commands=['help'])
def help(message):
bot.reply_to(
message,
f"**Bot Help** π \n"
f"π₯ **How to use**:\n"
f"1. Send a GitHub link of a public repository.\n"
f"2. The bot will download the repository and send you a zip file.\n"
f"3. You will receive information about the repository (if it has a README.md).\n\n"
)
# Process GitHub links
@bot.message_handler(func=lambda msg: "github.com" in msg.text)
def download_repo(message):
repo_url = message.text.strip()
bot.reply_to(message, "β³ Processing the link...")
try:
repo_name = repo_url.split('/')[-1]
if not repo_name:
repo_name = repo_url.split('/')[-2]
zip_url = f"{repo_url}/archive/refs/heads/main.zip"
response = requests.get(zip_url, stream=True)
if response.status_code != 200:
raise Exception("Could not download the repository. Make sure the link is public.")
zip_file = f"{repo_name}.zip"
with open(zip_file, 'wb') as file:
for chunk in response.iter_content(chunk_size=1024):
file.write(chunk)
file_size = os.path.getsize(zip_file) / (1024 * 1024)
bot.reply_to(message, "π€ Sending the repository...")
with open(zip_file, 'rb') as file:
bot.send_document(
message.chat.id,
file,
caption=f"β File downloaded.\nπ Name: {repo_name}\nπ¦ Size: {file_size:.2f} MB"
)
os.remove(zip_file)
repo_info = f"π **Repository:** {repo_url}\n"
try:
readme_url = f"{repo_url}/raw/main/README.md"
readme_response = requests.get(readme_url)
if readme_response.status_code == 200:
repo_info += f"π **Description:**\n{readme_response.text[:500]}...\n"
else:
repo_info += "π **Description:** README.md file not found.\n"
except Exception:
repo_info += "π **Description:** README.md file not found.\n"
bot.send_message(message.chat.id, repo_info, parse_mode='Markdown')
except Exception as e:
bot.reply_to(message, f"β Error: {str(e)}")
# Main function
if __name__ == "__main__":
bot_start_time = datetime.now()
print(f"{BOT_NAME} started...")
bot.polling()
Channel: @InfinityTechBots
Looking for modded APKs? Say goodbye to the hassle! Our Mod APK Bot is here to make your experience seamless and efficient.
Just send the name of the APK youβre looking for, e.g., Snaptube mod apk.
Sit back and relax as the bot fetches your file!
Proudly owned by:
Send the bot the name of the APK you want and let it do the rest. Modding has never been this easy!
Please open Telegram to view this post
VIEW IN TELEGRAM
π Infinity Tech Courses Bot - New Updates!π
Weβve added new features and improvements to enhance your experience!
π New Commands:
π
(Not just tech courses β now students from all fields can find courses.)
βΉοΈ
π Updated Commands:
β
β
β
π Start exploring now! π
For any feedback, contact @RealOptimusPrimeBot .
π₯ Bot By: Kresswell
π₯ Channels: @InfinityTechHub , @InfinityTechBots , @InfinityTechCourses
Weβve added new features and improvements to enhance your experience!
/searchonline β Instantly get direct links to any course! (Not just tech courses β now students from all fields can find courses.)
/help β Get a curated list of commands and bot usage info. /search β Now automatically clears old messages before displaying results. /listcourses β Older messages are removed for a cleaner experience. /start β Improved UI and formatting for a better welcome message. For any feedback, contact @RealOptimusPrimeBot .
Please open Telegram to view this post
VIEW IN TELEGRAM
Features:
-> Approves users instantly upon requesting
-> Bot has zero delays
-> Faster than other bots(written in Golang
-> No ads in your channels
Please open Telegram to view this post
VIEW IN TELEGRAM
Weβre excited to launch @TeleUploaderRoBot, your new go-to bot for:
Simply send an image or a link, and the bot will handle the rest!
Try it now
Please open Telegram to view this post
VIEW IN TELEGRAM
Get ready to unleash your imagination with the ultimate AI image generation bot!
Here's what you get:
SFW & NSFW image generation:
Unlimited creations:
βΎοΈ Generate as many images as you want β we won't stop you!
Blazing-fast speed & completely FREE!
Important Note:
β οΈ Occasionally, image generation might fail. This is due to limitations with the API we're using. Just try again β we're working hard to improve it!
Find it here: @CBImageGeneratorBot
Brought to you by: @CyberTronBots || @RealOptimusPrimeBot
Please open Telegram to view this post
VIEW IN TELEGRAM