作者 陈俊学

2.1.6

关闭服务器change登录方式
@@ -4,5 +4,5 @@ SERVER: @@ -4,5 +4,5 @@ SERVER:
4 reconnect_interval: 3 4 reconnect_interval: 3
5 5
6 VERSION: 6 VERSION:
7 - code: 105  
8 - name: 2.1.5  
  7 + code: 106
  8 + name: 2.1.6
@@ -77,34 +77,34 @@ class Monitor(callback.CallBack): @@ -77,34 +77,34 @@ class Monitor(callback.CallBack):
77 cfunc = functools.partial(mfunc, client) 77 cfunc = functools.partial(mfunc, client)
78 setattr(client, fname, cfunc) 78 setattr(client, fname, cfunc)
79 79
80 - def change(self, email, password, cookie=None):  
81 - limit = 100  
82 - if self.size >= limit:  
83 - raise Exception("单台终端登录到达上限,%d个号" % limit)  
84 - client = self._get_member(email)  
85 - if client:  
86 - self.onLoggedIn(client)  
87 - return client.info()  
88 - else:  
89 - try:  
90 - if email in self.change_list:  
91 - self.onChangEnv(email, 'changeError', f'{email}已经在登录队列中')  
92 - return  
93 - else:  
94 - self.change_list.append(email)  
95 - self.onChangEnv(email, 'waiting', '队列中...')  
96 - self.changeLock.acquire()  
97 - self.changeingIn(email) # 转环境的话清理缓存  
98 - result, email, password, cookie, user_agent = self.selenium_login(email, password, cookie)  
99 - if result:  
100 - self.onChangSucceed(email, '匹配设备指纹成功',  
101 - data={'email': email, 'password': password, 'cookie': cookie})  
102 - except Exception as err:  
103 - self.onChangEnv(email, 'changeError', str(err))  
104 - raise err  
105 - finally:  
106 - self.change_list.remove(email)  
107 - self.changeLock.release() 80 + # def change(self, email, password, cookie=None):
  81 + # limit = 100
  82 + # if self.size >= limit:
  83 + # raise Exception("单台终端登录到达上限,%d个号" % limit)
  84 + # client = self._get_member(email)
  85 + # if client:
  86 + # self.onLoggedIn(client)
  87 + # return client.info()
  88 + # else:
  89 + # try:
  90 + # if email in self.change_list:
  91 + # self.onChangEnv(email, 'changeError', f'{email}已经在登录队列中')
  92 + # return
  93 + # else:
  94 + # self.change_list.append(email)
  95 + # self.onChangEnv(email, 'waiting', '队列中...')
  96 + # self.changeLock.acquire()
  97 + # self.changeingIn(email) # 转环境的话清理缓存
  98 + # result, email, password, cookie, user_agent = self.selenium_login(email, password, cookie)
  99 + # if result:
  100 + # self.onChangSucceed(email, '匹配设备指纹成功',
  101 + # data={'email': email, 'password': password, 'cookie': cookie})
  102 + # except Exception as err:
  103 + # self.onChangEnv(email, 'changeError', str(err))
  104 + # raise err
  105 + # finally:
  106 + # self.change_list.remove(email)
  107 + # self.changeLock.release()
108 108
109 def login(self, email, password, cookie=None, user_agent=None, proxy=None): 109 def login(self, email, password, cookie=None, user_agent=None, proxy=None):
110 limit = 100 110 limit = 100