From 206bb3fd0e1e7bea244c7b9b6b950601609aa95c Mon Sep 17 00:00:00 2001 From: alantang <107459091+alantang1977@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:05:17 +0800 Subject: [PATCH] Add files via upload --- js/4khdr.js | 77 +++++++++++++++++++--------- js/cilixiong.js | 6 +-- js/dygang.js | 54 +++++++++++++++++--- js/jiyingw.js | 131 ++++++++++++++++++++++++++++++++---------------- js/mp4us.js | 58 ++++++++++++++++++--- 5 files changed, 242 insertions(+), 84 deletions(-) diff --git a/js/4khdr.js b/js/4khdr.js index 99159cb..4d564e5 100644 --- a/js/4khdr.js +++ b/js/4khdr.js @@ -37,52 +37,83 @@ var rule = { tabs:`js: pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; TABS=[] -let d = pdfa(html, 'table.t_table'); -let aliIndex=1; +let d = pdfa(html, 'table.t_table a'); +let tabsa = []; +let tabsq = []; +let tabsm = false; +let tabse = false; d.forEach(function(it) { let burl = pdfh(it, 'a&&href'); - log("burl >>>>>>" + burl); if (burl.startsWith("https://www.aliyundrive.com/s/")){ - TABS.push("aliyun"+aliIndex); - aliIndex = aliIndex + 1; + tabsa.push("阿里云盤"); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + tabsq.push("夸克云盤"); + }else if (burl.startsWith("magnet")){ + tabsm = true; + }else if (burl.startsWith("ed2k")){ + tabse = true; } }); -d = pdfa(html, 'table.t_table a[href^="magnet"]'); -if (d.length>0){ +let tmpIndex; +tmpIndex=1; +tabsa.forEach(function(it){ + TABS.push(it + tmpIndex); + tmpIndex = tmpIndex + 1; +}); +tmpIndex=1; +tabsq.forEach(function(it){ + TABS.push(it + tmpIndex); + tmpIndex = tmpIndex + 1; +}); +if (tabsm === true){ TABS.push("磁力"); } +if (tabse === true){ + TABS.push("電驢"); +} log('4khdr TABS >>>>>>>>>>>>>>>>>>' + TABS); `, lists:`js: log(TABS); pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; LISTS = []; -let d = pdfa(html, 'table.t_table'); +let d = pdfa(html, 'table.t_table a'); +let lista = []; +let listq = []; +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("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]); + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + loopresult = title + '$' + burl; + listq.push(loopresult); + }else if (burl.startsWith("magnet")){ + listm.push(loopresult); + }else if (burl.startsWith("ed2k")){ + liste.push(loopresult); } }); -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); - } +lista.forEach(function(it){ + LISTS.push([it]); +}); +listq.forEach(function(it){ + LISTS.push([it]); }); if (listm.length>0){ LISTS.push(listm); } +if (liste.length>0){ + LISTS.push(liste); +} `, }, diff --git a/js/cilixiong.js b/js/cilixiong.js index 0d73136..139f62d 100644 --- a/js/cilixiong.js +++ b/js/cilixiong.js @@ -33,8 +33,7 @@ var rule = { d.push({ title: pdfh(it, 'h2&&Text'), desc: pdfh(it, '.me-auto&&Text') + '分 / ' + pdfh(it, '.small&&Text'), - pic_url: pd(it, '.card-img&&style'), - url: pd(it, 'a&&href') + pic_url: pd(it, '.card-img&&style') }); }) setResult(d); @@ -52,8 +51,7 @@ var rule = { d.push({ title: pdfh(it, 'h2&&Text'), desc: pdfh(it, '.me-auto&&Text') + '分 / ' + pdfh(it, '.small&&Text'), - pic_url: pdfh(it, '.card-img&&style'), - url: '' + pic_url: pdfh(it, '.card-img&&style') }); }) setResult(d); diff --git a/js/dygang.js b/js/dygang.js index e05158f..f923ca9 100644 --- a/js/dygang.js +++ b/js/dygang.js @@ -39,12 +39,38 @@ var rule = { tabs:`js: pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; TABS=[] -var d = pdfa(html, '#dede_content table tbody tr a[href^="magnet"]'); -if (d.length>0){ +let d = pdfa(html, '#dede_content table tbody tr a'); +let tabsa = []; +let tabsq = []; +let tabsm = false; +let tabse = false; +d.forEach(function(it) { + let burl = pdfh(it, 'a&&href'); + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + tabsa.push("阿里云盤"); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + tabsq.push("夸克云盤"); + }else if (burl.startsWith("magnet")){ + tabsm = true; + }else if (burl.startsWith("ed2k")){ + tabse = true; + } +}); +let tmpIndex; +tmpIndex=1; +tabsa.forEach(function(it){ + TABS.push(it + tmpIndex); + tmpIndex = tmpIndex + 1; +}); +tmpIndex=1; +tabsq.forEach(function(it){ + TABS.push(it + tmpIndex); + tmpIndex = tmpIndex + 1; +}); +if (tabsm === true){ TABS.push("磁力"); } -d = pdfa(html, '#dede_content table tbody tr a[href^="ed2k"]'); -if (d.length>0){ +if (tabse === true){ TABS.push("電驢"); } log('dygang TABS >>>>>>>>>>>>>>>>>>' + TABS); @@ -53,7 +79,9 @@ log('dygang TABS >>>>>>>>>>>>>>>>>>' + TABS); log(TABS); pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; LISTS = []; -var d = pdfa(html, '#dede_content table tbody tr'); +let d = pdfa(html, '#dede_content table tbody tr a'); +let lista = []; +let listq = []; let listm = []; let liste = []; d.forEach(function(it){ @@ -62,12 +90,26 @@ d.forEach(function(it){ log('dygang title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); log('dygang burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); let loopresult = title + '$' + burl; - if (burl.startsWith("magnet")){ + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + loopresult = title + '$' + burl; + listq.push(loopresult); + }else if (burl.startsWith("magnet")){ listm.push(loopresult); }else if (burl.startsWith("ed2k")){ liste.push(loopresult); } }); +lista.forEach(function(it){ + LISTS.push([it]); +}); +listq.forEach(function(it){ + LISTS.push([it]); +}); if (listm.length>0){ LISTS.push(listm); } diff --git a/js/jiyingw.js b/js/jiyingw.js index 6bd9c34..fd5ef31 100644 --- a/js/jiyingw.js +++ b/js/jiyingw.js @@ -41,23 +41,52 @@ var rule = { tabs:`js: pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; TABS=[] -let d = pdfa(html, '.movie-introduce p a[href^="magnet"]'); -if (d.length > 0){ +let tabsa = []; +let tabsq = []; +let tabsm = false; +let tabse = false; +let d = pdfa(html, '.movie-introduce p a'); +d.forEach(function(it) { + let burl = pdfh(it, 'a&&href'); + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + tabsa.push("阿里云盤"); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + tabsq.push("夸克云盤"); + }else if (burl.startsWith("magnet")){ + tabsm = true; + }else if (burl.startsWith("ed2k")){ + tabse = true; + } +}); +d = pdfa(html, 'div#down p.down-list3 a'); +d.forEach(function(it) { + let burl = pdfh(it, 'a&&href'); + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + tabsa.push("阿里云盤"); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + tabsq.push("夸克云盤"); + }else if (burl.startsWith("magnet")){ + tabsm = true; + }else if (burl.startsWith("ed2k")){ + tabse = true; + } +}); +let tmpIndex; +tmpIndex=1; +tabsa.forEach(function(it){ + TABS.push(it + tmpIndex); + tmpIndex = tmpIndex + 1; +}); +tmpIndex=1; +tabsq.forEach(function(it){ + TABS.push(it + tmpIndex); + tmpIndex = tmpIndex + 1; +}); +if (tabsm === true){ 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){ +if (tabse === true){ TABS.push("電驢"); -}else{ - d = pdfa(html, 'div#down p.down-list3 a[href^="ed2k'); - if (d.length > 0){ - TABS.push("電驢"); - } } log('jiyingw TABS >>>>>>>>>>>>>>>>>>' + TABS); `, @@ -65,42 +94,58 @@ log('jiyingw TABS >>>>>>>>>>>>>>>>>>' + TABS); log(TABS); pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; LISTS = []; +let lista = []; +let listq = []; 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 burl = pdfh(it, 'a&&href'); + let title = pdfh(it, 'a&&Text'); + log('dygang title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('dygang 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); + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + loopresult = title + '$' + burl; + listq.push(loopresult); + }else if (burl.startsWith("magnet")){ + listm.push(loopresult); + }else if (burl.startsWith("ed2k")){ liste.push(loopresult); - }); -} + } +}); +d = pdfa(html, 'div#down p.down-list3 a'); +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("https://www.aliyundrive.com/s/")){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + loopresult = title + '$' + burl; + listq.push(loopresult); + }else if (burl.startsWith("magnet")){ + listm.push(loopresult); + }else if (burl.startsWith("ed2k")){ + liste.push(loopresult); + } +}); +lista.forEach(function(it){ + LISTS.push([it]); +}); +listq.forEach(function(it){ + LISTS.push([it]); +}); if (listm.length>0){ LISTS.push(listm); } diff --git a/js/mp4us.js b/js/mp4us.js index 890dfae..0d66ba6 100644 --- a/js/mp4us.js +++ b/js/mp4us.js @@ -37,12 +37,38 @@ var rule = { tabs:`js: pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; TABS=[] -let d = pdfa(html, 'ul.down-list&&li a[href^="magnet"]'); -if (d.length > 0){ +let d = pdfa(html, 'ul.down-list&&li a'); +let tabsa = []; +let tabsq = []; +let tabsm = false; +let tabse = false; +d.forEach(function(it) { + let burl = pdfh(it, 'a&&href'); + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + tabsa.push("阿里云盤"); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + tabsq.push("夸克云盤"); + }else if (burl.startsWith("magnet")){ + tabsm = true; + }else if (burl.startsWith("ed2k")){ + tabse = true; + } +}); +let tmpIndex; +tmpIndex=1; +tabsa.forEach(function(it){ + TABS.push(it + tmpIndex); + tmpIndex = tmpIndex + 1; +}); +tmpIndex=1; +tabsq.forEach(function(it){ + TABS.push(it + tmpIndex); + tmpIndex = tmpIndex + 1; +}); +if (tabsm === true){ TABS.push("磁力"); } -d = pdfa(html, 'ul.down-list&&li a[href^="ed2k"]'); -if (d.length > 0){ +if (tabse === true){ TABS.push("電驢"); } log('mp4us TABS >>>>>>>>>>>>>>>>>>' + TABS); @@ -51,21 +77,37 @@ log('mp4us TABS >>>>>>>>>>>>>>>>>>' + TABS); log(TABS); pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; LISTS = []; -let d = pdfa(html, 'ul.down-list&&li'); +let d = pdfa(html, 'ul.down-list&&li a'); +let lista = []; +let listq = []; 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); + log('dygang title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('dygang burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); let loopresult = title + '$' + burl; - if (burl.startsWith("magnet")){ + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + loopresult = title + '$' + burl; + listq.push(loopresult); + }else if (burl.startsWith("magnet")){ listm.push(loopresult); }else if (burl.startsWith("ed2k")){ liste.push(loopresult); } }); +lista.forEach(function(it){ + LISTS.push([it]); +}); +listq.forEach(function(it){ + LISTS.push([it]); +}); if (listm.length>0){ LISTS.push(listm.reverse()); }