forked from shamhi/XPointsMakerBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
34 lines (25 loc) · 883 Bytes
/
main.py
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
import asyncio
from config import settings
from config.settings import *
from core.registrator import *
from utils.launcher import *
from utils.logger import logger
async def main():
global user_data
global tasks
logger.warning(f"System | <y>Random wait "
f"{settings.WAIT_LOGIN[0]}-{settings.WAIT_LOGIN[1]} sec to authorization!</y>")
if not await get_session():
logger.error(f"Error load session...")
if not await get_proxies():
logger.error(f"Error load proxy...")
if not await get_user_agent():
logger.error(f"Error load user agent...")
tasks = [start(index) for index in range(user_data['count_user'])]
await asyncio.gather(*tasks)
if __name__ == "__main__":
try:
print(banner)
asyncio.run(main())
except KeyboardInterrupt:
logger.info("Bot stopped by user...")