diff --git a/conf/config.yaml b/conf/config.yaml index 27bd08d..fca9aa4 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -4,5 +4,5 @@ SERVER: reconnect_interval: 3 VERSION: - code: 113 - name: 2.2.3 \ No newline at end of file + code: 114 + name: 2.2.4 \ No newline at end of file diff --git a/core/callback.py b/core/callback.py index b3b7dcd..0ea4a72 100644 --- a/core/callback.py +++ b/core/callback.py @@ -54,7 +54,10 @@ class CallBack(): models.UserList.remove(email=user_obj.email) return - def onLoggingIn(self, email, password, cookie, user_agent=None, proxy=None): + def onLoggingIn(self, email, password, cookie, user_agent=None, proxy=None, clear: bool = False): + if clear: + print('清理缓存登录', email) + models.UserList.remove(email=email) user_obj = models.UserList.get(email=email) if not user_obj: print('初次登录') diff --git a/core/monitor.py b/core/monitor.py index b421ff9..9469b13 100644 --- a/core/monitor.py +++ b/core/monitor.py @@ -106,7 +106,7 @@ class Monitor(callback.CallBack): # self.change_list.remove(email) # self.changeLock.release() - def login(self, email, password, cookie=None, user_agent=None, proxy=None): + def login(self, email, password, cookie=None, user_agent=None, proxy=None, clear: bool = False): limit = 100 if self.size >= limit: raise Exception("单台终端登录到达上限,%d个号" % limit) @@ -117,7 +117,7 @@ class Monitor(callback.CallBack): else: if user_agent is None or user_agent == '': 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' - obj = self.onLoggingIn(email, password, cookie, user_agent, proxy) + obj = self.onLoggingIn(email, password, cookie, user_agent, proxy, clear) try: client = FacebookClient(obj, logout_call=functools.partial(self.logout, obj.email), logging_level=logging.INFO) diff --git a/lib/facebook.py b/lib/facebook.py index b0bd7c4..1d96769 100644 --- a/lib/facebook.py +++ b/lib/facebook.py @@ -1961,7 +1961,13 @@ class FacebookClient(Client): res = self.graphql_api('ProfileOverviewContainerQuery', '3218725658179182', data) return res['data']['user']['timeline_feed_units'] - ###############graph接口 start ############## + def AllPhotosAppCollectionPagelet(self, cursor=None): + """ + 你的照片 + """ + #如果cursor为None,则请求 https://www.facebook.com/ana.sofia.583671/photos_all 获取到 + return + ###############graph接口 start ############## def checkVaild(self): try: