def xauth(self, username, password):
args = {
'x_auth_username': username,
'x_auth_password': password,
'x_auth_mode': 'client_auth'
}
resp = self.oauth_request(self.access_token_url, 'GET', args)
oauth_token = dict(parse.parse_qsl(resp.read().decode()))
return {'key': oauth_token['oauth_token'], 'secret': oauth_token['oauth_token_secret']}
评论列表
文章目录