更新 'SrcJyAliPublic.js'

main
src48597962 3 weeks ago
parent a961802331
commit 5e64b2eb62
  1. 15
      SrcJyAliPublic.js

@ -324,7 +324,6 @@ function getOpenToken(authorization) {
headers['authorization'] = authorization;
headers['x-canary'] = "client=web,app=adrive,version=v4.3.1";
function alistOpenApi(refresh_token) {
refresh_token ='eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzNDI2YWQ4ZWJhYTA0ZTFlYTllZTAxYmQ5OThkMDZkNCIsImF1ZCI6Ijc2OTE3Y2NjY2Q0NDQxYzM5NDU3YTA0ZjYwODRmYjJmIiwiZXhwIjoxNzQ2NTE3NDM2LCJpYXQiOjE3Mzg3NDE0MzYsImp0aSI6ImE3ODU2MDliOTQ5MTQ5Y2RiMDY3ZDQ0NWU0Zjc3YWVjIn0.L0wsQKyM0fGXnc2MsY-1QRk7bK1UJHWGpmeqa-fSVcWvO-wc6T7OxpFvgpPgO1ZYFq8LSsLxmk8fXHbOf9owTA';
let variable;
let data = {};
if (refresh_token) {
@ -336,17 +335,19 @@ function getOpenToken(authorization) {
log('1111');
} else {
log('2222');
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=', {
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=Ojo=&response_type=code', {
headers: headers,
body: {
"authorize": 1,
"scope": "user:base,file:all:read,file:all:write"
"scope": "user:base,file:all:read,file:all:write",
"drives": ["backup","resource"],
"folder": ""
},
method: 'POST',
timeout: 8000
}));
log(json);
let code = json.redirectUri.split("code=")[1];
let code = json.redirectUri.split("code=")[1].split("&state")[0];
data = { "code": code, "grant_type": "authorization_code" }
log(data);
variable = 0;
@ -354,10 +355,14 @@ function getOpenToken(authorization) {
let json2 = {};
try {
json2 = JSON.parse(request('https://api.xhofe.top/alist/ali_open/code', { body: data, method: 'POST', timeout: 8000 }));
log("api.xhofe.top");
log(json2);
} catch (e) {
json2 = JSON.parse(request('https://api-cf.nn.ci/alist/ali_open/token', { body: data, method: 'POST', timeout: 8000 }));
}
log("api-cf.nn.ci");
log(json2);
}
json2.variable = variable;
return json2;
}

Loading…
Cancel
Save