diff --git a/js/4khdr.js b/js/4khdr.js new file mode 100644 index 0000000..989a1c2 --- /dev/null +++ b/js/4khdr.js @@ -0,0 +1,186 @@ +var rule = { + title:'4KHDR[磁]', + host:'https://www.4khdr.cn', + homeUrl: "/forum.php?mod=forumdisplay&fid=2&page=1", + url: '/forum.php?mod=forumdisplay&fid=2&filter=typeid&typeid=fyclass&page=fypage', + filter_url:'{{fl.class}}', + filter:{ + }, + searchUrl: '/search.php#searchsubmit=yes&srchtxt=**;post', + searchable:2, + quickSearch:1, + filterable:0, + headers:{ + 'User-Agent': 'PC_UA', + 'Cookie':'http://127.0.0.1:9978/file:///tvbox/JS/lib/4khdr.txt', + }, + timeout:5000, + class_name: "4K电影&4K美剧&4K华语&4K动画&4K纪录片&4K日韩印&蓝光电影&蓝光美剧&蓝光华语&蓝光动画&蓝光日韩印", + class_url:"3&8&15&6&11&4&29&31&33&32&34", + play_parse:true, + play_json:[{ + re:'*', + json:{ + parse:0, + jx:0 + } + }], + lazy:'', + limit:6, + 推荐:'ul#waterfall li;a&&title;img&&src;div.auth.cl&&Text;a&&href', + 一级:'ul#waterfall li;a&&title;img&&src;div.auth.cl&&Text;a&&href', + 二级:{ + title:"#thead_subject&&Text", + img:"img.zoom&&src", + desc:'td[id^="postmessage_"] font&&Text', + content:'td[id^="postmessage_"] font&&Text', + tabs:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +TABS=[] +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'); + 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; + } +}); +if (tabsm === true){ + TABS.push("磁力"); +} +if (tabse === true){ + TABS.push("電驢"); +} +if (tabsa.length + tabsq.length > 1){ + TABS.push("選擇右側綫路"); +} +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; +}); +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 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('4khdr title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('4khdr burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + let loopresult = title + '$' + burl; + if (burl.startsWith("https://www.aliyundrive.com/s/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + listq.push(loopresult); + }else 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); +} +if (lista.length + listq.length > 1){ + LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]); +} +lista.forEach(function(it){ + LISTS.push([it]); +}); +listq.forEach(function(it){ + LISTS.push([it]); +}); +`, + + }, + 搜索:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +if (rule_fetch_params.headers.Cookie.startsWith("http")){ + rule_fetch_params.headers.Cookie=fetch(rule_fetch_params.headers.Cookie); + let cookie = rule_fetch_params.headers.Cookie; + setItem(RULE_CK, cookie); +}; +log('4khdr search cookie>>>>>>>>>>>>>>>' + rule_fetch_params.headers.Cookie); +let new_host= HOST + '/search.php'; +let new_html=request(new_host); +let formhash = pdfh(new_html, 'input[name="formhash"]&&value'); +log("4khdr formhash>>>>>>>>>>>>>>>" + formhash); +let params = 'formhash=' + formhash + '&searchsubmit=yes&srchtxt=' + encodeURIComponent(KEY); +let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); +let postData = { + body: params +}; +Object.assign(_fetch_params, postData); +log("4khdr search postData>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params)); +let search_html = post( HOST + '/search.php', _fetch_params) +//log("4khdr search result>>>>>>>>>>>>>>>" + search_html); +let d=[]; +let dlist = pdfa(search_html, 'div#threadlist ul li'); +dlist.forEach(function(it){ + let title = pdfh(it, 'h3&&Text'); + if (searchObj.quick === true){ + if (title.includes(KEY)){ + title = KEY; + } + } + let img = ""; + let content = pdfh(it, 'p:eq(3)&&Text'); + let desc = pdfh(it, 'p:eq(2)&&Text'); + let url = pd(it, 'a&&href', HOST); + d.push({ + title:title, + img:img, + content:content, + desc:desc, + url:url + }) +}); +setResult(d); + `, +} diff --git a/js/aipanso.js b/js/aipanso.js new file mode 100644 index 0000000..79801fc --- /dev/null +++ b/js/aipanso.js @@ -0,0 +1,126 @@ +var rule = { + title:'爱盘搜[夸]', + host:'https://aipanso.com', + homeUrl:'/', + url: '/forum-fyclass-fypage.html?', + filter_url:'{{fl.class}}', + filter:{ + }, + searchUrl: '/search?page=fypage&s=1&t=-1&k=**', + searchable:2, + quickSearch:0, + filterable:0, + headers:{ + 'User-Agent': PC_UA, + 'Accept': '*/*', + 'Referer': 'https://aipanso.com/' + }, + timeout:5000, + class_name:'', + class_url:'', + play_parse:true, + play_json:[{ + re:'*', + json:{ + parse:0, + jx:0 + } + }], + lazy:'', + limit:6, + 推荐:'', + 一级:'', + 二级:{ + title:"van-row h3&&Text", + img:"", + desc:"van-row h3&&Text", + content:"van-row h3&&Text", + tabs:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +TABS=[] +TABS.push("夸克雲盤"); +log('meijumi TABS >>>>>>>>>>>>>>>>>>' + TABS); +`, + lists:`js: +log(TABS); +LISTS=[]; +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +let requestHeaders = { + withHeaders: true, + redirect: 0, + headers:{ + Referer: MY_URL + } +}; +let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); +Object.assign(_fetch_params, requestHeaders); +let new_html = request ( MY_URL.replace("/s/","/cv/"), _fetch_params); +let json=JSON.parse(new_html); +let redirectUrl = ""; +if (json.hasOwnProperty("Location")){ + redirectUrl = json["Location"]; +}else if (json.hasOwnProperty("location")){ + redirectUrl = json["location"]; +} +let title = pdfh(html, 'van-row h3&&Text'); +LISTS.push([title + '$' + 'push://' + redirectUrl]); +`, + }, + 搜索:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; + +log("aipanso enter search >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + KEY); +let withHeaders = { + withHeaders: true +}; +let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); +Object.assign(_fetch_params, withHeaders); + +log('aipanso search params >>>>>>>>>>>>>>>>>>>>>' + JSON.stringify(_fetch_params)); +let new_html=request(rule.homeUrl + 'search?page=' + MY_PAGE + '&s=1&t=-1&k=' + encodeURIComponent(KEY) , _fetch_params); +//log('aipanso search new_html >>>>>>>>>>>>>>>>>>>>>' + new_html); +let json=JSON.parse(new_html); +let setCk=Object.keys(json).find(it=>it.toLowerCase()==="set-cookie"); +let cookie=""; +if (typeof setCk !== "undefined"){ + let d=[]; + for(const key in json[setCk]){ + if (typeof json[setCk][key] === "string"){ + log("aipanso header setCk key>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + json[setCk][key] + " " + (typeof json[setCk][key])); + d.push(json[setCk][key].split(";")[0]); + } + } + cookie=d.join(";"); + setItem(RULE_CK, cookie); + fetch_params.headers.Cookie=cookie; + rule_fetch_params.headers.Cookie=cookie; +} +log('aipanso search cookie >>>>>>>>>>>>>>>>>>>>>' + cookie); +log('aipanso search body >>>>>>>>>>>>>>>>>>>>>' + json['body'].substring(4096)); + +new_html = json['body']; + +let d=[]; +let dlist = pdfa(new_html, 'van-row:has(>a[href^="/s/"])'); +dlist.forEach(function(it){ + let title = pdfh(it, 'van-card template&&Text'); + if (false && searchObj.quick === true){ + if (title.includes(KEY)){ + title = KEY; + } + } + let img = pd(it, 'van-card&&thumb', HOST); + let content = pdfh(it, 'van-card template:eq(1)&&Text'); + let desc = pdfh(it, 'van-card template:eq(1)&&Text'); + let url = pd(it, 'a&&href', HOST); + d.push({ + title:title, + img:img, + content:content, + desc:desc, + url:url + }) +}); +setResult(d); +`, +} diff --git a/js/cilixiong.js b/js/cilixiong.js new file mode 100644 index 0000000..27074ea --- /dev/null +++ b/js/cilixiong.js @@ -0,0 +1,61 @@ +var rule = { + title:'磁力熊[磁]', + host:'https://www.cilixiong.com', + homeUrl:'/', + url: '/fyclassfyfilter-(fypage-1).html', + //host:'http://127.0.0.1:10079', + //homeUrl:'/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.cilixiong.com', + //url:'/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.cilixiong.com/fyclassfyfilter-(fypage-1).html', + filter_url:'-{{fl.class or "0"}}-{{fl.area or "0"}}', + filter:{ + "1":[{"key":"class","name":"类型","value":[{"n":"全部","v":"0"},{"n":"剧情","v":"1"},{"n":"喜剧","v":"2"},{"n":"惊悚","v":"3"},{"n":"动作","v":"4"},{"n":"爱情","v":"5"},{"n":"犯罪","v":"6"},{"n":"恐怖","v":"7"},{"n":"冒险","v":"8"},{"n":"悬疑","v":"9"},{"n":"科幻","v":"10"},{"n":"家庭","v":"11"},{"n":"奇幻","v":"12"},{"n":"动画","v":"13"},{"n":"战争","v":"14"},{"n":"历史","v":"15"},{"n":"传记","v":"16"},{"n":"音乐","v":"17"},{"n":"歌舞","v":"18"},{"n":"运动","v":"19"},{"n":"西部","v":"20"},{"n":"灾难","v":"21"},{"n":"古装","v":"22"},{"n":"情色","v":"23"},{"n":"同性","v":"24"},{"n":"儿童","v":"25"},{"n":"纪录片","v":"26"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"0"},{"n":"大陆","v":"1"},{"n":"香港","v":"2"},{"n":"台湾","v":"3"},{"n":"美国","v":"4"},{"n":"日本","v":"5"},{"n":"韩国","v":"6"},{"n":"英国","v":"7"},{"n":"法国","v":"8"},{"n":"德国","v":"9"},{"n":"印度","v":"10"},{"n":"泰国","v":"11"},{"n":"丹麦","v":"12"},{"n":"瑞典","v":"13"},{"n":"巴西","v":"14"},{"n":"加拿大","v":"15"},{"n":"俄罗斯","v":"16"},{"n":"意大利","v":"17"},{"n":"比利时","v":"18"},{"n":"爱尔兰","v":"19"},{"n":"西班牙","v":"20"},{"n":"澳大利亚","v":"21"},{"n":"波兰","v":"22"},{"n":"土耳其","v":"23"},{"n":"越南","v":"24"}]}], + "2":[{"key":"class","name":"类型","value":[{"n":"全部","v":"0"},{"n":"剧情","v":"1"},{"n":"喜剧","v":"2"},{"n":"惊悚","v":"3"},{"n":"动作","v":"4"},{"n":"爱情","v":"5"},{"n":"犯罪","v":"6"},{"n":"恐怖","v":"7"},{"n":"冒险","v":"8"},{"n":"悬疑","v":"9"},{"n":"科幻","v":"10"},{"n":"家庭","v":"11"},{"n":"奇幻","v":"12"},{"n":"动画","v":"13"},{"n":"战争","v":"14"},{"n":"历史","v":"15"},{"n":"传记","v":"16"},{"n":"音乐","v":"17"},{"n":"歌舞","v":"18"},{"n":"运动","v":"19"},{"n":"西部","v":"20"},{"n":"灾难","v":"21"},{"n":"古装","v":"22"},{"n":"情色","v":"23"},{"n":"同性","v":"24"},{"n":"儿童","v":"25"},{"n":"纪录片","v":"26"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"0"},{"n":"大陆","v":"1"},{"n":"香港","v":"2"},{"n":"台湾","v":"3"},{"n":"美国","v":"4"},{"n":"日本","v":"5"},{"n":"韩国","v":"6"},{"n":"英国","v":"7"},{"n":"法国","v":"8"},{"n":"德国","v":"9"},{"n":"印度","v":"10"},{"n":"泰国","v":"11"},{"n":"丹麦","v":"12"},{"n":"瑞典","v":"13"},{"n":"巴西","v":"14"},{"n":"加拿大","v":"15"},{"n":"俄罗斯","v":"16"},{"n":"意大利","v":"17"},{"n":"比利时","v":"18"},{"n":"爱尔兰","v":"19"},{"n":"西班牙","v":"20"},{"n":"澳大利亚","v":"21"},{"n":"波兰","v":"22"},{"n":"土耳其","v":"23"},{"n":"越南","v":"24"}]}] + }, + searchUrl: '/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.cilixiong.com/e/search/index.php#classid=1,2&show=title&tempid=1&keyboard=**;post', + searchable:0, + quickSearch:0, + filterable:1, + headers:{ + 'User-Agent': 'MOBILE_UA' + }, + timeout:5000, + class_name:'电影&剧集&豆瓣电影Top250&IMDB Top250&高分悬疑片&高分喜剧片&高分传记片&高分爱情片&高分犯罪片&高分恐怖片&高分冒险片&高分武侠片&高分奇幻片&高分历史片&高分战争片&高分歌舞片&高分灾难片&高分情色片&高分西部片&高分音乐片&高分科幻片&高分动作片&高分动画片&高分纪录片&冷门佳片', + 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, + 推荐: `js: + pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; + var d = []; + var html = request(input); + var list = pdfa(html, 'body&&.col'); + list.forEach(it => { + d.push({ + title: pdfh(it, 'h2&&Text'), + desc: pdfh(it, '.me-auto&&Text') + '分 / ' + pdfh(it, '.small&&Text'), + pic_url: pd(it, '.card-img&&style') + }); + }) + setResult(d); + `, + 一级: `js: + pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; + var d = []; + if (MY_CATE !== '1' && MY_CATE !== '2') { + let turl = (MY_PAGE === 1)? 'index' : 'index_'+ MY_PAGE; + input = rule.homeUrl + MY_CATE + turl + '.html'; + } + var html = request(input); + var list = pdfa(html, 'body&&.col'); + list.forEach(it => { + d.push({ + title: pdfh(it, 'h2&&Text'), + desc: pdfh(it, '.me-auto&&Text') + '分 / ' + pdfh(it, '.small&&Text'), + pic_url: pdfh(it, '.card-img&&style') + }); + }) + setResult(d); + `, + 二级:'', + 搜索:'', +} diff --git a/js/cilixiongp.js b/js/cilixiongp.js new file mode 100644 index 0000000..139f62d --- /dev/null +++ b/js/cilixiongp.js @@ -0,0 +1,61 @@ +var rule = { + title:'磁力熊[磁]', + //host:'https://www.cilixiong.com', + //homeUrl:'/', + //url: '/fyclassfyfilter-(fypage-1).html', + host:'http://127.0.0.1:10079', + homeUrl:'/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.cilixiong.com', + url:'/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.cilixiong.com/fyclassfyfilter-(fypage-1).html', + filter_url:'-{{fl.class or "0"}}-{{fl.area or "0"}}', + filter:{ + "1":[{"key":"class","name":"类型","value":[{"n":"全部","v":"0"},{"n":"剧情","v":"1"},{"n":"喜剧","v":"2"},{"n":"惊悚","v":"3"},{"n":"动作","v":"4"},{"n":"爱情","v":"5"},{"n":"犯罪","v":"6"},{"n":"恐怖","v":"7"},{"n":"冒险","v":"8"},{"n":"悬疑","v":"9"},{"n":"科幻","v":"10"},{"n":"家庭","v":"11"},{"n":"奇幻","v":"12"},{"n":"动画","v":"13"},{"n":"战争","v":"14"},{"n":"历史","v":"15"},{"n":"传记","v":"16"},{"n":"音乐","v":"17"},{"n":"歌舞","v":"18"},{"n":"运动","v":"19"},{"n":"西部","v":"20"},{"n":"灾难","v":"21"},{"n":"古装","v":"22"},{"n":"情色","v":"23"},{"n":"同性","v":"24"},{"n":"儿童","v":"25"},{"n":"纪录片","v":"26"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"0"},{"n":"大陆","v":"1"},{"n":"香港","v":"2"},{"n":"台湾","v":"3"},{"n":"美国","v":"4"},{"n":"日本","v":"5"},{"n":"韩国","v":"6"},{"n":"英国","v":"7"},{"n":"法国","v":"8"},{"n":"德国","v":"9"},{"n":"印度","v":"10"},{"n":"泰国","v":"11"},{"n":"丹麦","v":"12"},{"n":"瑞典","v":"13"},{"n":"巴西","v":"14"},{"n":"加拿大","v":"15"},{"n":"俄罗斯","v":"16"},{"n":"意大利","v":"17"},{"n":"比利时","v":"18"},{"n":"爱尔兰","v":"19"},{"n":"西班牙","v":"20"},{"n":"澳大利亚","v":"21"},{"n":"波兰","v":"22"},{"n":"土耳其","v":"23"},{"n":"越南","v":"24"}]}], + "2":[{"key":"class","name":"类型","value":[{"n":"全部","v":"0"},{"n":"剧情","v":"1"},{"n":"喜剧","v":"2"},{"n":"惊悚","v":"3"},{"n":"动作","v":"4"},{"n":"爱情","v":"5"},{"n":"犯罪","v":"6"},{"n":"恐怖","v":"7"},{"n":"冒险","v":"8"},{"n":"悬疑","v":"9"},{"n":"科幻","v":"10"},{"n":"家庭","v":"11"},{"n":"奇幻","v":"12"},{"n":"动画","v":"13"},{"n":"战争","v":"14"},{"n":"历史","v":"15"},{"n":"传记","v":"16"},{"n":"音乐","v":"17"},{"n":"歌舞","v":"18"},{"n":"运动","v":"19"},{"n":"西部","v":"20"},{"n":"灾难","v":"21"},{"n":"古装","v":"22"},{"n":"情色","v":"23"},{"n":"同性","v":"24"},{"n":"儿童","v":"25"},{"n":"纪录片","v":"26"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"0"},{"n":"大陆","v":"1"},{"n":"香港","v":"2"},{"n":"台湾","v":"3"},{"n":"美国","v":"4"},{"n":"日本","v":"5"},{"n":"韩国","v":"6"},{"n":"英国","v":"7"},{"n":"法国","v":"8"},{"n":"德国","v":"9"},{"n":"印度","v":"10"},{"n":"泰国","v":"11"},{"n":"丹麦","v":"12"},{"n":"瑞典","v":"13"},{"n":"巴西","v":"14"},{"n":"加拿大","v":"15"},{"n":"俄罗斯","v":"16"},{"n":"意大利","v":"17"},{"n":"比利时","v":"18"},{"n":"爱尔兰","v":"19"},{"n":"西班牙","v":"20"},{"n":"澳大利亚","v":"21"},{"n":"波兰","v":"22"},{"n":"土耳其","v":"23"},{"n":"越南","v":"24"}]}] + }, + searchUrl: '/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.cilixiong.com/e/search/index.php#classid=1,2&show=title&tempid=1&keyboard=**;post', + searchable:0, + quickSearch:0, + filterable:1, + headers:{ + 'User-Agent': 'MOBILE_UA' + }, + timeout:5000, + class_name:'电影&剧集&豆瓣电影Top250&IMDB Top250&高分悬疑片&高分喜剧片&高分传记片&高分爱情片&高分犯罪片&高分恐怖片&高分冒险片&高分武侠片&高分奇幻片&高分历史片&高分战争片&高分歌舞片&高分灾难片&高分情色片&高分西部片&高分音乐片&高分科幻片&高分动作片&高分动画片&高分纪录片&冷门佳片', + 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, + 推荐: `js: + pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; + var d = []; + var html = request(input); + var list = pdfa(html, 'body&&.col'); + list.forEach(it => { + d.push({ + title: pdfh(it, 'h2&&Text'), + desc: pdfh(it, '.me-auto&&Text') + '分 / ' + pdfh(it, '.small&&Text'), + pic_url: pd(it, '.card-img&&style') + }); + }) + setResult(d); + `, + 一级: `js: + pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; + var d = []; + if (MY_CATE !== '1' && MY_CATE !== '2') { + let turl = (MY_PAGE === 1)? 'index' : 'index_'+ MY_PAGE; + input = rule.homeUrl + MY_CATE + turl + '.html'; + } + var html = request(input); + var list = pdfa(html, 'body&&.col'); + list.forEach(it => { + d.push({ + title: pdfh(it, 'h2&&Text'), + desc: pdfh(it, '.me-auto&&Text') + '分 / ' + pdfh(it, '.small&&Text'), + pic_url: pdfh(it, '.card-img&&style') + }); + }) + setResult(d); + `, + 二级:'', + 搜索:'', +} diff --git a/js/dygang.js b/js/dygang.js new file mode 100644 index 0000000..a726de2 --- /dev/null +++ b/js/dygang.js @@ -0,0 +1,251 @@ +var rule = { + title:'电影港[磁]', + 编码:'gb2312', + 搜索编码:'gb2312', + host:'https://www.dygang.tv', + homeUrl:'/', + url: '/fyclass/index_fypage.htm?', + filter_url:'{{fl.class}}', + filter:{ + }, + searchUrl: '/e/search/index123.php#tempid=1&tbname=article&keyborad=**&show=title%2Csmalltext&Submit=%CB%D1%CB%F7;post', + searchable:2, + quickSearch:0, + filterable:0, + headers:{ + 'User-Agent': 'MOBILE_UA', + 'Referer': 'https://www.dygang.tv/' + }, + timeout:5000, + class_name:'最新电影&经典高清&国配电影&经典港片&国剧&日韩剧&美剧&综艺&动漫&纪录片&高清原盘&4K高清区&3D电影&电影专题', + class_url:'ys&bd&gy&gp&dsj&dsj1&yx&zy&dmq&jilupian&1080p&4K&3d&dyzt', + play_parse:true, + play_json:[{ + re:'*', + json:{ + parse:0, + jx:0 + } + }], + lazy:'', + limit:6, + 推荐:'div#tl tr:has(>td>table.border1>tbody>tr>td>a>img);table.border1 img&&alt;table.border1 img&&src;table:eq(2)&&Text;a&&href', + 一级:`js: + pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; + let d = []; + let turl = (MY_PAGE === 1)? '/' : '/index_'+ MY_PAGE + '.htm'; + input = rule.homeUrl + MY_CATE + turl; + let html = request(input); + let list = pdfa(html, 'tr:has(>td>table.border1)'); + list.forEach(it => { + let title = pdfh(it, 'table.border1 img&&alt'); + if (title!==""){ + d.push({ + title: title, + desc: pdfh(it, 'table:eq(1)&&Text'), + pic_url: pd(it, 'table.border1 img&&src', HOST), + url: pdfh(it, 'a&&href') + }); + } + }) + setResult(d); + `, + 二级:{ + title:"div.title a&&Text", + img:"#dede_content img&&src", + desc:"#dede_content&&Text", + content:"#dede_content&&Text", + tabs:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +TABS=[] +let d = pdfa(html, '#dede_content table tbody tr a'); +let tabsa = []; +let tabsq = []; +let tabsm = false; +let tabse = false; +let tabm3u8 = []; +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; + } +}); +if (false){ +d = pdfa(html, 'div:has(>div#post_content) div.widget:has(>h3)'); +d.forEach(function(it) { + tabm3u8.push(pdfh(it, 'h3&&Text')); +}); +} +if (tabsm === true){ + TABS.push("磁力"); +} +if (tabse === true){ + TABS.push("電驢"); +} +if (tabsa.length + tabsq.length > 1){ + TABS.push("選擇右側綫路"); +} +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; +}); +tabm3u8.forEach(function(it){ + TABS.push(it); +}); +log('dygang TABS >>>>>>>>>>>>>>>>>>' + TABS); +`, + lists:`js: +log(TABS); +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +LISTS = []; +let d = pdfa(html, '#dede_content table tbody tr a'); +let lista = []; +let listq = []; +let listm = []; +let liste = []; +let listm3u8 = {}; +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/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + listq.push(loopresult); + }else if (burl.startsWith("magnet")){ + listm.push(loopresult); + }else if (burl.startsWith("ed2k")){ + liste.push(loopresult); + } +}); +if (false){ +d = pdfa(html, 'div:has(>div#post_content) div.widget:has(>h3)'); +d.forEach(function(it){ + let index = pdfh(it, 'h3&&Text'); + let burl = pd(it, 'a&&href', HOST); + let title = pdfh(it, 'a&&Text'); + log('xb6v title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title); + log('xb6v burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl); + let m3u8_html = request(burl); + let playerUrl = pd(m3u8_html, 'div.video&&iframe&&src', HOST); + log('xb6v playerUrl >>>>>>>>>>>>>>>>>>>>>>>>>>' + playerUrl); + if (!listm3u8.hasOwnProperty(index)){ + listm3u8[index] = []; + } + let loopresult = title + '$' + ' '; + if (/(\/player\/|\/share\/)/.test(playerUrl)){ + let player_html = request(playerUrl); + let m3u8Url=""; + try{ + m3u8Url = player_html.match(/'([^']*.m3u8)'/)[1]; + }catch(e){ + try{ + m3u8Url = player_html.match(/"([^"]*.m3u8)"/)[1]; + }catch(e){ + m3u8Url = ""; + } + } + if (m3u8Url !== ""){ + m3u8Url = urljoin2(playerUrl, m3u8Url); + log('xb6v m3u8Url >>>>>>>>>>>>>>>>>>>>>>>>>>' + m3u8Url); + loopresult = title + '$' + m3u8Url; + } + } + listm3u8[index].push(loopresult); +}); +} +if (listm.length>0){ + LISTS.push(listm); +} +if (liste.length>0){ + LISTS.push(liste); +} +if (lista.length + listq.length > 1){ + LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]); +} +lista.forEach(function(it){ + LISTS.push([it]); +}); +listq.forEach(function(it){ + LISTS.push([it]); +}); +for ( const key in listm3u8 ){ + if (listm3u8.hasOwnProperty(key)){ + LISTS.push(listm3u8[key]); + } +}; +`, + + }, + 搜索:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +let params = 'tempid=1&tbname=article&keyboard=' + KEY + '&show=title%2Csmalltext&Submit=%CB%D1%CB%F7'; +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("dygang search postData>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params)); +let search_html = request( HOST + '/e/search/index123.php', _fetch_params, true); +//log("dygang search result>>>>>>>>>>>>>>>" + search_html); +let d=[]; +let dlist = pdfa(search_html, 'table.border1'); +dlist.forEach(function(it){ + let title = pdfh(it, 'img&&alt'); + if (searchObj.quick === true){ + if (title.includes(KEY)){ + title = KEY; + } + } + let img = pd(it, 'img&&src', HOST); + let content = pdfh(it, 'img&&alt'); + let desc = pdfh(it, 'img&&alt'); + let url = pd(it, 'a&&href', HOST); + d.push({ + title:title, + img:img, + content:content, + desc:desc, + url:url + }) +}); +setResult(d); +`, +} diff --git a/js/jiyingw.js b/js/jiyingw.js new file mode 100644 index 0000000..7001b09 --- /dev/null +++ b/js/jiyingw.js @@ -0,0 +1,230 @@ +var rule = { + title:'极影网[磁]', + host:'https://www.jiyingw.net', + homeUrl:'/', + url: '/fyclass/page/fypage?', + //host:'http://127.0.0.1:10079', + //homeUrl:'/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.jiyingw.net', + //url: '/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.jiyingw.net/fyclass/page/fypage?', + filter_url:'{{fl.class}}', + filter:{ + "movie":[{"key":"class","name":"标签","value":[{"n":"全部","v":"movie"},{"n":"4k","v":"tag/4k"}, {"n":"人性","v":"tag/人性"}, {"n":"传记","v":"tag/chuanji"}, {"n":"儿童","v":"tag/儿童"}, {"n":"冒险","v":"tag/adventure"}, {"n":"剧情","v":"tag/剧情"}, {"n":"加拿大","v":"tag/加拿大"}, {"n":"动作","v":"tag/dongzuo"}, {"n":"动漫","v":"tag/动漫"}, {"n":"励志","v":"tag/励志"}, {"n":"历史","v":"tag/history"}, {"n":"古装","v":"tag/古装"}, {"n":"同性","v":"tag/gay"}, {"n":"喜剧","v":"tag/comedy"}, {"n":"国剧","v":"tag/国剧"}, {"n":"奇幻","v":"tag/qihuan"}, {"n":"女性","v":"tag/女性"}, {"n":"家庭","v":"tag/family"}, {"n":"德国","v":"tag/德国"}, {"n":"恐怖","v":"tag/kongbu"}, {"n":"悬疑","v":"tag/xuanyi"}, {"n":"惊悚","v":"tag/jingsong"}, {"n":"意大利","v":"tag/意大利"}, {"n":"战争","v":"tag/zhanzheng"}, {"n":"战斗","v":"tag/战斗"}, {"n":"搞笑","v":"tag/搞笑"}, {"n":"故事","v":"tag/故事"}, {"n":"文艺","v":"tag/文艺"}, {"n":"日常","v":"tag/日常"}, {"n":"日本","v":"tag/日本"}, {"n":"日语","v":"tag/日语"}, {"n":"校园","v":"tag/校园"}, {"n":"武侠","v":"tag/wuxia"}, {"n":"法国","v":"tag/法国"}, {"n":"游戏","v":"tag/游戏"}, {"n":"灾难","v":"tag/zainan"}, {"n":"爱情","v":"tag/爱情"}, {"n":"犯罪","v":"tag/crime"}, {"n":"真人秀","v":"tag/zhenrenxiu"}, {"n":"短片","v":"tag/duanpian"}, {"n":"科幻","v":"tag/kehuan"}, {"n":"纪录","v":"tag/jilu"}, {"n":"美剧","v":"tag/meiju"}, {"n":"舞台","v":"tag/stage"}, {"n":"西部","v":"tag/xibu"}, {"n":"运动","v":"tag/yundong"}, {"n":"韩剧","v":"tag/韩剧"}, {"n":"韩国","v":"tag/韩国"}, {"n":"音乐","v":"tag/yinyue"}, {"n":"高清电影","v":"tag/高清电影"}]}] + }, + searchUrl: '/?s=**', + searchable:2, + quickSearch:0, + filterable:1, + headers:{ + 'User-Agent': 'PC_UA', + 'Cookie':'http://127.0.0.1:9978/file:///tvbox/JS/lib/jiyingw.txt', + 'Accept':'*/*', + 'Referer': 'https://www.jiyingw.net/' + }, + timeout:5000, + class_name:'电影&电视剧&动漫&综艺&影评', + class_url:'movie&tv&cartoon&movie/variety&yingping', + play_parse:true, + play_json:[{ + re:'*', + json:{ + parse:0, + jx:0 + } + }], + lazy:'', + limit:6, + 推荐:'ul#post_container li;a&&title;img&&src;.article entry_post&&Text;a&&href', + 一级:'ul#post_container li;a&&title;img&&src;.article entry_post&&Text;a&&href', + 二级:{ + title:"h1&&Text", + img:"#post_content img&&src", + desc:"#post_content&&Text", + content:"#post_content&&Text", + tabs:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +TABS=[] +let tabsa = []; +let tabsq = []; +let tabsm = false; +let tabse = false; +let d = pdfa(html, '#post_content 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; + } +}); +if (tabsm === true){ + TABS.push("磁力"); +} +if (tabse === true){ + TABS.push("電驢"); +} +if (tabsa.length + tabsq.length > 1){ + TABS.push("選擇右側綫路"); +} +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; +}); +log('jiyingw TABS >>>>>>>>>>>>>>>>>>' + TABS); +`, + lists:`js: +log(TABS); +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +LISTS = []; +let lista = []; +let listq = []; +let listm = []; +let liste = []; +let d = pdfa(html, '#post_content p 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/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + 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/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + listq.push(loopresult); + }else 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); +} +if (lista.length + listq.length > 1){ + LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]); +} +lista.forEach(function(it){ + LISTS.push([it]); +}); +listq.forEach(function(it){ + LISTS.push([it]); +}); +`, + + }, + 搜索:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +if (rule_fetch_params.headers.Cookie.startsWith("http")){ + rule_fetch_params.headers.Cookie=fetch(rule_fetch_params.headers.Cookie); + let cookie = rule_fetch_params.headers.Cookie; + setItem(RULE_CK, cookie); +}; +log('jiyingw search cookie>>>>>>>>>>>>>>>' + rule_fetch_params.headers.Cookie); +let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); +let search_html=request(rule.homeUrl + '?s=' + encodeURIComponent(KEY), _fetch_params); +let d=[]; +let dlist = pdfa(search_html, 'h2'); +log("jiyingw dlist.length>>>>>>>"+dlist.length); +dlist.forEach(function(it){ + let title = pdfh(it, 'a&&title'); + //if (searchObj.quick === true){ + // title = KEY; + //} + let img = ''; + let content = title; + let desc = title; + let url = pd(it, 'a&&href', HOST); + d.push({ + title:title, + img:img, + content:content, + desc:desc, + url:url + }) +}); +setResult(d); +`, +} diff --git a/js/jiyingwp.js b/js/jiyingwp.js new file mode 100644 index 0000000..e547e28 --- /dev/null +++ b/js/jiyingwp.js @@ -0,0 +1,230 @@ +var rule = { + title:'极影网[磁]', + //host:'https://www.jiyingw.net', + //homeUrl:'/', + //url: '/fyclass/page/fypage?', + host:'http://127.0.0.1:10079', + homeUrl:'/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.jiyingw.net/', + url: '/p/0/socks5%253A%252F%252F192.168.101.1%253A1080/https://www.jiyingw.net/fyclass/page/fypage?', + filter_url:'{{fl.class}}', + filter:{ + "movie":[{"key":"class","name":"标签","value":[{"n":"全部","v":"movie"},{"n":"4k","v":"tag/4k"}, {"n":"人性","v":"tag/人性"}, {"n":"传记","v":"tag/chuanji"}, {"n":"儿童","v":"tag/儿童"}, {"n":"冒险","v":"tag/adventure"}, {"n":"剧情","v":"tag/剧情"}, {"n":"加拿大","v":"tag/加拿大"}, {"n":"动作","v":"tag/dongzuo"}, {"n":"动漫","v":"tag/动漫"}, {"n":"励志","v":"tag/励志"}, {"n":"历史","v":"tag/history"}, {"n":"古装","v":"tag/古装"}, {"n":"同性","v":"tag/gay"}, {"n":"喜剧","v":"tag/comedy"}, {"n":"国剧","v":"tag/国剧"}, {"n":"奇幻","v":"tag/qihuan"}, {"n":"女性","v":"tag/女性"}, {"n":"家庭","v":"tag/family"}, {"n":"德国","v":"tag/德国"}, {"n":"恐怖","v":"tag/kongbu"}, {"n":"悬疑","v":"tag/xuanyi"}, {"n":"惊悚","v":"tag/jingsong"}, {"n":"意大利","v":"tag/意大利"}, {"n":"战争","v":"tag/zhanzheng"}, {"n":"战斗","v":"tag/战斗"}, {"n":"搞笑","v":"tag/搞笑"}, {"n":"故事","v":"tag/故事"}, {"n":"文艺","v":"tag/文艺"}, {"n":"日常","v":"tag/日常"}, {"n":"日本","v":"tag/日本"}, {"n":"日语","v":"tag/日语"}, {"n":"校园","v":"tag/校园"}, {"n":"武侠","v":"tag/wuxia"}, {"n":"法国","v":"tag/法国"}, {"n":"游戏","v":"tag/游戏"}, {"n":"灾难","v":"tag/zainan"}, {"n":"爱情","v":"tag/爱情"}, {"n":"犯罪","v":"tag/crime"}, {"n":"真人秀","v":"tag/zhenrenxiu"}, {"n":"短片","v":"tag/duanpian"}, {"n":"科幻","v":"tag/kehuan"}, {"n":"纪录","v":"tag/jilu"}, {"n":"美剧","v":"tag/meiju"}, {"n":"舞台","v":"tag/stage"}, {"n":"西部","v":"tag/xibu"}, {"n":"运动","v":"tag/yundong"}, {"n":"韩剧","v":"tag/韩剧"}, {"n":"韩国","v":"tag/韩国"}, {"n":"音乐","v":"tag/yinyue"}, {"n":"高清电影","v":"tag/高清电影"}]}] + }, + searchUrl: '/?s=**', + searchable:2, + quickSearch:0, + filterable:1, + headers:{ + 'User-Agent': 'PC_UA', + 'Cookie':'http://127.0.0.1:9978/file:///tvbox/JS/lib/jiyingw.txt', + 'Accept':'*/*', + 'Referer': 'https://www.jiyingw.net/' + }, + timeout:5000, + class_name:'电影&电视剧&动漫&综艺&影评', + class_url:'movie&tv&cartoon&movie/variety&yingping', + play_parse:true, + play_json:[{ + re:'*', + json:{ + parse:0, + jx:0 + } + }], + lazy:'', + limit:6, + 推荐:'ul#post_container li;a&&title;img&&src;.article entry_post&&Text;a&&href', + 一级:'ul#post_container li;a&&title;img&&src;.article entry_post&&Text;a&&href', + 二级:{ + title:"h1&&Text", + img:"#post_content img&&src", + desc:"#post_content&&Text", + content:"#post_content&&Text", + tabs:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +TABS=[] +let tabsa = []; +let tabsq = []; +let tabsm = false; +let tabse = false; +let d = pdfa(html, '#post_content 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; + } +}); +if (tabsm === true){ + TABS.push("磁力"); +} +if (tabse === true){ + TABS.push("電驢"); +} +if (tabsa.length + tabsq.length > 1){ + TABS.push("選擇右側綫路"); +} +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; +}); +log('jiyingw TABS >>>>>>>>>>>>>>>>>>' + TABS); +`, + lists:`js: +log(TABS); +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +LISTS = []; +let lista = []; +let listq = []; +let listm = []; +let liste = []; +let d = pdfa(html, '#post_content p 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/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + 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/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + lista.push(loopresult); + }else if (burl.startsWith("https://pan.quark.cn/s/")){ + if (false){ + if (TABS.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = 'push://' + burl; + } + loopresult = title + '$' + burl; + listq.push(loopresult); + }else 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); +} +if (lista.length + listq.length > 1){ + LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]); +} +lista.forEach(function(it){ + LISTS.push([it]); +}); +listq.forEach(function(it){ + LISTS.push([it]); +}); +`, + + }, + 搜索:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +if (rule_fetch_params.headers.Cookie.startsWith("http")){ + rule_fetch_params.headers.Cookie=fetch(rule_fetch_params.headers.Cookie); + let cookie = rule_fetch_params.headers.Cookie; + setItem(RULE_CK, cookie); +}; +log('jiyingw search cookie>>>>>>>>>>>>>>>' + rule_fetch_params.headers.Cookie); +let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); +let search_html=request(rule.homeUrl + '?s=' + encodeURIComponent(KEY), _fetch_params); +let d=[]; +let dlist = pdfa(search_html, 'h2'); +log("jiyingw dlist.length>>>>>>>"+dlist.length); +dlist.forEach(function(it){ + let title = pdfh(it, 'a&&title'); + //if (searchObj.quick === true){ + // title = KEY; + //} + let img = ''; + let content = title; + let desc = title; + let url = pd(it, 'a&&href', HOST); + d.push({ + title:title, + img:img, + content:content, + desc:desc, + url:url + }) +}); +setResult(d); +`, +} diff --git a/js/kkpans.js b/js/kkpans.js new file mode 100644 index 0000000..e0c3b6c --- /dev/null +++ b/js/kkpans.js @@ -0,0 +1,163 @@ +var rule = { + title:'KK網盤[磁]', + host:'https://www.kkpans.com', + homeUrl:'/', + url: '/forum-fyclass-fypage.html?', + //host:'http://192.168.101.1:10078', + //homeUrl:'/p/0/s/https://www.kkpans.com/', + //url: '/p/0/s/https://www.kkpans.com/forum-fyclass-fypage.html?', + filter_url:'{{fl.class}}', + filter:{ + }, + searchUrl: '/search', + searchable:2, + quickSearch:0, + filterable:0, + headers:{ + 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36', + 'Accept': '*/*', + 'Referer': 'https://www.kkpans.com/' + }, + timeout:5000, + class_name:'国外电影&国外电视剧&纪录片资源&综艺资源&动漫资源&音乐资源', + class_url:'39&40&41&42&46&43', + play_parse:true, + play_json:[{ + re:'*', + json:{ + parse:0, + jx:0 + } + }], + lazy:'', + limit:6, + 推荐:'', + 一级:'', + 一级:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +let d = []; +log("kkpans input>>>>>>>>>>>>>>"+input); +let html = request(input); +//log("kkpans 1level html>>>>>>>>>>>>>>"+html); +let list = pdfa(html, 'div.threadlist ul li.list'); +list.forEach(function(it) { + d.push({ + title: pdfh(it, 'div.threadlist_tit&&Text'), + desc: pdfh(it, 'div.threadlist_top div:has(>h3) span&&Text'), + pic_url: '', + url: pd(it, 'li.list&&a[href^="forum.php"]:eq(1)&&href', HOST) + }); +}) +setResult(d); + `, + 二级:{ + title:"div.viewthread&&div.view_tit&&Text", + img:"div.viewthread div.message&&img&&src", + desc:"div.viewthread div.message&&Text", + content:"div.viewthread div.message&&Text", + tabs:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +TABS=[] +let d = pdfa(html, 'div.viewthread div.message a[href^="https://pan.quark.cn/s/"]'); +let index = 1; +if (d.length>1){ + TABS.push("選擇右側綫路"); +} +d.forEach(function(it) { + TABS.push("夸克雲盤" + index); + index = index + 1; +}); +log('meijumi TABS >>>>>>>>>>>>>>>>>>' + TABS); +`, + lists:`js: +log(TABS); +LISTS=[]; +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +let d = pdfa(html, 'div.viewthread div.message a[href^="https://pan.quark.cn/s/"]'); +let index = 1; +if (d.length>1){ + LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]); +} +d.forEach(function(it) { + let burl = pdfh(it, 'a&&href'); + if (false){ + if (d.length==1){ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl); + }else{ + burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl); + } + }else{ + burl = "push://" + burl; + } + let title = pdfh(it, 'a&&Text'); + LISTS.push([title + '$' + burl]); +}); +`, + + }, + 搜索:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; + +let withHeaders = { + withHeaders: true +}; +let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); +Object.assign(_fetch_params, withHeaders); + +let new_html=request(rule.homeUrl + 'search.php?mod=forum', _fetch_params); +log('kkpans search new_html >>>>>>>>>>>>>>>>>>>>>' + new_html); +let json=JSON.parse(new_html); +let setCk=Object.keys(json).find(it=>it.toLowerCase()==="set-cookie"); +let cookie=""; +if (typeof setCk !== "undefined"){ + let d=[]; + for(const key in json[setCk]){ + if (typeof json[setCk][key] === "string"){ + log("kkpans header setCk key>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + json[setCk][key] + " " + (typeof json[setCk][key])); + d.push(json[setCk][key].split(";")[0]); + } + } + cookie=d.join(";"); +} +fetch_params.headers.Cookie=cookie; +rule_fetch_params.headers.Cookie=cookie; +log('kkpans search cookie >>>>>>>>>>>>>>>>>>>>>' + cookie); +//log('kkpans search body >>>>>>>>>>>>>>>>>>>>>' + json['body']); + +new_html = json['body']; + +let formhash = pdfh(new_html, 'input[name="formhash"]&&value'); +log("kkpans formhash>>>>>>>>>>>>>>>" + formhash); +let params = 'formhash=' + formhash + '&searchsubmit=yes&srchtxt=' + encodeURIComponent(KEY); +_fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); +let postData = { + body: params +}; +Object.assign(_fetch_params, postData); +log("kkpans search postData>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params)); +let search_html = post(rule.homeUrl + 'search.php?mod=forum', _fetch_params) +//log("kkpans search result>>>>>>>>>>>>>>>" + search_html); +let d=[]; +let dlist = pdfa(search_html, 'div.threadlist ul li.list'); +dlist.forEach(function(it){ + let title = pdfh(it, 'div.threadlist_tit&&Text'); + if (searchObj.quick === true){ + if (title.includes(KEY)){ + title = KEY; + } + } + let img = ""; + let content = pdfh(it, 'div.threadlist_top div:has(>h3) span&&Text'); + let desc = pdfh(it, 'div.threadlist_top div:has(>h3) span&&Text'); + let url = pd(it, 'a[href^="forum.php?mod=viewthread"]&&href', HOST); + d.push({ + title:title, + img:img, + content:content, + desc:desc, + url:url + }) +}); +setResult(d); +`, +} diff --git a/js/kuba.js b/js/kuba.js new file mode 100644 index 0000000..5a875b4 --- /dev/null +++ b/js/kuba.js @@ -0,0 +1,188 @@ +var rule = { + title:'酷吧[磁]', + host:'https://www.kuba222.com', + homeUrl: '/', + url: '/vodtypehtml/fyclass.html?', + filter_url:'{{fl.class}}', + filter:{ + }, + searchUrl: '/search/**-1.html', + searchable:2, + quickSearch:0, + filterable:0, + headers:{ + 'User-Agent': 'PC_UA', + 'Referer': 'https://www.kuba222.com/' + }, + timeout:5000, + class_name: '最新&4K&电影&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&微电影&电视剧&动漫&纪录片', + class_url: 'new&4K&1&5&6&7&8&9&10&11&21&31&4&16', + play_parse:true, + play_json:[{ + re:'*', + json:{ + parse:0, + jx:0 + } + }], + lazy:'', + limit:6, + 推荐:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +let d = []; +let html = request(input); +let list = pdfa(html, 'ul.stui-vodlist li'); +list.forEach(function (it){ + d.push({ + title: pdfh(it, 'a&&title'), + desc: pdfh(it, 'li&&div&&a&&span&&Text'), + pic_url: pd(it, 'a&&data-original', HOST), + url: pdfh(it, 'a&&href') + }); +}); +setResult(d); +`, + 一级:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +let d = []; +if (MY_CATE === '4K'){ + let turl = (MY_PAGE === 1)? '' : '-' + MY_PAGE; + input = rule.homeUrl + 'vodtopichtml/' + '11' + turl + '.html'; +}else if (MY_CATE === 'new'){ + input = rule.homeUrl + MY_CATE + '.html'; +}else{ + let turl = (MY_PAGE === 1)? '' : '-' + MY_PAGE; + input = rule.homeUrl + 'vodtypehtml/' + MY_CATE + turl + '.html'; +} +let html = request(input); +let list = pdfa(html, 'ul.stui-vodlist li'); +list.forEach(function (it){ + d.push({ + title: pdfh(it, 'a&&title'), + desc: pdfh(it, 'li&&div&&a&&span&&Text'), + pic_url: pd(it, 'a&&data-original', HOST), + url: pdfh(it, 'a&&href') + }); +}); +setResult(d); +`, + 二级:{ + title:"div.stui-content h3&&Text", + img:"div.stui-content a.lazyload img&&src", + desc:'div.stui-content a span&&Text', + content:'div.stui-content p.data&&Text', + tabs:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +TABS=[] +let vodUrls=[]; +try{ + vodUrls.push(html.match(/var GvodUrls1 *= *"([^"]*)"/)[1]); + vodUrls.push(html.match(/var GvodUrls2 *= *"([^"]*)"/)[1]); + vodUrls.push(html.match(/var GvodUrls3 *= *"([^"]*)"/)[1]); + vodUrls.push(html.match(/var GvodUrls4 *= *"([^"]*)"/)[1]); + vodUrls.push(html.match(/var GvodUrls5 *= *"([^"]*)"/)[1]); +}catch(e){ +} +let index=1; +vodUrls.forEach(function (it) { + TABS.push("磁力"+index); + index = index + 1; +}); +log('kuba TABS >>>>>>>>>>>>>>>>>>' + TABS); +`, + lists:`js: +log(TABS); +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +LISTS = []; +let vodUrls=[]; +//log("kuba html>>>>>>>>>>>>>>>>>>>>>>" + html); +try{ + vodUrls.push(html.match(/var GvodUrls1 *= *"([^"]*)"/)[1]); + vodUrls.push(html.match(/var GvodUrls2 *= *"([^"]*)"/)[1]); + vodUrls.push(html.match(/var GvodUrls3 *= *"([^"]*)"/)[1]); + vodUrls.push(html.match(/var GvodUrls4 *= *"([^"]*)"/)[1]); + vodUrls.push(html.match(/var GvodUrls5 *= *"([^"]*)"/)[1]); +}catch(e){ + log('kuba tabs e>>>>>>>>>>>>>>>>>>..' + e); +} +vodUrls.forEach(function (it) { + let epos = it.split("###"); + let d=[]; + epos.forEach(function (it1){ + if (it1.length>0){ + d.push(it1); + } + }); + LISTS.push(d.reverse()); +}); +`, + + }, + 搜索:`js: +pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd; +let cookie=""; +if (false){ +let new_html=request(HOST, {withHeaders:true}); +let json=JSON.parse(new_html); +let setCk=Object.keys(json).find(it=>it.toLowerCase()==="set-cookie"); +if (typeof setCk !== "undefined"){ + let d=[]; + for(const key in json[setCk]){ + if (typeof json[setCk][key] === "string"){ + log("kuba header setCk key>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + json[setCk][key] + " " + (typeof json[setCk][key])); + d.push(json[setCk][key].split(";")[0]); + } + } + cookie=d.join(";"); +} +fetch_params.headers.Cookie=cookie; +rule_fetch_params.headers.Cookie=cookie; +} +log('kuba search cookie >>>>>>>>>>>>>>>>>>>>>' + cookie); + +let params = 'wd='+ encodeURIComponent(KEY) + '&submit='; +let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); +let postData = { + body: params +}; +Object.assign(_fetch_params, postData); +log("kuba search postData>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params)); +let search_html = post( HOST + '/index.php?m=vod-search', _fetch_params) +search_html = search_html.replace(/