人人的cookie的存储
from http import cookiejar
from urllib import request,parse
from interface_all import save_cookie
import json
url = 'http://www.renren.com/ajaxLogin/login?1=1&uniqueTimestamp=2018721441132'
data = {
'email': '13520523544',
'icode': '',
'origURL': 'http://www.renren.com/home',
'domain': 'renren.com',
'key_id': '1',
'captcha_type': 'web_login',
'password': '7628817eceea08d4081ec1b8f668185d1598a3acf540275f6145106f1c28131d',
'rkey': '2733a16c7ad04b52c15f8c5e4020029b',
'f': 'http%3A%2F%2Fwww.renren.com%2F967453448',
}
data_byts = parse.urlencode(data).encode('utf-8')
s = save_cookie()
response = s.post(url,data)
res = response.decode('utf-8')
result = json.loads(res)
r1 = s.get(result['homeUrl'])
print(res)
print(r1.decode('utf-8'))