From 575b435fe1febbd1ca6f43b4535b93211013acda Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Tue, 5 Dec 2023 08:39:48 +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 | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/SrcJyAliPublic.js b/SrcJyAliPublic.js index 41355ac..8a7a6ff 100644 --- a/SrcJyAliPublic.js +++ b/SrcJyAliPublic.js @@ -251,26 +251,6 @@ function aliMyPlayUrl(file_id) { function aliOpenPlayUrl(file_id,sharedata) { try { - function getopentoken(authorization) { - headers['authorization'] = authorization; - headers['x-canary'] = "client=web,app=adrive,version=v4.3.1"; - //log(headers); - let data = {"authorize":1,"scope":"user:base,file:all:read,file:all:write"}; - let json = JSON.parse(request('https://open.aliyundrive.com/oauth/users/authorize?client_id=76917ccccd4441c39457a04f6084fb2f&redirect_uri=https://alist.nn.ci/tool/aliyundrive/callback&scope=user:base,file:all:read,file:all:write&state=', { headers: headers, body: data, method: 'POST', timeout: 8000 })); - let code = json.redirectUri.split("code=")[1]; - let data2 = {"code":code,"grant_type":"authorization_code"} - let json2; - //log(data2); - //json2 = JSON.parse(request('https://aliyundrive-oauth.messense.me/oauth/access_token', { body: data2, method: 'POST', timeout: 8000 })); - - try{ - json2 = JSON.parse(request('https://api-cf.nn.ci/alist/ali_open/code', { body: data2, method: 'POST', timeout: 8000 })); - } catch(e) { - json2 = JSON.parse(request('https://api.xhofe.top/alist/ali_open/code', { body: data2, method: 'POST', timeout: 8000 })); - } - log(json2); - return json2.access_token || ""; - } function fcopy(obj) { try { let json = JSON.parse(fetch('https://api.aliyundrive.com/adrive/v2/batch', { @@ -350,7 +330,7 @@ function aliOpenPlayUrl(file_id,sharedata) { if (aliopentoken && nowtime < (oldtime + 1 * 60 * 60 * 1000)) { opentoken = aliopentoken; } else { - opentoken = getopentoken(authorization); + opentoken = getOpenToken(authorization); putMyVar('aliopeninfo', opentoken); putMyVar('opentokenChecktime', nowtime + 'time'); }