From 14c07ed2f07221872e21c9c6782e2af1c41da6bf Mon Sep 17 00:00:00 2001 From: chenjunxue <1523825571@qq.com> Date: Mon, 1 Mar 2021 10:56:36 +0800 Subject: [PATCH] 5.1.7 1.增加查询帐号广告偏好接口 --- conf/config.yaml | 4 ++-- lib/facebook.py | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/conf/config.yaml b/conf/config.yaml index 6883945..9a7f5af 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -5,5 +5,5 @@ SERVER: control: http://fbchat.xyz:39002/api/terminal mark: ntkj VERSION: - code: 516 - name: 5.1.6 \ No newline at end of file + code: 517 + name: 5.1.7 \ No newline at end of file diff --git a/lib/facebook.py b/lib/facebook.py index 2c26102..08e03b8 100644 --- a/lib/facebook.py +++ b/lib/facebook.py @@ -2150,6 +2150,14 @@ class FacebookClient(Client): # except: # return {'success': False, "data": res['errors'][0]['description']} + def AdPreferencesProfileRelationshipStatusRowQuery(self): + """ + 查询广告偏好 + """ + var = {} + res = self.graphql_api('AdPreferencesInterestCategoriesPageQuery', '2916949545027630', var) + return self.f_res(res) + def FriendingCometFriendRequestsPanelPaginationQuery(self, cursor: str = "", details: bool = False): """获取好友请求""" var = {"count": 10, "cursor": cursor, "scale": 2} @@ -3228,7 +3236,9 @@ class FacebookClient(Client): # 帖子是否可以点赞 try: is_react = \ - edge['node']['comet_sections']['feedback']['story']['feedback_context']['feedback_target_with_context']['comet_ufi_summary_and_actions_renderer']['feedback']['can_viewer_react'] + edge['node']['comet_sections']['feedback']['story']['feedback_context'][ + 'feedback_target_with_context']['comet_ufi_summary_and_actions_renderer']['feedback'][ + 'can_viewer_react'] except: is_react = None node['text'] = text -- libgit2 0.24.0