声明
本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口 等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!侵权头像头像私信联系名字wechat删除博客
部分python代码
cp = execjs.compile(open('token-列表.js','r',encoding='utf-8').read())
token = cp.call('getToken', ........)
print(token)
headers = {
"accept": "application/json",
"accept-language": "zh-CN,zh;q=0.9",
"cache-control": "no-cache",
"content-type": "application/json",
"phantom-token": token,
"currency": "HKD",
"locale": "zh-HK",
"x-ctx-wclient-req": wclient_req
}
url = "https://hk.trip.com/restapi/soa2/34951/fetchHotelList"
data = json.dumps(data, separators=(',', ':'))
response = requests.post(url, headers=headers, cookies=cookies, data=data)
print(response.text)
print(response)
cp = execjs.compile(open('token-列表.js','r',encoding='utf-8').read()) token = cp.call('getToken', ........) print(token) headers = { "accept": "application/json", "accept-language": "zh-CN,zh;q=0.9", "cache-control": "no-cache", "content-type": "application/json", "phantom-token": token, "currency": "HKD", "locale": "zh-HK", "x-ctx-wclient-req": wclient_req } url = "https://hk.trip.com/restapi/soa2/34951/fetchHotelList" data = json.dumps(data, separators=(',', ':')) response = requests.post(url, headers=headers, cookies=cookies, data=data) print(response.text) print(response)