Added remove friend def
This commit is contained in:
@@ -468,30 +468,14 @@ class Client(object):
|
|||||||
"""
|
"""
|
||||||
END DEFAULT THREAD METHODS
|
END DEFAULT THREAD METHODS
|
||||||
"""
|
"""
|
||||||
def removefriend(self, friend_id=None):
|
def removeFriend(self, friend_id=None):
|
||||||
r = self._get(self.req_url.REMOVE_FRIENDFIRST + friend_id)
|
:param friend_id: The id of the friend that you want to remove
|
||||||
soup = bs(r.text, "lxml")
|
payload = {
|
||||||
fb_dtsg_value = soup.find('input', {'name': 'fb_dtsg'}).get('value')
|
"friend_id": friend_id,
|
||||||
print self._session.cookies.get_dict().get('c_user')
|
"unref": "none",
|
||||||
print self._session.cookies.get_dict().get('xs')
|
"confirm": "Confirm",
|
||||||
payload = [
|
}
|
||||||
{
|
r = self._post(self.req_url.REMOVE_FRIEND,payload)
|
||||||
"name": "fb_dtsg",
|
|
||||||
"value": fb_dtsg_value
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "friend_id",
|
|
||||||
"value": friend_id
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "unref",
|
|
||||||
"value": "none"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "confirm",
|
|
||||||
"value": "Confirm"
|
|
||||||
}]
|
|
||||||
r = self._post(self.req_url.REMOVE_FRIENDSECOND,payload)
|
|
||||||
return r.ok
|
return r.ok
|
||||||
"""
|
"""
|
||||||
FETCH METHODS
|
FETCH METHODS
|
||||||
|
Reference in New Issue
Block a user