def get_token():
headers = {
'Host': 'authorization.shanghaidisneyresort.com',
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
'X-NewRelic-ID': 'Uw4BWVZSGwICU1VRAgkH',
'X-Conversation-Id': 'shdrA5320488-E03F-4795-A818-286C658EEBB6',
'Accept': 'application/json',
'User-Agent': 'SHDR/4.1.1 (iPhone; iOS 9.3.5; Scale/2.00)',
'Accept-Language': 'zh-Hans-CN;q=1',
}
data = 'assertion_type=public&client_id=DPRD-SHDR.MOBILE.IOS-PROD&client_secret=&grant_type=assertion'
resp = requests.post('https://authorization.shanghaidisneyresort.com/curoauth/v1/token',
headers=headers, data=data)
resp.raise_for_status()
token = resp.json()['access_token']
return token
评论列表
文章目录