update PG

This commit is contained in:
chuqiuyu
2023-08-28 09:56:51 +08:00
parent 95e53a5f60
commit ec40038c76
11 changed files with 305 additions and 73 deletions
+26 -37
View File
@@ -9,7 +9,7 @@ var rule = {
filter_url:'{{fl.class}}',
filter:{
},
searchUrl: '/?s=**',
searchUrl: '/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.meijumi.net/?s=**',
searchable:2,
quickSearch:0,
filterable:0,
@@ -157,20 +157,32 @@ d.forEach(function(it) {
});
LISTS.push(playGroups);
let groupIndex = 1;
let haveDelay = false;
playGroups.forEach(function (it) {
let magCount = Object.keys(it["magnet"]).length;
let aliCount = Object.keys(it["ali"]).length;
let quarkCount = Object.keys(it["quark"]).length;
let haveMag = false;
if (magCount==0 && aliCount!==1 && quarkCount!==1 ){
}else{
if (magCount>0){
TABS.push("磁力" + groupIndex);
haveMag = true;
haveDelay = true;
}
if (aliCount === 1){
if (!haveMag && !haveDelay){
haveDelay = true;
TABS.push("選擇右側綫路");
}
TABS.push("阿里雲盤" + groupIndex);
}
if (quarkCount === 1){
if (!haveMag && !haveDelay){
haveDelay = true;
TABS.push("選擇右側綫路");
}
TABS.push("夸克雲盤" + groupIndex);
}
groupIndex = groupIndex + 1;
@@ -222,8 +234,12 @@ if (false && LISTS.length>0 && typeof LISTS[0] === "object"){
});
}
LISTS = [];
let haveDelay = false;
playGroups.forEach(function(it){
let haveMag = false;
if (Object.keys(it["magnet"]).length>0){
haveMag = true;
haveDelay = true;
let d = [];
for(const key in it["magnet"]){
if (it["magnet"].hasOwnProperty(key)){
@@ -242,6 +258,10 @@ playGroups.forEach(function(it){
LISTS.push(newd);
}
if (Object.keys(it["ali"]).length==1){
if (!haveMag && !haveDelay){
haveDelay = true;
LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]);
}
let d = [];
for(const key in it["ali"]){
if (it["ali"].hasOwnProperty(key)){
@@ -256,6 +276,10 @@ playGroups.forEach(function(it){
LISTS.push(d);
}
if (Object.keys(it["quark"]).length==1){
if (!haveMag && !haveDelay){
haveDelay = true;
LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]);
}
let d = [];
for(const key in it["quark"]){
if (it["quark"].hasOwnProperty(key)){
@@ -273,40 +297,5 @@ playGroups.forEach(function(it){
`,
},
搜索:`js:
pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
let params = 'show=title&tempid=1&tbname=article&mid=1&dopost=search&submit=&keyboard=' + encodeURIComponent(KEY);
let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let postData = {
method: "POST",
body: params
};
delete(_fetch_params.headers['Content-Type']);
Object.assign(_fetch_params, postData);
log("meijumi search postData>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params));
let search_html = request( rule.homeUrl + 'e/search/index.php', _fetch_params, true);
log("meijumi search result>>>>>>>>>>>>>>>" + search_html);
let d=[];
let dlist = pdfa(search_html, 'div.mainleft&&ul#post_container&&li');
dlist.forEach(function(it){
let title = pdfh(it, 'div.thumbnail img&&alt');
if (searchObj.quick === true){
if (title.includes(KEY)){
title = KEY;
}
}
let img = pd(it, 'div.thumbnail img&&src', HOST);
let content = pdfh(it, 'div.article div.entry_post&&Text');
let desc = pdfh(it, 'div.info&&span.info_date&&Text');
let url = pd(it, 'div.thumbnail&&a&&href', HOST);
d.push({
title:title,
img:img,
content:content,
desc:desc,
url:url
});
});
setResult(d);
`,
搜索:'ul.search-page article;h2&&Text;a img&&src;div.entry-content span:eq(1)&&Text;a&&href;div.entry-content div.archive-content&&Text',
}