作者 陈俊学

2.3.0

增加添加好朋友,需要确定参数
... ... @@ -4,5 +4,5 @@ SERVER:
reconnect_interval: 3
VERSION:
code: 119
name: 2.2.9
\ No newline at end of file
code: 120
name: 2.3.0
\ No newline at end of file
... ...
... ... @@ -147,7 +147,7 @@ class FacebookClient(Client):
res = self._payload_post('/ajax/messenger/context_banner/?profile_id=%s' % fbid, {'__user': self.uid})
return res
def addFriend(self, fbid, channel=1):
def addFriend(self, fbid, channel=1, **kwargs):
how_found = RequestSource.get(channel)
data = {
"to_friend": fbid,
... ... @@ -156,6 +156,7 @@ class FacebookClient(Client):
"logging_location": 'friends_center',
"floc": 'pymk'
}
data.update(kwargs)
if how_found == 'profile_friends':
data['ref_param'] = 'friends_tab'
try:
... ... @@ -1535,6 +1536,7 @@ class FacebookClient(Client):
'extragetparams': json.dumps({"__tn__": ",dm-R-R", "eid": rand})
}
res = self._get(f'/ajax/hovercard/user.php?id={fbid}', data)
return parse_html.hovercard_get_addfriend(res)
def groupMembers(self, group_id, next_url=None):
... ...