|
@@ -106,7 +106,7 @@ class Monitor(callback.CallBack): |
|
@@ -106,7 +106,7 @@ class Monitor(callback.CallBack): |
|
106
|
# self.change_list.remove(email)
|
106
|
# self.change_list.remove(email)
|
|
107
|
# self.changeLock.release()
|
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, clear: bool = False):
|
|
110
|
limit = 100
|
110
|
limit = 100
|
|
111
|
if self.size >= limit:
|
111
|
if self.size >= limit:
|
|
112
|
raise Exception("单台终端登录到达上限,%d个号" % limit)
|
112
|
raise Exception("单台终端登录到达上限,%d个号" % limit)
|
|
@@ -117,7 +117,7 @@ class Monitor(callback.CallBack): |
|
@@ -117,7 +117,7 @@ class Monitor(callback.CallBack): |
|
117
|
else:
|
117
|
else:
|
|
118
|
if user_agent is None or user_agent == '':
|
118
|
if user_agent is None or user_agent == '':
|
|
119
|
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36'
|
119
|
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36'
|
|
120
|
- obj = self.onLoggingIn(email, password, cookie, user_agent, proxy)
|
120
|
+ obj = self.onLoggingIn(email, password, cookie, user_agent, proxy, clear)
|
|
121
|
try:
|
121
|
try:
|
|
122
|
client = FacebookClient(obj, logout_call=functools.partial(self.logout, obj.email),
|
122
|
client = FacebookClient(obj, logout_call=functools.partial(self.logout, obj.email),
|
|
123
|
logging_level=logging.INFO)
|
123
|
logging_level=logging.INFO)
|