更新 'SrcJyAliDisk.js'

master
src48597962 1 year ago
parent a7a7b4efd3
commit 99990c4534
  1. 27
      SrcJyAliDisk.js

@ -608,21 +608,7 @@ function aliDiskSearch(input,data) {
}) })
return data; return data;
} }
function checkShareUrl(aliurl){
let html = request("https://api.aliyundrive.com/adrive/v3/share_link/get_share_by_anonymous",{
headers: {
referer: "https://www.aliyundrive.com/"
},
body: {
"share_id": aliurl.replace('https://www.aliyundrive.com/s/', '').split('/folder/')[0]
},
method: 'POST',
timeout: 3000
})
let infos = JSON.parse(html).file_infos || [];
return infos.length;
}
//多线程执行代码 //多线程执行代码
let task = function(obj) { let task = function(obj) {
try{ try{
@ -635,6 +621,7 @@ function aliDiskSearch(input,data) {
} }
let searchlist = []; let searchlist = [];
let checklist = [];
datalist2.forEach(item => { datalist2.forEach(item => {
let arr = { let arr = {
title: item.title, title: item.title,
@ -668,23 +655,23 @@ function aliDiskSearch(input,data) {
} }
} }
if(surl.indexOf(alihome)>-1){ if(surl.indexOf(alihome)>-1){
/*
if(item.check){ if(item.check){
arr.url = surl.split('\n')[0];
} checklist.push(arr);
*/ }else{
if(checkShareUrl(surl)){
arr.url = $(surl.split('\n')[0]).rule((input) => { arr.url = $(surl.split('\n')[0]).rule((input) => {
require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/','/master/') + 'SrcJyAliDisk.js'); require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/','/master/') + 'SrcJyAliDisk.js');
aliShareUrl(input); aliShareUrl(input);
},surl); },surl);
searchlist.push(arr); searchlist.push(arr);
} }
} }
} }
} }
}) })
if(checklist.length){
searchlist = checkShare(checklist);
}
if(searchlist.length>0){ if(searchlist.length>0){
hideLoading(); hideLoading();
diskMark[input] = diskMark[input] || []; diskMark[input] = diskMark[input] || [];

Loading…
Cancel
Save