From bc13636cbf427ac0a367afa588ae2290b2af470f Mon Sep 17 00:00:00 2001 From: Hmjz100 <98228280+hmjz100@users.noreply.github.com> Date: Fri, 2 Jan 2026 23:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=A4=B8=E5=85=8B?= =?UTF-8?q?=E7=BD=91=E7=9B=98=E7=AD=89=E8=AF=B7=E6=B1=82=E5=A4=B4=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- (改)网盘直链下载助手.user.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/(改)网盘直链下载助手.user.js b/(改)网盘直链下载助手.user.js index 867daa0..35ea649 100644 --- a/(改)网盘直链下载助手.user.js +++ b/(改)网盘直链下载助手.user.js @@ -5344,7 +5344,7 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$ base.showMainDialog(config.base.dom.button[temp.mode].title, base.generateDom(temp.links), config.base.dom.button[temp.mode].footer); }, async getFileUrlByOnce(d, f) { - let res = await base.post(config.$aliyun.api.getLink, { drive_id: d, file_id: f }, { "Authorization": `${base.getStorage("token").token_type} ${base.getStorage("token").access_token}`, "X-Canary": "client=windows,app=adrive,version=v6.0.0" }); + let res = await base.post(config.$aliyun.api.getLink, { drive_id: d, file_id: f }, { "Content-Type": "application/json", "Authorization": `${base.getStorage("token").token_type} ${base.getStorage("token").access_token}`, "X-Canary": "client=windows,app=adrive,version=v6.0.0" }); if (res.code == "AccessTokenInvalid") { return message.error("提示:
访问令牌过期了,请刷新网页后再试"); } @@ -6956,7 +6956,7 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$ let batch = selectList.slice(i, i + batchSize); let fids = batch.map(item => item.fid); // 发起请求获取链接 - let res = await base.post(config.$quark.api.getLink, { "fids": fids }, { "User-Agent": config.$quark.api.ua.downloadLink }); + let res = await base.post(config.$quark.api.getLink, { "fids": fids }, { "Content-Type": "application/json", "User-Agent": config.$quark.api.ua.downloadLink }); if (res?.code == 31001) { return message.error("提示:
请先登录网盘~
代码:" + res.code); } else if (res?.code == 23018) { @@ -7008,7 +7008,7 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$ let fids = batch.map(item => item.fid); let fids_token = batch.map(item => item.share_fid_token); // 发起请求获取链接 - let res = await base.post(config.$quark.api.getLink, { "fids": fids, "fids_token": fids_token, pwd_id, "stoken": batch[0].stoken }, { "User-Agent": config.$quark.api.ua.downloadLink }); + let res = await base.post(config.$quark.api.getLink, { "fids": fids, "fids_token": fids_token, pwd_id, "stoken": batch[0].stoken }, { "Content-Type": "application/json", "User-Agent": config.$quark.api.ua.downloadLink }); if (res?.code == 31001) { return message.error("提示:
请先登录网盘~
代码:" + res.code); } else if (res?.code == 23018) { @@ -7380,7 +7380,7 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$ let batch = selectList.slice(i, i + batchSize); let fids = batch.map(item => item.fid); // 发起请求获取链接 - let res = await base.post(config.$uc.api.getLink, { "fids": fids }, { "User-Agent": config.$uc.api.ua.downloadLink }); + let res = await base.post(config.$uc.api.getLink, { "fids": fids }, { "Content-Type": "application/json", "User-Agent": config.$uc.api.ua.downloadLink }); if (res?.code == 31001) { return message.error("提示:
请先登录网盘~
代码:" + res.code); } else if (res?.code == 23018) { @@ -7432,7 +7432,7 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$ let fids = batch.map(item => item.fid); let fids_token = batch.map(item => item.share_fid_token); // 发起请求获取链接 - let res = await base.post(config.$uc.api.getLink, { "fids": fids, "fids_token": fids_token, pwd_id, "stoken": batch[0].stoken }, { "User-Agent": config.$uc.api.ua.downloadLink }); + let res = await base.post(config.$uc.api.getLink, { "fids": fids, "fids_token": fids_token, pwd_id, "stoken": batch[0].stoken }, { "Content-Type": "application/json", "User-Agent": config.$uc.api.ua.downloadLink }); if (res?.code == 31001) { return message.error("提示:
请先登录网盘~
代码:" + res.code); } else if (res?.code == 23018) { @@ -7930,9 +7930,9 @@ a.downloadSubtitle:disabled, button.downloadSubtitle:disabled{background-color:$ async getFileUrlByOnce(item, index, token, ShareKey) { let res = null; if (ShareKey) { - res = await base.post(config.$123pan.api.getShareLink, { "ShareKey": ShareKey, "FileID": item.FileId, "S3keyFlag": item.S3KeyFlag, "Size": item.Size, "Etag": item.Etag }, { "Authorization": `Bearer ${token}`, "Platform": "ios" }); + res = await base.post(config.$123pan.api.getShareLink, { "ShareKey": ShareKey, "FileID": item.FileId, "S3keyFlag": item.S3KeyFlag, "Size": item.Size, "Etag": item.Etag }, { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, "Platform": "ios" }); } else { - res = await base.post(config.$123pan.api.getLink, { "driveId": 0, "etag": item.Etag, "fileId": item.FileId, "s3keyFlag": item.S3KeyFlag, "type": item.Type, "fileName": item.FileName, "size": item.Size }, { "Authorization": `Bearer ${token}`, "Platform": "ios" }); + res = await base.post(config.$123pan.api.getLink, { "driveId": 0, "etag": item.Etag, "fileId": item.FileId, "s3keyFlag": item.S3KeyFlag, "type": item.Type, "fileName": item.FileName, "size": item.Size }, { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, "Platform": "ios" }); } if (res.data?.DownloadUrl || res.data?.DownloadURL) { let url = res.data.DownloadUrl ? res.data.DownloadUrl : res.data?.DownloadURL;