更新 'SrcJyAliPublic.js'

main
src48597962 2 years ago
parent 0146d42d34
commit 91c418c2f2
  1. 17
      SrcJyAliPublic.js

@ -151,7 +151,7 @@ function getAliUrl(share_id, file_id, share_pwd) {
let sharetoken = JSON.parse(request('https://api.aliyundrive.com/v2/share_link/get_share_token', { body: { "share_pwd": share_pwd, "share_id": share_id }, method: 'POST', timeout: 3000 })).share_token;
let openUrl = aliOpenPlayUrl(file_id,{sharetoken:sharetoken,share_id:share_id});
if(openUrl){
urls.push(openUrl + "#.m3u8#pre#");
urls.push(openUrl + "#isVideo=true##pre#");
names.push("原始 画质");
heads.push({ 'Referer': 'https://www.aliyundrive.com/' });
}else{
@ -180,7 +180,6 @@ function getAliUrl(share_id, file_id, share_pwd) {
return {};
}
}
function getSubtitle(share_id,sub_file_id,share_pwd){
try{
share_pwd = share_pwd&&share_pwd.length==4?share_pwd:"";
@ -224,7 +223,7 @@ function aliMyPlayUrl(file_id) {
let heads = [];
if (aliyunUrl.length > 0) {
aliyunUrl.forEach((item) => {
urls.push(item.url + "#pre#");
urls.push(item.url + "#isVideo=true##pre#");
names.push(transcoding[item.template_id] ? transcoding[item.template_id] : item.template_height);
heads.push({ 'Referer': 'https://www.aliyundrive.com/' });
})
@ -269,7 +268,7 @@ function aliOpenPlayUrl(file_id,sharedata) {
}
function copy(obj) {
try {
let json = fetch('https://api.aliyundrive.com/adrive/v2/batch', {
let json = JSON.parse(fetch('https://api.aliyundrive.com/adrive/v2/batch', {
headers: {
'User-Agent': PC_UA,
'Referer': 'https://www.aliyundrive.com/',
@ -291,8 +290,11 @@ function aliOpenPlayUrl(file_id,sharedata) {
"resource": "file"
},
method: 'POST'
});
return JSON.parse(json).responses[0].body.file_id;
})).responses[0].body;
if(/size/.test(json.message)){
log('云盘没有空间,无法操作转存');
}
return json.file_id;
} catch (e) {
return "";
}
@ -330,6 +332,9 @@ function aliOpenPlayUrl(file_id,sharedata) {
sharedata.drive_id = drive_id;
sharedata.authorization = authorization;
newfile_id = copy(sharedata);
if(!newfile_id){
return "";
}
}
let opentoken;
let nowtime = Date.now();

Loading…
Cancel
Save