mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复dy部分问题
This commit is contained in:
parent
586fdfe10c
commit
dba801113e
@ -142,39 +142,17 @@ export class tools extends plugin {
|
||||
// const url = `https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=${ douId }`;
|
||||
// const url = `https://www.iesdouyin.com/aweme/v1/web/aweme/detail/?aweme_id=${ douId }&aid=1128&version_name=23.5.0&device_platform=android&os_version=2333`;
|
||||
// 感谢 Evil0ctal(https://github.com/Evil0ctal)提供的header 和 B1gM8c(https://github.com/B1gM8c)的逆向算法X-Bogus
|
||||
fetch("https://ttwid.bytedance.com/ttwid/union/register/", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
credentials: "include",
|
||||
body: JSON.stringify({
|
||||
region: "cn",
|
||||
aid: 1768,
|
||||
needFid: false,
|
||||
service: "www.ixigua.com",
|
||||
migrate_info: {
|
||||
ticket: "",
|
||||
source: "node",
|
||||
},
|
||||
cbUrlProtocol: "https",
|
||||
union: true,
|
||||
}),
|
||||
}).then(resp => {
|
||||
const ttwid = resp.headers.get("set-cookie");
|
||||
const odin_tt =
|
||||
"324fb4ea4a89c0c05827e18a1ed9cf9bf8a17f7705fcc793fec935b637867e2a5a9b8168c885554d029919117a18ba69";
|
||||
const passport_csrf_token = "f61602fc63757ae0e4fd9d6bdcee4810";
|
||||
const headers = {
|
||||
"User-Agent":
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
|
||||
referer: "https://www.douyin.com/",
|
||||
Cookie: `msToken=${generateRandomStr(
|
||||
107,
|
||||
)}; ttwid=${ttwid};odin_tt=${odin_tt}; passport_csrf_token=${passport_csrf_token}`,
|
||||
};
|
||||
'accept-encoding': 'gzip, deflate, br',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36',
|
||||
'referer': 'https://www.douyin.com/',
|
||||
'cookie': "s_v_web_id=verify_leytkxgn_kvO5kOmO_SdMs_4t1o_B5ml_BUqtWM1mP6BF;"
|
||||
}
|
||||
const dyApi = "https://www.douyin.com/aweme/v1/web/aweme/detail/?";
|
||||
const params = `aweme_id=${douId}&aid=1128&version_name=23.5.0&device_platform=android&os_version=2333`;
|
||||
const params = `msToken=${generateRandomStr(107)}&device_platform=webapp&aid=6383&channel=channel_pc_web&aweme_id=${douId}&pc_client_type=1&version_code=190500&version_name=19.5.0&cookie_enabled=true&screen_width=1344&screen_height=756&browser_language=zh-CN&browser_platform=Win32&browser_name=Firefox&browser_version=110.0&browser_online=true&engine_name=Gecko&engine_version=109.0&os_name=Windows&os_version=10&cpu_core_num=16&device_memory=&platform=PC&webid=7158288523463362079`;
|
||||
// xg参数
|
||||
const xbParam = getXB(params.replaceAll("&", "%26"));
|
||||
// const param = resp.data.result[0].paramsencode;
|
||||
const resDyApi = `${dyApi}${params}&X-Bogus=${xbParam}`;
|
||||
axios
|
||||
.get(resDyApi, {
|
||||
@ -221,7 +199,6 @@ export class tools extends plugin {
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user