網址 https://jobs.jnj.com/apply/17...
#
hed={
'Accept':'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding':'gzip, deflate, br',
'Accept-Language':'zh-CN,zh;q=0.8',
'Connection':'keep-alive',
'Content-Type':'application/json; charset=UTF-8',
'Cookie':'fsr.r={"d":90,"i":"d445cf0-83485980-db18-f9ef-2a23d","e":1493111295590}; survey_cx=1; _ga=GA1.2.2063062824.1491810947; __atuvc=12%7C15%2C1%7C16; aui=undefined; pjuid=XXXXXXXXX%40qq.com; session_id=b87db789-5a01-4282-a8d8-1ab488243c6c; _ga=GA1.3.2063062824.1491810947; _janalytics_id.25ab=77683f5d-3bdd-475a-85db-1f2fe2d886d6.1491810985.21.1493019790.1493015356.db055a7d-2148-4142-8033-f42016d19136; _janalytics_ses.25ab=*; jrasession=a37d1ff7-c655-4d28-aac6-13d02b96364d; msid=7931948b-7eb3-4d16-8c18-11b985383059; i18n=zh-CN; jasession=s%3Amca76N35xpszvFHwc-IIys4yFsEf5rCB.eqhOpE0uHYgPRfMzbyRwFPUHbM9nmW7tjzMzzLvAg6g; mp_55bff8dc262c60239ef050f320f194cc_mixpanel=%7B%22distinct_id%22%3A%20%2215b56dd0e751db-07cf638be06fea-4e45062e-100200-15b56dd0e764f%22%2C%22%24initial_referrer%22%3A%20%22http%3A%2F%2Fwww.careers.jnj.com%2Fzh-hans%22%2C%22%24initial_referring_domain%22%3A%20%22www.careers.jnj.com%22%7D; mp_mixpanel__c=0',
'Host':'jobs.jnj.com',
'Origin':'https://jobs.jnj.com',
'Referer':'https://jobs.jnj.com/apply/1700160876W/login',
'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36',
'X-Requested-With':'XMLHttpRequest'
}
url="https://jobs.jnj.com/mirror_event"
data={"event":"accept","sync_id":"8f318696-db4c-4acf-a422-91269a4bd7b0","inputs":{}}
html=requests.post(url=url,headers=hed,data=json.dumps(data))
print ("!!!!!!!",html.text)
print (html.status_code)
回傳結果是:
!!!!!!! {"session":"COMPLETE","sync_id":"a23fbaa2-2d1f-4309-8a12-34c740bd93cd","redirect_to":"https://jobs.jnj.com/mirror/session/success?user_id=XXXXXXXXXX%40qq.com&username=XXXXXXXXX%40qq.com"}
200
求解怎麼才能得到如圖回傳值: