From cb4f335c1333b04ad3523b4a03ccca454069a775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=9A=E9=A3=8E=E6=8B=82=E6=9F=B3=E9=A2=9C?= <434857005@qq.com> Date: Wed, 5 Jul 2023 10:07:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=88=B1=E7=9C=8B=E6=9C=BA?= =?UTF-8?q?=E5=99=A8=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/ikanbot2.js | 104 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 87 insertions(+), 17 deletions(-) diff --git a/js/ikanbot2.js b/js/ikanbot2.js index 9d09448..cd14e4a 100644 --- a/js/ikanbot2.js +++ b/js/ikanbot2.js @@ -1,25 +1,95 @@ +var 二级=`js: +try { + VOD={}; + let html1 = request(input); + pdfh = jsp.pdfh; + VOD.vod_id = pdfh(html1, "#current_id&&value"); + VOD.vod_name = pdfh(html1, "h2&&Text"); + VOD.vod_pic = pdfh(html1, ".item-root&&img&&src"); + VOD.vod_actor = pdfh(html1, ".celebrity&&Text"); + VOD.vod_area = pdfh(html1, ".country&&Text"); + VOD.vod_year = pdfh(html1, ".year&&Text"); + VOD.vod_remarks = ""; + VOD.vod_director = ""; + VOD.vod_content = ""; + log(VOD); + input = "https://www.ikanbot.com/api/getResN?videoId=" + input.split("/").pop() + "&mtype=2"; + let html = request(input); + print(html); + html = JSON.parse(html); + let episodes = html.data.list; + let playMap = {}; + if (typeof play_url === "undefined") { + var play_url = "" + } + episodes.forEach(function(ep) { + let playurls = JSON.parse(ep["resData"]); + playurls.forEach(function(playurl) { + let source = playurl["flag"]; + if (!playMap.hasOwnProperty(source)) { + playMap[source] = [] + } + playMap[source].push(playurl["url"]) + }) + }); + let playFrom = []; + let playList = []; + Object.keys(playMap).forEach(function(key) { + playFrom.append(key); + playList.append(playMap[key]) + }); + let vod_play_from = playFrom.join("$$$"); + let vod_play_url = playList.join("$$$"); + VOD["vod_play_from"] = vod_play_from; + VOD["vod_play_url"] = vod_play_url; + log(VOD); +} catch (e) { + log("获取二级详情页发生错误:" + e.message) +} +`; + var rule = { - //title:'麦豆com', + title:'爱看机器人', host:'https://www.ikanbot.com', - //url:'/movie_bt_series/fyclass/page/fypage', + url:'/hot/index-fyclass-fyfilter-p-fypage.html[/hot/index-fyclass-fyfilter.html]', //https://www.ikanbot.com/search?q=%E6%96%97%E7%BD%97%E5%A4%A7&p=2 searchUrl:'/search?q=**&p=fypage', - searchable:0, + searchable:2, quickSearch:0, - filterable:0, + filterable:1, + filter_url:'{{fl.tag}}', + filter:{ + "movie":[{"key":"tag","name":"标签","value":[{"n":"热门","v":"热门"},{"n":"最新","v":"最新"},{"n":"经典","v":"经典"},{"n":"豆瓣高分","v":"豆瓣高分"},{"n":"冷门佳片","v":"冷门佳片"},{"n":"华语","v":"华语"},{"n":"欧美","v":"欧美"},{"n":"韩国","v":"韩国"},{"n":"日本","v":"日本"},{"n":"动作","v":"动作"},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"科幻","v":"科幻"},{"n":"悬疑","v":"悬疑"},{"n":"恐怖","v":"恐怖"},{"n":"治愈","v":"治愈"},{"n":"豆瓣top250","v":"豆瓣top250"}]}] + ,"tv":[{"key":"tag","name":"标签","value":[{"n":"热门","v":"热门"},{"n":"美剧","v":"美剧"},{"n":"英剧","v":"英剧"},{"n":"韩剧","v":"韩剧"},{"n":"日剧","v":"日剧"},{"n":"国产剧","v":"国产剧"},{"n":"港剧","v":"港剧"},{"n":"日本动画","v":"日本动画"},{"n":"综艺","v":"综艺"},{"n":"纪录片","v":"纪录片"}]}] + }, + filter_def:{ + movie:{tag:'热门'}, + tv:{tag:'最新'}, + }, + filter获取方法:` + let value = []; + $('ul').eq(2).find('li').each(function() { + // console.log($(this).text()); + let n = $(this).text().trim(); + value.push({ + 'n': n, 'v': n + }); + }); + // 电影执行: + let data = {'movie': [{'key': 'tag', 'name': '标签', 'value': value}]}; + console.log(JSON.stringify(data)); + + //剧集执行: + let data = {'tv': [{'key': 'tag', 'name': '标签', 'value': value}]}; + console.log(JSON.stringify(data)); + `, headers:{'User-Agent':'MOBILE_UA',}, - //class_name:'国产&港台&欧美&韩剧&日剧&泰剧&剧集&电影&动漫&综艺', - //class_url:'guocanju&gangtai&en&hanju&riju&taiju&tv&movie&ac&zongyi', - //cate_exclude:'留言|幸运码|更多播放线路|蚂蚁导航|迷历史', + class_name:'电影&剧集', + class_url:'movie&tv', play_parse:true, - //推荐:'.newindex&&ul&&li;img&&alt;img&&data-original;.jidi&&Text;a&&href', - //一级:'.mrb&&ul&&li;img&&alt;img&&data-original;.jidi&&Text;a&&href', - 推荐:'', //这里可以为空,这样点播不会有内容 - 一级:'', //一级的内容是推荐或者点播时候的一级匹配 - // 二级 title: 片名;类型 - // 二级 desc: 主要信息;年代;地区;演员;导演 - // 或者 {title:'',img:'',desc:'',content:'',tabs:'',lists:'',tab_text:'body&&Text',list_text:'body&&Text',list_url:'a&&href'} 同海阔dr二级 - 二级:'js:try {VOD=[]; let html1=request(input);pdfh=jsp.pdfh;VOD.vod_id=pdfh(html1, "#current_id&&value");VOD.vod_name=pdfh(html1, "h2&&Text");VOD.vod_pic=pdfh(html1, "img&&data-src");VOD.vod_actor=pdfh(html1, ".celebrity&&Text");VOD.vod_area=pdfh(html1, ".country&&Text");VOD.vod_year=pdfh(html1, ".year&&Text");VOD.vod_remarks="";VOD.vod_director="";VOD.vod_content="";log(input);input="https://www.ikanbot.com/api/getResN?videoId="+input.split("/").pop()+"&mtype=2";let html=request(input);print(html);html=JSON.parse(html);let episodes=html.data.list; let playMap={};if (typeof play_url==="undefined"){var play_url=""}episodes.forEach(function(ep){let playurls=JSON.parse(ep["resData"]);playurls.forEach(function(playurl){let source=playurl["flag"];if (!playMap.hasOwnProperty(source)){playMap[source]=[]}playMap[source].append(playurl["url"])})});let playFrom=[];let playList=[];Object.keys(playMap).forEach(function(key){playFrom.append(key);playList.append(playMap[key])});let vod_play_from=playFrom.join("$$$");let vod_play_url=playList.join("$$$");VOD["vod_play_from"]=vod_play_from;VOD["vod_play_url"]=vod_play_url}catch (e){log("获取二级详情页发生错误:"+e.message)}', - 搜索:'div[class*=media-left];a&&img&&alt;a&&img&&src;;a&&href',//第三个是描述,一般显示更新或者完结 - //搜索:'.media-left;a&&img&&alt;a&&img&&src;;a&&href',//第三个是描述,一般显示更新或者完结 + double:true, + 推荐:'.v-list;div.item;*;*;*;*', //这里可以为空,这样点播不会有内容 + 一级:'.v-list&&div.item;p&&Text;img&&src;;a&&href', //一级的内容是推荐或者点播时候的一级匹配 + 二级:二级, + 搜索:'#search-result&&.media;h5&&a&&Text;a&&img&&src;.label&&Text;a&&href',//第三个是描述,一般显示更新或者完结 } \ No newline at end of file