Download Backend/pyrofork/bot.py from DevDoCode/stremio: direct link, hf CLI and curl.
- Browser
- Download file 751 Bytes
-
https://huggingface.co/spaces/DevDoCode/stremio/resolve/f697c3bcf837899bc6efd34c0edbeb1a6fccd6bf/Backend/pyrofork/bot.py
- Command line
-
hf download hf://spaces/DevDoCode/stremio@f697c3bcf837899bc6efd34c0edbeb1a6fccd6bf/Backend/pyrofork/bot.py
-
curl -L -o bot.py https://huggingface.co/spaces/DevDoCode/stremio/resolve/f697c3bcf837899bc6efd34c0edbeb1a6fccd6bf/Backend/pyrofork/bot.py
751 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 | |
| ) | |
| Helper = Client( | |
| "helper", | |
| api_id=Telegram.API_ID, | |
| api_hash=Telegram.API_HASH, | |
| bot_token=Telegram.HELPER_BOT_TOKEN, | |
| sleep_threshold=20, | |
| workers=6, | |
| max_concurrent_transmissions=10 | |
| ) | |
| multi_clients = {} | |
| work_loads = {} | |
| client_dc_map = {} | |
| client_failures = {} # tracks cumulative chunk-fetch failures per client index | |
| client_avg_mbps = {} # rolling average MB/s per client (updated after each stream) | |