某个快递网站有即时报价工具,可以在网站上面输入出发地邮编和目的地邮编,重量等信息,然后点击 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\":\"user@icloud.com\",\"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"
});
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.