|
...
|
...
|
@@ -6,9 +6,11 @@ |
|
|
|
# @Software: PyCharm
|
|
|
|
import functools
|
|
|
|
import logging
|
|
|
|
import threading
|
|
|
|
import time
|
|
|
|
import uuid
|
|
|
|
from concurrent.futures import ThreadPoolExecutor
|
|
|
|
from threading import Timer
|
|
|
|
|
|
|
|
from munch import Munch
|
|
|
|
|
|
...
|
...
|
@@ -43,13 +45,17 @@ class Monitor(callback.CallBack): |
|
|
|
self._socket = socket
|
|
|
|
Config.set('host', self._socket.ws_url)
|
|
|
|
|
|
|
|
def go_login(self):
|
|
|
|
threading.Thread(target=self._auto_login,args=()).start()
|
|
|
|
|
|
|
|
def _auto_login(self):
|
|
|
|
user_list = UserList.query(status=Status.ONLINE)
|
|
|
|
for user in user_list:
|
|
|
|
print("执行登录", user)
|
|
|
|
self.login(user.email, user.password, user.format_cookie())
|
|
|
|
print("自动登录->", user)
|
|
|
|
self.login(user.email, user.password, user.format_cookie(), user.user_agent)
|
|
|
|
time.sleep(0.2)
|
|
|
|
|
|
|
|
|
|
|
|
def _replace_call(self, client):
|
|
|
|
funcs = [x for x in dir(self) if x.startswith("on")]
|
|
|
|
for fname in funcs:
|
...
|
...
|
|