|
|
@ -357,6 +357,8 @@ function alistUrl(alistapi,path,sign,subtitle,provider) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(provider=="AliyundriveShare"){ |
|
|
|
if(provider=="AliyundriveShare"){ |
|
|
|
|
|
|
|
function getAliUrl(url,alitoken,subtitle){ |
|
|
|
|
|
|
|
try{ |
|
|
|
function getNowTime() { |
|
|
|
function getNowTime() { |
|
|
|
const yy = new Date().getFullYear() |
|
|
|
const yy = new Date().getFullYear() |
|
|
|
const MM = (new Date().getMonth() + 1) < 10 ? '0' + (new Date().getMonth() + 1) : (new Date().getMonth() + 1) |
|
|
|
const MM = (new Date().getMonth() + 1) < 10 ? '0' + (new Date().getMonth() + 1) : (new Date().getMonth() + 1) |
|
|
@ -365,7 +367,6 @@ function alistUrl(alistapi,path,sign,subtitle,provider) { |
|
|
|
const mm = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes() |
|
|
|
const mm = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes() |
|
|
|
return yy + '' + dd + '' + HH + '' + MM + '' + mm |
|
|
|
return yy + '' + dd + '' + HH + '' + MM + '' + mm |
|
|
|
} |
|
|
|
} |
|
|
|
try{ |
|
|
|
|
|
|
|
let redirect = JSON.parse(request(url,{onlyHeaders:true,redirect:false,timeout:3000})); |
|
|
|
let redirect = JSON.parse(request(url,{onlyHeaders:true,redirect:false,timeout:3000})); |
|
|
|
let rurl = redirect.headers.location[0]; |
|
|
|
let rurl = redirect.headers.location[0]; |
|
|
|
let share_id = rurl.split('&sl=')[1].split('&')[0]; |
|
|
|
let share_id = rurl.split('&sl=')[1].split('&')[0]; |
|
|
@ -378,7 +379,7 @@ function alistUrl(alistapi,path,sign,subtitle,provider) { |
|
|
|
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.41", |
|
|
|
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.41", |
|
|
|
"x-canary": "client=web,app=adrive,version=v3.1.0" |
|
|
|
"x-canary": "client=web,app=adrive,version=v3.1.0" |
|
|
|
}; |
|
|
|
}; |
|
|
|
let alitoken = alistconfig.alitoken; |
|
|
|
//let alitoken = alistconfig.alitoken;
|
|
|
|
let userinfo = JSON.parse(request('https://auth.aliyundrive.com/v2/account/token',{headers:headers,body:{"refresh_token":alitoken,"grant_type":"refresh_token"},method:'POST',timeout:3000})); |
|
|
|
let userinfo = JSON.parse(request('https://auth.aliyundrive.com/v2/account/token',{headers:headers,body:{"refresh_token":alitoken,"grant_type":"refresh_token"},method:'POST',timeout:3000})); |
|
|
|
let authorization = 'Bearer '+userinfo.access_token; |
|
|
|
let authorization = 'Bearer '+userinfo.access_token; |
|
|
|
let userId = userinfo.user_id; |
|
|
|
let userId = userinfo.user_id; |
|
|
@ -434,6 +435,8 @@ function alistUrl(alistapi,path,sign,subtitle,provider) { |
|
|
|
}catch(e){ |
|
|
|
}catch(e){ |
|
|
|
log('获取共享链接播放地址失败>'+e.message); |
|
|
|
log('获取共享链接播放地址失败>'+e.message); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
getAliUrl(url,alistconfig.alitoken,subtitle); |
|
|
|
} |
|
|
|
} |
|
|
|
url = url + (music.test(suffix)?"#isMusic=true#":"#isVideo=true#") + (url.indexOf('baidu.com')>-1? ';{User-Agent@Lavf/57.83.100}':''); |
|
|
|
url = url + (music.test(suffix)?"#isMusic=true#":"#isVideo=true#") + (url.indexOf('baidu.com')>-1? ';{User-Agent@Lavf/57.83.100}':''); |
|
|
|
if(!subtitle){ |
|
|
|
if(!subtitle){ |
|
|
|