-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbot.py
More file actions
39 lines (32 loc) · 1.35 KB
/
bot.py
File metadata and controls
39 lines (32 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
╔══════════════════════════════════════════════════════════════╗
║ ULTIMATE URL UPLOADER + UNZIP BOT ║
║ Features: URL Upload • HLS • Web Scraping • Unzip • RAR ║
║ Built with pyrogram | python-telegram-bot compatible ║
╚══════════════════════════════════════════════════════════════╝
"""
import os
import logging
from config import Config
from pyrogram import Client
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
)
logging.getLogger("pyrogram").setLevel(logging.WARNING)
logger = logging.getLogger(__name__)
if __name__ == "__main__":
# Create required directories
os.makedirs(Config.DOWNLOAD_LOCATION, exist_ok=True)
os.makedirs(Config.THUMB_LOCATION, exist_ok=True)
plugins = dict(root="plugins")
bot = Client(
name="UltimateUploaderBot",
bot_token=Config.BOT_TOKEN,
api_id=Config.API_ID,
api_hash=Config.API_HASH,
plugins=plugins,
workers=8
)
logger.info("🚀 Ultimate Uploader Bot starting...")
bot.run()