def prelogin(self):
data = {'username': self.username,
'token': self.token,
'functionName': 'preLogin',
'uuid': UUID,
'request': {'osVersion': 'windows', 'deviceType': 'pc', 'clientVersion': '1.0'},
}
headers = {'UUID': UUID, 'account_type': ACCOUNT_TYPE,
'Content-Type': 'data/gzencode and rsa public encrypt;charset=UTF-8'
}
# ??
post_data = gzencode(json.dumps(data))
# ??
post_data = encrypt(post_data)
resp = requests.post(LOGIN_URL, data=post_data, headers=headers)
ret = json.loads(gzdecode(resp.content[8:]))
print 'prelogin:', ret
评论列表
文章目录