From 13decabc95999525c2e6a8f22b276818acf22702 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Tue, 25 Jul 2023 18:39:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyAliPublic.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyAliPublic.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SrcJyAliPublic.js b/SrcJyAliPublic.js index 8f3e2bf7..5fca3dcc 100644 --- a/SrcJyAliPublic.js +++ b/SrcJyAliPublic.js @@ -143,7 +143,7 @@ function aliOpenPlayUrl(file_id,sharedata) { } return json2.access_token || ""; } - function copy(obj) { + function fcopy(obj) { try { let json = JSON.parse(fetch('https://api.aliyundrive.com/adrive/v2/batch', { headers: { @@ -177,7 +177,7 @@ function aliOpenPlayUrl(file_id,sharedata) { return ""; } }; - function del(obj) { + function fdel(obj) { fetch('https://api.aliyundrive.com/adrive/v2/batch', { headers: { 'User-Agent': PC_UA, @@ -209,7 +209,7 @@ function aliOpenPlayUrl(file_id,sharedata) { sharedata.file_id = file_id; sharedata.drive_id = drive_id; sharedata.authorization = authorization; - newfile_id = copy(sharedata); + newfile_id = fcopy(sharedata); if(!newfile_id){ return ""; } @@ -228,9 +228,10 @@ function aliOpenPlayUrl(file_id,sharedata) { headers['authorization'] = 'Bearer ' + opentoken; let data3 = {"drive_id":drive_id,"file_id":newfile_id||file_id} let json3 = JSON.parse(request('https://open.aliyundrive.com/adrive/v1.0/openFile/getDownloadUrl', { headers: headers, body: data3, method: 'POST', timeout: 3000 })); + log(json3); if (newfile_id) { sharedata.file_id = newfile_id; - del(sharedata); + fdel(sharedata); } return json3.url || ""; } catch (e) {