某个快递网站有即时报价工具,可以在网站上面输入出发地邮编和目的地邮编,重量等信息,然后点击 reCAPTCHA 验证,即可获取报价。现在我们想从我们自己的软件查询报价,我把 fetch 请求复制下来,从 POSTMAN 发起,结果不出所料返回 403 。
想请问下,这种情况是不是直接跑路还是有啥办法呢?
fetch("https://api.example.com/getaquote/rate", {
"headers": {
"accept": "application/json, text/plain, */*",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/json;charset=UTF-8",
"sec-ch-ua": "\"Chromium\";v=\"106\", \"Google Chrome\";v=\"106\", \"Not;A=Brand\";v=\"99\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-site"
},
"referrer": "https://www.example.com/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": "{\"email\":\"[email protected]\",\"origin\":{\"city\":\"Lawrenceville\",\"state\":\"GA\",\"zip\":\"30046\",\"country\":\"USA\"},\"destination\":{\"city\":\"Cy Of Industry\",\"state\":\"CA\",\"zip\":\"91748\",\"country\":\"USA\"},\"freightClass\":\"110\",\"totalWeightInLbs\":\"500\",\"pickupDate\":\"2022-10-19T16:00:00.000Z\",\"recaptchaResponse\":\"xxxxxxxxxxxxx\",\"guid\":\"xxxxxxxxx\",\"utmSource\":\"\",\"utmMedium\":\"\"}",
"method": "POST",
"mode": "cors",
"credentials": "omit"
});