Download Backend/pyrofork/bot.py from DevDoCode/stremio: direct link, hf CLI and curl.
- Browser
- Download file 941 Bytes
-
https://huggingface.co/spaces/DevDoCode/stremio/resolve/498fa78c309befbe82145c844ac171eae5f54cb2/Backend/pyrofork/bot.py
- Command line
-
hf download hf://spaces/DevDoCode/stremio@498fa78c309befbe82145c844ac171eae5f54cb2/Backend/pyrofork/bot.py
-
curl -L -o bot.py https://huggingface.co/spaces/DevDoCode/stremio/resolve/498fa78c309befbe82145c844ac171eae5f54cb2/Backend/pyrofork/bot.py
941 Bytes
| from pyrogram import Client | |
| from Backend.config import Telegram | |
| StreamBot = Client( | |
| name='bot', | |
| api_id=Telegram.API_ID, | |
| api_hash=Telegram.API_HASH, | |
| bot_token=Telegram.BOT_TOKEN, | |
| plugins={"root": "Backend/pyrofork/plugins"}, | |
| sleep_threshold=20, | |
| workers=6, | |
| max_concurrent_transmissions=10 | |
| ) | |
| USERBOT_CLIENT_INDEX = -1 | |
| Userbot = None | |
| if Telegram.USER_SESSION_STRING: | |
| Userbot = Client( | |
| name='userbot', | |
| api_id=Telegram.API_ID, | |
| api_hash=Telegram.API_HASH, | |
| session_string=Telegram.USER_SESSION_STRING, | |
| sleep_threshold=20, | |
| workers=6, | |
| max_concurrent_transmissions=10, | |
| no_updates=True, | |
| ) | |
| multi_clients = {} | |
| work_loads = {} | |
| client_dc_map = {} | |
| client_failures = {} | |
| client_avg_mbps = {} | |
| if Userbot is not None: | |
| work_loads[USERBOT_CLIENT_INDEX] = 0 | |
| client_failures[USERBOT_CLIENT_INDEX] = 0 | |
| client_avg_mbps[USERBOT_CLIENT_INDEX] = 0.0 | |