From cf25121f7ad6f25be74a7650d4cdd46bcec3eeac Mon Sep 17 00:00:00 2001 From: chuqiuyu <13069375076@163.com> Date: Sun, 20 Aug 2023 16:44:11 +0800 Subject: [PATCH] update PG --- js/4khdr.js | 92 ++++++++++++++----------------------- js/cilixiong.js | 2 +- js/dygang.js | 57 +++++++++++------------ js/jiyingw.js | 120 +++++++++++++++++++++++------------------------- js/mp4us.js | 89 +++++++++++------------------------ 5 files changed, 147 insertions(+), 213 deletions(-) diff --git a/js/4khdr.js b/js/4khdr.js index 96d3f58f..99159cb5 100644 --- a/js/4khdr.js +++ b/js/4khdr.js @@ -37,76 +37,52 @@ var rule = { tabs:`js: pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; TABS=[] -// log("4khdr 二级 html>>>>>>>>>>" + html); -var d = pdfa(html, 'table.t_table'); -let magnetIndex=1; +let d = pdfa(html, 'table.t_table'); let aliIndex=1; d.forEach(function(it) { -let burl = pdfh(it, 'a&&href'); -log("burl >>>>>>" + burl); -if (burl.startsWith("https://www.aliyundrive.com/s/")){ - let result = 'aliyun' + aliIndex; - aliIndex = aliIndex + 1; - TABS.push(result); -} + let burl = pdfh(it, 'a&&href'); + log("burl >>>>>>" + burl); + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + TABS.push("aliyun"+aliIndex); + aliIndex = aliIndex + 1; + } }); -d.forEach(function(it) { -let burl = pdfh(it, 'a&&href'); -log("burl >>>>>>" + burl); -if (burl.startsWith("magnet")){ - let result = 'magnet' + magnetIndex; - magnetIndex = magnetIndex + 1; - TABS.push(result); +d = pdfa(html, 'table.t_table a[href^="magnet"]'); +if (d.length>0){ + TABS.push("磁力"); } -}); log('4khdr TABS >>>>>>>>>>>>>>>>>>' + TABS); `, lists:`js: log(TABS); pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; LISTS = []; -var d = pdfa(html, 'table.t_table'); -TABS.forEach(function(tab) { -log('tab >>>>>>>>' + tab); -if (/^aliyun/.test(tab)) { - let targetindex = parseInt(tab.substring(6)); - let index = 1; - d.forEach(function(it){ - let burl = pdfh(it, 'a&&href'); - if (burl.startsWith("https://www.aliyundrive.com/s/")){ - if (index === targetindex){ - let title = pdfh(it, 'a&&Text'); - log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); - burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); - log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); - let loopresult = title + '$' + burl; - LISTS.push([loopresult]); - } - index = index + 1; - } - }); -} +let d = pdfa(html, 'table.t_table'); +d.forEach(function(it){ + let burl = pdfh(it, 'a&&href'); + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + let title = pdfh(it, 'a&&Text'); + log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + let loopresult = title + '$' + burl; + LISTS.push([loopresult]); + } }); -TABS.forEach(function(tab) { -log('tab >>>>>>>>' + tab); -if (/^magnet/.test(tab)) { - let targetindex = parseInt(tab.substring(6)); - let index = 1; - d.forEach(function(it){ - let burl = pdfh(it, 'a&&href'); - if (burl.startsWith("magnet")){ - if (index === targetindex){ - let title = pdfh(it, 'a&&Text'); - log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); - log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); - let loopresult = title + '$' + burl; - LISTS.push([loopresult]); - } - index = index + 1; - } - }); -} +let listm = []; +d.forEach(function(it){ + let burl = pdfh(it, 'a&&href'); + if (burl.startsWith("magnet")){ + let title = pdfh(it, 'a&&Text'); + log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + let loopresult = title + '$' + burl; + listm.push(loopresult); + } }); +if (listm.length>0){ + LISTS.push(listm); +} `, }, diff --git a/js/cilixiong.js b/js/cilixiong.js index fad664e0..0d73136b 100644 --- a/js/cilixiong.js +++ b/js/cilixiong.js @@ -20,7 +20,7 @@ var rule = { }, timeout:5000, class_name:'电影&剧集&豆瓣电影Top250&IMDB Top250&高分悬疑片&高分喜剧片&高分传记片&高分爱情片&高分犯罪片&高分恐怖片&高分冒险片&高分武侠片&高分奇幻片&高分历史片&高分战争片&高分歌舞片&高分灾难片&高分情色片&高分西部片&高分音乐片&高分科幻片&高分动作片&高分动画片&高分纪录片&冷门佳片', - class_url:'1&2&/top250/&/s/imdbtop250/&/ssuspense/&/s/comedy/&/s/biopic/&/s/romance/&/s/crime/&/s/horror/&/s/adventure/&/s/martial/&/s/fantasy/&/s/history/&/s/war/&/s/musical/&/s/disaster/&/s/erotic/&/s/west/&/s/music/&/s/sci-fi/&/s/action/&/s/animation/&/s/documentary/&/s/unpopular/', + class_url:'1&2&/top250/&/s/imdbtop250/&/s/suspense/&/s/comedy/&/s/biopic/&/s/romance/&/s/crime/&/s/horror/&/s/adventure/&/s/martial/&/s/fantasy/&/s/history/&/s/war/&/s/musical/&/s/disaster/&/s/erotic/&/s/west/&/s/music/&/s/sci-fi/&/s/action/&/s/animation/&/s/documentary/&/s/unpopular/', play_parse:false, lazy:'', limit:6, diff --git a/js/dygang.js b/js/dygang.js index a7db00c4..e05158fe 100644 --- a/js/dygang.js +++ b/js/dygang.js @@ -39,44 +39,41 @@ var rule = { tabs:`js: pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; TABS=[] -var d = pdfa(html, '#dede_content table tbody tr'); -var index=1; -d.forEach(function(it) { - let burl = pdfh(it, 'a&&href'); - log("burl >>>>>>" + burl); - if (burl.startsWith("magnet")){ - let result = 'magnet' + index; - index = index + 1; - TABS.push(result); - } -}); -log('TABS >>>>>>>>>>>>>>>>>>' + TABS); +var d = pdfa(html, '#dede_content table tbody tr a[href^="magnet"]'); +if (d.length>0){ + TABS.push("磁力"); +} +d = pdfa(html, '#dede_content table tbody tr a[href^="ed2k"]'); +if (d.length>0){ + TABS.push("電驢"); +} +log('dygang TABS >>>>>>>>>>>>>>>>>>' + TABS); `, lists:`js: log(TABS); pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; LISTS = []; var d = pdfa(html, '#dede_content table tbody tr'); -TABS.forEach(function(tab) { - log('tab >>>>>>>>' + tab); - if (/^magnet/.test(tab)) { - let targetindex = parseInt(tab.substring(6)); - let index = 1; - d.forEach(function(it){ - let burl = pdfh(it, 'a&&href'); - if (burl.startsWith("magnet")){ - if (index === targetindex){ - let title = pdfh(it, 'a&&Text'); - log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); - log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); - let loopresult = title + '$' + burl; - LISTS.push([loopresult]); - } - index = index + 1; - } - }); +let listm = []; +let liste = []; +d.forEach(function(it){ + let burl = pdfh(it, 'a&&href'); + let title = pdfh(it, 'a&&Text'); + log('dygang title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('dygang burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + let loopresult = title + '$' + burl; + if (burl.startsWith("magnet")){ + listm.push(loopresult); + }else if (burl.startsWith("ed2k")){ + liste.push(loopresult); } }); +if (listm.length>0){ + LISTS.push(listm); +} +if (liste.length>0){ + LISTS.push(liste); +} `, }, diff --git a/js/jiyingw.js b/js/jiyingw.js index 9c10e8e7..6bd9c34f 100644 --- a/js/jiyingw.js +++ b/js/jiyingw.js @@ -41,78 +41,72 @@ var rule = { tabs:`js: pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; TABS=[] -var d = pdfa(html, '.movie-introduce p'); -var index=0; -d.forEach(function(it) { - let burl = pdfh(it, 'a[href^="magnet"]&&href'); - if (burl.startsWith("magnet")){ - log("jiyingw burl >>>>>>" + burl); - index = index + 1; - let result = 'magnet' + index; - TABS.push(result); +let d = pdfa(html, '.movie-introduce p a[href^="magnet"]'); +if (d.length > 0){ + TABS.push("磁力"); +}else{ + d = pdfa(html, 'div#down p.down-list3 a[href^="magnet"]'); + if (d.length > 0){ + TABS.push("磁力"); + } +} +d = pdfa(html, '.movie-introduce p a[href^="ed2k"]'); +if (d.length > 0){ + TABS.push("電驢"); +}else{ + d = pdfa(html, 'div#down p.down-list3 a[href^="ed2k'); + if (d.length > 0){ + TABS.push("電驢"); } -}); -if (index === 0){ - d = pdfa(html, 'div#down p.down-list3'); - index=0; - d.forEach(function(it) { - let burl = pdfh(it, 'a[href^="magnet"]&&href'); - if (burl.startsWith("magnet")){ - log("jiyingw burl >>>>>>" + burl); - index = index + 1; - let result = 'magnet' + index; - TABS.push(result); - } - }); } - log('jiyingw TABS >>>>>>>>>>>>>>>>>>' + TABS); `, lists:`js: log(TABS); pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; LISTS = []; -var d = pdfa(html, '.movie-introduce p'); -var secondinit=false; -TABS.forEach(function(tab) { - log('jiyingw tab >>>>>>>>' + tab); - if (/^magnet/.test(tab)) { - let targetindex = parseInt(tab.substring(6)); - let index = 0; - d.forEach(function(it){ - let burl = pdfh(it, 'a[href^="magnet"]&&href'); - if (burl.startsWith("magnet")){ - index = index + 1; - if (index === targetindex){ - let title = pdfh(it, 'a[href^="magnet"]&&Text'); - log('jiyingw title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); - log('jiyingw burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); - let loopresult = title + '$' + burl; - LISTS.push([loopresult]); - } - } - }); - if (index === 0){ - if (secondinit === false){ - d = pdfa(html, 'div#down p.down-list3'); - secondinit = true; - } - d.forEach(function(it){ - let burl = pdfh(it, 'a[href^="magnet"]&&href'); - if (burl.startsWith("magnet")){ - index = index + 1; - if (index === targetindex){ - let title = pdfh(it, 'a[href^="magnet"]&&Text'); - log('jiyingw title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); - log('jiyingw burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); - let loopresult = title + '$' + burl; - LISTS.push([loopresult]); - } - } - }); - } - } +let listm = []; +let liste = []; +let d = pdfa(html, '.movie-introduce p'); +d.forEach(function(it){ + let burl = pdfh(it, 'a[href^="magnet"]&&href'); + let title = pdfh(it, 'a[href^="magnet"]&&Text'); + log('jiyingw title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('jiyingw burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + let loopresult = title + '$' + burl; + listm.push(loopresult); + + burl = pdfh(it, 'a[href^="ed2k"]&&href'); + title = pdfh(it, 'a[href^="ed2k"]&&Text'); + log('jiyingw title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('jiyingw burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + loopresult = title + '$' + burl; + liste.push(loopresult); }); +if (listm.length<=0){ + d = pdfa(html, 'div#down p.down-list3'); + d.forEach(function(it){ + let burl = pdfh(it, 'a[href^="magnet"]&&href'); + let title = pdfh(it, 'a[href^="magnet"]&&Text'); + log('jiyingw title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('jiyingw burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + let loopresult = title + '$' + burl; + listm.push(loopresult); + + burl = pdfh(it, 'a[href^="ed2k"]&&href'); + title = pdfh(it, 'a[href^="ed2k"]&&Text'); + log('jiyingw title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('jiyingw burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + loopresult = title + '$' + burl; + liste.push(loopresult); + }); +} +if (listm.length>0){ + LISTS.push(listm); +} +if (liste.length>0){ + LISTS.push(liste); +} `, }, diff --git a/js/mp4us.js b/js/mp4us.js index 80a1b992..890dfae4 100644 --- a/js/mp4us.js +++ b/js/mp4us.js @@ -37,74 +37,41 @@ var rule = { tabs:`js: pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; TABS=[] -var d = pdfa(html, 'ul.down-list&&li'); -let magnetIndex=1; -let ed2kIndex=1; -d.forEach(function(it) { - let burl = pdfh(it, 'a&&href'); - log("burl >>>>>>" + burl); - if (burl.startsWith("magnet")){ - let result = 'magnet' + magnetIndex; - magnetIndex = magnetIndex + 1; - TABS.push(result); - } -}); -d.forEach(function(it) { - let burl = pdfh(it, 'a&&href'); - log("burl >>>>>>" + burl); - if (burl.startsWith("ed2k")){ - let result = 'ed2k' + ed2kIndex; - ed2kIndex = ed2kIndex + 1; - TABS.push(result); - } -}); -log('TABS >>>>>>>>>>>>>>>>>>' + TABS); +let d = pdfa(html, 'ul.down-list&&li a[href^="magnet"]'); +if (d.length > 0){ + TABS.push("磁力"); +} +d = pdfa(html, 'ul.down-list&&li a[href^="ed2k"]'); +if (d.length > 0){ + TABS.push("電驢"); +} +log('mp4us TABS >>>>>>>>>>>>>>>>>>' + TABS); `, lists:`js: log(TABS); pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; LISTS = []; -var d = pdfa(html, 'ul.down-list&&li'); -TABS.forEach(function(tab) { - log('tab >>>>>>>>' + tab); - if (/^magnet/.test(tab)) { - let targetindex = parseInt(tab.substring(6)); - let index = 1; - d.forEach(function(it){ - let burl = pdfh(it, 'a&&href'); - if (burl.startsWith("magnet")){ - if (index === targetindex){ - let title = pdfh(it, 'a&&Text'); - log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); - log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); - let loopresult = title + '$' + burl; - LISTS.push([loopresult]); - } - index = index + 1; - } - }); - } -}); -TABS.forEach(function(tab) { - log('tab >>>>>>>>' + tab); - if (/^ed2k/.test(tab)) { - let targetindex = parseInt(tab.substring(4)); - let index = 1; - d.forEach(function(it){ - let burl = pdfh(it, 'a&&href'); - if (burl.startsWith("ed2k")){ - if (index === targetindex){ - let title = pdfh(it, 'a&&Text'); - log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); - log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); - let loopresult = title + '$' + burl; - LISTS.push([loopresult]); - } - index = index + 1; - } - }); +let d = pdfa(html, 'ul.down-list&&li'); +let listm = []; +let liste = []; +d.forEach(function(it){ + let burl = pdfh(it, 'a&&href'); + let title = pdfh(it, 'a&&Text'); + log('mp4us title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('mp4us burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + let loopresult = title + '$' + burl; + if (burl.startsWith("magnet")){ + listm.push(loopresult); + }else if (burl.startsWith("ed2k")){ + liste.push(loopresult); } }); +if (listm.length>0){ + LISTS.push(listm.reverse()); +} +if (liste.length>0){ + LISTS.push(liste.reverse()); +} `, },