请楼主不吝赐教,如何更换Cookies,除了流中更换API参数外,还有没有需要修改其它。
const userInfo = {
"cookies": "HWWAFSESTIME=1714389264938; HWWAFSESID=38f8a73d55891dca6f; openid=123456788d08d24cfe6d216a1715060877657; 0ab08166-73d7-42ac-a569-02ee6710ea63=0c155759d922d9eac7b8befe66243ae3"
}
if (typeof (msg.payload) === "object" && msg.payload.listInfo[0].vin) {
global.set("bydUserInfo", Object.assign(userInfo, msg.payload.listInfo[0]));
}
msg.headers = {"cookie":userInfo.cookies}
if (!global.get("bydUserInfo")) {
msg.url = `https://bydcloud.byd.com/wechat/getuserinfo?timeStamp=${Math.floor(Date.now())}&random=${global.uuid}`
return [msg, null];
} else {
msg.url = `https://bydcloud.byd.com/wechat/location?caridentifier=${global.get("bydUserInfo").vin}&timeStamp=${Math.floor(Date.now())}&random=${global.uuid}&longitude=0&latitude=0`
return [null, msg];
}
|