|
|
|
@ -339,51 +339,58 @@ function SRCSet() { |
|
|
|
|
putMyVar("批量检测_线程开始", "1"); |
|
|
|
|
deleteItem("recheckSource"); |
|
|
|
|
|
|
|
|
|
let duoselect = getMyVar("批量检测_复检模式")?storage0.getMyVar("failSourceList"):storage0.getMyVar('SrcJu_duoselect') || []; |
|
|
|
|
//let duoselect = getMyVar("批量检测_复检模式")?storage0.getMyVar("failSourceList"):storage0.getMyVar('SrcJu_duoselect') || [];
|
|
|
|
|
require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJyPublic.js'); |
|
|
|
|
require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJyData.js'); |
|
|
|
|
let task = function (data) { |
|
|
|
|
let error = 0; |
|
|
|
|
let error = {}; |
|
|
|
|
let desc = ''; |
|
|
|
|
let ername, erurl; |
|
|
|
|
if(!data.onlysearch){ |
|
|
|
|
let yidata = getYiData(data, 1); |
|
|
|
|
if(yidata.fllists && yidata.fllists.length>0){ |
|
|
|
|
desc = "主页分类获取正常 "; |
|
|
|
|
}else{ |
|
|
|
|
desc = "主页分类获取失败 "; |
|
|
|
|
} |
|
|
|
|
if(yidata.vodlists && yidata.vodlists.length>1){ |
|
|
|
|
desc += "一级列表获取正常"; |
|
|
|
|
erurl = yidata.vodlists[0].vod_url; |
|
|
|
|
ername = yidata.vodlists[0].vod_name; |
|
|
|
|
if(yidata.vodlists && yidata.vodlists.length>1){ |
|
|
|
|
erurl = yidata.vodlists[0].vod_url; |
|
|
|
|
ername = yidata.vodlists[0].vod_name; |
|
|
|
|
desc += "一级列表检测正常"; |
|
|
|
|
}else{ |
|
|
|
|
error.yi = 1; |
|
|
|
|
desc += "一级列表检测失败"; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
desc += "一级列表获取失败"; |
|
|
|
|
error = 1; |
|
|
|
|
error.yi = 1; |
|
|
|
|
desc += "一级列表检测失败"; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
desc += "仅搜索源,跳过一级列表检测"; |
|
|
|
|
} |
|
|
|
|
if(data.searchable!='0' && !error){ |
|
|
|
|
if(data.searchable!='0'){ |
|
|
|
|
let ssdata = getSsData("我的", data, 1); |
|
|
|
|
desc += "\n搜索关键词 ‘我的’ 获取返回:"+ssdata.length; |
|
|
|
|
if(ssdata.length==0){ |
|
|
|
|
error = 1; |
|
|
|
|
}else if(!erurl){ |
|
|
|
|
erurl = ssdata[0].vod_url; |
|
|
|
|
if(ssdata.error){ |
|
|
|
|
desc += "/n搜索 ‘我的’ 检测出错"; |
|
|
|
|
error.ss = 1; |
|
|
|
|
}else if(ssdata.vodlists.length>0 && !erurl){ |
|
|
|
|
erurl = ssdata.vodlists[0].vod_url; |
|
|
|
|
ername = ssdata.vodlists[0].vod_name; |
|
|
|
|
desc += "/n搜索 ‘我的’ 结果获取到>" + ssdata.vodlists.length; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
desc += "不支持搜索源,跳过搜索检测"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(erurl){ |
|
|
|
|
let erdata = getErData(data,erurl); |
|
|
|
|
let lists = erdata.lists || []; |
|
|
|
|
if(lists.length>0){ |
|
|
|
|
desc += "\n‘" + ername + "’ 二级选集获取成功:" + lists.length; |
|
|
|
|
if(lists.length==0){ |
|
|
|
|
error.er = 1; |
|
|
|
|
desc += "/n获取 ‘"+ername+"’ 选集列表失败"; |
|
|
|
|
}else{ |
|
|
|
|
desc += "\n‘" + ername + "’ 二级选集获取失败"; |
|
|
|
|
error = 1; |
|
|
|
|
desc += "/n获取 ‘"+ername+"’ 选集列表成功"; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
desc += "/n未获取到二级链接,跳过二级选集检测"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let d = { |
|
|
|
|
title: data.name, |
|
|
|
|
desc: desc, |
|
|
|
@ -410,13 +417,10 @@ function SRCSet() { |
|
|
|
|
} |
|
|
|
|
return {error:error, d:d, data:data} |
|
|
|
|
} |
|
|
|
|
showLoading(sm + ",批量检测中..."); |
|
|
|
|
clearMyVar("批量检测_复检模式"); |
|
|
|
|
let executeList = []; |
|
|
|
|
let success = 0; |
|
|
|
|
let faillist = []; |
|
|
|
|
showLoading("批量检测中..."); |
|
|
|
|
|
|
|
|
|
let list = duoselect.filter(v=>!v.stop).map((item) => { |
|
|
|
|
|
|
|
|
|
let list = checkSource.map((item) => { |
|
|
|
|
return { |
|
|
|
|
func: task, |
|
|
|
|
param: item, |
|
|
|
@ -425,7 +429,7 @@ function SRCSet() { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
addItemAfter("testSource", { |
|
|
|
|
title: sm + ",批量检测中...", |
|
|
|
|
title: "批量检测中...", |
|
|
|
|
desc: "点击中止线程,停止批量检测", |
|
|
|
|
url: $().lazyRule(()=>{ |
|
|
|
|
putMyVar("批量检测_中止线程","1"); |
|
|
|
@ -439,11 +443,16 @@ function SRCSet() { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
log("批量检测_线程开始"); |
|
|
|
|
clearMyVar("批量检测_复检模式"); |
|
|
|
|
let executeList = []; |
|
|
|
|
let success = 0; |
|
|
|
|
let faillist = []; |
|
|
|
|
|
|
|
|
|
if(list.length>0){ |
|
|
|
|
be(list, { |
|
|
|
|
func: function (obj, id, error, taskResult) { |
|
|
|
|
executeList.push(id); |
|
|
|
|
if(taskResult.error){ |
|
|
|
|
if(Object.keys(taskResult.error).length>0){ |
|
|
|
|
addItemBefore("testSource2", taskResult.d); |
|
|
|
|
faillist.push(taskResult.data); |
|
|
|
|
if(faillist.length==1){ |
|
|
|
@ -509,26 +518,11 @@ function SRCSet() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let d = []; |
|
|
|
|
/* |
|
|
|
|
d.push({ |
|
|
|
|
title: "选择检测项目", |
|
|
|
|
col_type: "rich_text" |
|
|
|
|
}) |
|
|
|
|
d.push({ |
|
|
|
|
title: '一级列表', |
|
|
|
|
col_type: 'text_3', |
|
|
|
|
url: testSource('yi'), |
|
|
|
|
extra: { |
|
|
|
|
id: "condition_yi" |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
d.push({ |
|
|
|
|
title: '二级选集', |
|
|
|
|
col_type: 'text_3', |
|
|
|
|
url: testSource('er'), |
|
|
|
|
extra: { |
|
|
|
|
id: "condition_er" |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
d.push({ |
|
|
|
|
title: '搜索测试', |
|
|
|
|
col_type: 'text_3', |
|
|
|
@ -540,10 +534,10 @@ function SRCSet() { |
|
|
|
|
d.push({ |
|
|
|
|
col_type: "line_blank" |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
d.push({ |
|
|
|
|
title: "待检测源:" + duoselect.length, |
|
|
|
|
url: "hiker://empty", |
|
|
|
|
url: testSource(duoselect), |
|
|
|
|
desc: "", |
|
|
|
|
col_type : "text_center_1", |
|
|
|
|
extra: { |
|
|
|
|