From b08c182371aa20b5dc026a470d45c5cf0f1236bb Mon Sep 17 00:00:00 2001 From: alantang <107459091+alantang1977@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:08:28 +0800 Subject: [PATCH] Add files via upload --- js/meijumi.js | 72 +++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 40 deletions(-) diff --git a/js/meijumi.js b/js/meijumi.js index efaa34d1..11636713 100644 --- a/js/meijumi.js +++ b/js/meijumi.js @@ -1,6 +1,6 @@ var rule = { title:'美剧迷[磁]', - host:'https://www.meijumi.xyz', + host:'https://www.meijumi.net', homeUrl:'/', url: '/fyclass/page/fypage/?', filter_url:'{{fl.class}}', @@ -12,7 +12,8 @@ var rule = { filterable:0, headers:{ 'User-Agent': 'PC_UA', - 'Referer': 'https://www.meijumi.xyz/' + 'Accept': '*/*', + 'Referer': 'https://www.meijumi.net/' }, timeout:5000, class_name:'最近更新&美剧&灵异/惊悚&魔幻/科幻&罪案/动作谍战&剧情/历史&喜剧&律政/医务&动漫/动画&纪录片&综艺/真人秀&英剧&韩剧', @@ -153,20 +154,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; @@ -218,8 +231,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)){ @@ -238,11 +255,16 @@ 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)){ let title = it["ali"][key]; - let burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(key); + //let burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(key); + let burl = "push://" + key; log('meijumi ali title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); log('meijumi ali burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); d.push(title + '$' + burl); @@ -251,11 +273,16 @@ 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)){ let title = it["quark"][key]; - let burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(key); + //let burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(key); + let burl = "push://" + key; log('meijumi quark title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); log('meijumi quark burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); d.push(title + '$' + burl); @@ -267,40 +294,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( HOST + '/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', }