Sync all projects

This commit is contained in:
github-actions[bot]
2026-06-29 03:41:14 +00:00
parent 529cd7c625
commit 8b025e0766
11717 changed files with 6370622 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
var rule = {
title:'310直播',
host:'http://www.310.tv',
url:'/?s=0&t=1&a=fyclass&g=fypage',
searchUrl:'',
searchable:0,
quickSearch:0,
class_name:'热门&足球&篮球',
class_url:'0&1&2',
headers:{
'User-Agent':'MOBILE_UA'
},
timeout:5000,
play_parse:false,
lazy:'',
limit:6,
double:false,
推荐:'*',
一级:'.list_content a;.jiabifeng&&p:lt(5)&&Text;.feleimg img&&src;a&&t-nzf-o;a&&href',
二级:'*',
搜索:'',
}
+35
View File
@@ -0,0 +1,35 @@
var rule = {
title: '39影视',
host: 'http://39ysm.cc',
url: '/39/fyclass/page/fypage',
searchUrl: '/wd/**/page/fypage',
searchable: 2,
quickSearch: 0,
filterable: 0,
headers: {
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
},
cate_exclude: "电视剧|动漫|综艺",
class_name:'电影&电视剧&综艺&动漫',
class_url:'fuli&dalu&dlzy&gcdm',
// class_parse: '.stui-header__menu li;a&&Text;a&&href',
play_parse: true,
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input = url && url.startsWith('http') && tellIsJx(url) ? {parse:0,jx:1,url:url}:input;\n }",
limit: 6,
double: true,
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
二级: {
title: '.stui-content__detail .title&&Text;.stui-content__detail&&p:eq(-2)&&a&&Text',
title1: '.stui-content__detail .title&&Text;.stui-content__detail&&p&&Text',
img: '.stui-content__thumb .lazyload&&data-original',
desc: '.stui-content__detail p&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(2)&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text;.stui-content__detail p:eq(1)&&Text',
desc1: '.stui-content__detail p:eq(4)&&Text;;;.stui-content__detail p:eq(1)&&Text',
content: '.detail&&Text',
tabs: '.stui-pannel__head h3',
tabs1: '.stui-vodlist__head h3',
lists: '.stui-content__playlist:eq(#id) li:gt(0)',
},
搜索: 'ul.stui-vodlist__media,ul.stui-vodlist,#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
}
+40
View File
@@ -0,0 +1,40 @@
var rule = {
title: '56动漫',
host: 'https://www.56dm.cc/',
url: 'https://www.56dm.cc/type/fyclass-fypage.html',
searchUrl: 'https://www.56dm.cc/search/**----------fypage---.html',
searchable: 2, //是否启用全局搜索,
quickSearch: 0, //是否启用快速搜索,
filterable: 0, //是否启用分类筛选,
headers: {
'User-Agent': 'UC_UA', // "Cookie": ""
}, // class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
class_parse: '.snui-header-menu-nav li:gt(0):lt(6);a&&Text;a&&href;.*/(.*?).html',
play_parse: true,
lazy: `js:
if(/\\.(m3u8|mp4)/.test(input)){
input = {parse:0,url:input}
}else{
if(rule.parse_url.startsWith('json:')){
let purl = rule.parse_url.replace('json:','')+input;
let html = request(purl);
input = {parse:0,url:JSON.parse(html).url}
}else{
input= rule.parse_url+input;
}
}
`,
limit: 6,
推荐: '.cCBf_FAAEfbc;li;a&&title;.lazyload&&data-original;.dAD_BBCI&&Text;a&&href',
double: true, // 推荐内容是否双层定位
一级: '.cCBf_FAAEfbc li;a&&title;a&&data-original;.dAD_BBCI&&Text;a&&href',
二级: {
"title": "h1&&Text",
"img": ".stui-content__thumb .lazyload&&data-original",
"desc": ".cCBf_DABCcac__hcIdeE p:eq(0)&&Text;.cCBf_DABCcac__hcIdeE p:eq(1)&&Text;.cCBf_DABCcac__hcIdeE p:eq(2)&&Text;.cCBf_DABCcac__hcIdeE p:eq(3)&&Text;.cCBf_DABCcac__hcIdeE p:eq(4)&&Text",
"content": ".detail&&Text",
"tabs": ".channel-tab li",
"lists": ".play-list-content:eq(#id) li"
},
搜索: '.cCBf_FAAEfbc__dbD;a&&title;.lazyload&&data-original;.dAD_BBCI&&Text;a&&href;.cCBf_FAAEfbc__hcIdeE&&p:eq(0) p&&Text',
}
+169
View File
@@ -0,0 +1,169 @@
// 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
// 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
// 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
// 3个set-Cookie
var rule = {
title:'Anime1动畫',
host:'https://anime1.me',
url: '/fyclass',
detailUrl:'/?cat=fyid',
searchUrl: '/page/fypage?s=**',
searchable:2,
quickSearch:0,
headers:{'User-Agent': 'PC_UA'},
timeout:5000,
class_name:'連載中&2025&2024&2023&2022&2021&2020&2019&2018&更早',
class_url:'連載中&2025&2024&2023&2022&2021&2020&2019&2018&2017',
play_parse:true,
lazy:`js:
var apiurl = 'https://v.anime1.me/api';
var html = request(apiurl, {
headers: {
'Referer': HOST,
},
body: 'd=' + input,
method: 'POST',
withHeaders: true
});
let json = JSON.parse(html);
print(json);
log(Object.keys(json));
let setCk = Object.keys(json).filter(it => it.toLowerCase() === "set-cookie");
let cookie = setCk ? json[setCk] : "";
// 3个set-Cookie
if (Array.isArray(cookie)) {
cookie = cookie.join(';');
}
cookie = cookie.split(';').filter(function(it) {
return ['e', 'p', 'h'].includes(it.split('=')[0])
}).join(';');
log(cookie);
var purl = JSON.parse(json.body).s[0].src;
if (purl.startsWith('/')) {
purl = 'https:' + purl
}
input = {
jx: 0,
url: purl,
parse: 0,
header: JSON.stringify({
'referer': HOST,
'Cookie': cookie,
'user-agent': PC_UA
}),
}
`,
limit:6,
推荐: `js:
var d = [];
function stripHtmlTag(src) {
return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
}
var timestamp = new Date().getTime();
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
var list = JSON.parse(json);
let playKeys = Object.values(list).filter(function(x) {
return x[2].includes('連載中');
});
playKeys.forEach(function(it) {
d.push({
title: stripHtmlTag(it[1]),
img: 'https://sta.anicdn.com/playerImg/8.jpg',
desc: it[2],
url: it[0],
});
});
setResult(d);
`,
一级: `js:
var d = [];
function stripHtmlTag(src) {
return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
}
var timestamp = new Date().getTime();
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
var list = JSON.parse(json);
let playKeys = Object.values(list).filter(function(x) {
if (MY_CATE === '連載中') return x[2].includes(MY_CATE);
else if (MY_CATE === '2017') return x[3] <= MY_CATE;
else return x[3] == MY_CATE;
});
playKeys.forEach(function(it) {
d.push({
title: stripHtmlTag(it[1]),
img: 'https://sta.anicdn.com/playerImg/8.jpg',
desc: it[2],
url: it[0],
});
});
setResult(d);
`,
二级: `js:
pdfh = jsp.pdfh; pdfa = jsp.pdfa; pd = jsp.pd;
var html = request(input);
var timestamp = new Date().getTime();
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
var list = JSON.parse(json);
var vid = input.split('=')[1];
let playKeys = Object.values(list).find(function(x) {
return x[0] === parseInt(vid);
});
VOD = {
vod_pic: 'https://sta.anicdn.com/playerImg/8.jpg',
vod_id: playKeys[0],
vod_name: playKeys[1],
vod_content: playKeys[2],
vod_year: playKeys[3],
type_name: playKeys[4],
vod_actor: playKeys[5],
};
var pageurl = pd(html, '.cat-links&&a&&href');
var pagenum = 1;
let vod_tab_list = [];
let vlist = [];
for (let p = 1; p < parseInt(pagenum) + 1; p++) {
let phtml = request(pageurl + '/page/' + pagenum);
let new_vod_list = [];
let vodList = [];
vodList = pdfa(phtml, '.site-main&&article');
for (let i = 0; i < vodList.length; i++) {
let it = vodList[i];
let ptitle = pdfh(it, '.entry-title&&Text').replace(/\\[(.*)\\]/, '$1');
let purl = pd(it, '.video-js&&data-apireq');
new_vod_list.push(ptitle + '$' + purl);
}
vlist = vlist.concat(new_vod_list);
try {
pagenum = pd(phtml, '.nav-previous&&a&&href').split('/page/')[1];
} catch(e) {}
}
let vlist2 = vlist.reverse().join("#");
vod_tab_list.push(vlist2);
VOD.vod_play_from = '在线播放';
VOD.vod_play_url = vod_tab_list.join("$$$");
`,
搜索: `js:
var d = [];
function stripHtmlTag(src) {
return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
}
var timestamp = new Date().getTime();
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
var list = JSON.parse(json);
var wd = input.split('=')[1];
let playKeys = Object.values(list).filter(function(x) {
return x[1].includes(wd);
});
log(playKeys);
playKeys.forEach(function(it) {
d.push({
title: stripHtmlTag(it[1]),
img: 'https://sta.anicdn.com/playerImg/8.jpg',
desc: it[2],
url: it[0],
});
});
setResult(d);
`,
}
+1013
View File
@@ -0,0 +1,1013 @@
// http://www.ntdm.tv
var rule = {
title: 'NT动漫',
host: 'http://www.ntdm8.com',
homeUrl: '/type/riben.html',
// url:'/show/fyclass--------fypage---.html',
url: '/show/fyclassfyfilter.html',
filterable: 1, //是否启用分类筛选,
filter_url: '--{{fl.by}}-{{fl.class}}--{{fl.letter}}---fypage---{{fl.year}}',
filter: {
"riben": [{
"key": "year",
"name": "年份:",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}, {
"n": "2003",
"v": "2003"
}, {
"n": "2002",
"v": "2002"
}, {
"n": "2001",
"v": "2001"
}, {
"n": "2000以前",
"v": "2000以前"
}]
}, {
"key": "class",
"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": "悬疑",
"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": "耽美",
"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": "欢乐向"
}]
}, {
"key": "letter",
"name": "字母:",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "A"
}, {
"n": "B",
"v": "B"
}, {
"n": "C",
"v": "C"
}, {
"n": "D",
"v": "D"
}, {
"n": "E",
"v": "E"
}, {
"n": "F",
"v": "F"
}, {
"n": "G",
"v": "G"
}, {
"n": "H",
"v": "H"
}, {
"n": "I",
"v": "I"
}, {
"n": "J",
"v": "J"
}, {
"n": "K",
"v": "K"
}, {
"n": "L",
"v": "L"
}, {
"n": "M",
"v": "M"
}, {
"n": "N",
"v": "N"
}, {
"n": "O",
"v": "O"
}, {
"n": "P",
"v": "P"
}, {
"n": "Q",
"v": "Q"
}, {
"n": "R",
"v": "R"
}, {
"n": "S",
"v": "S"
}, {
"n": "T",
"v": "T"
}, {
"n": "U",
"v": "U"
}, {
"n": "V",
"v": "V"
}, {
"n": "W",
"v": "W"
}, {
"n": "X",
"v": "X"
}, {
"n": "Y",
"v": "Y"
}, {
"n": "Z",
"v": "Z"
}, {
"n": "0~9",
"v": "0~9"
}]
}, {
"key": "by",
"name": "排序:",
"value": [{
"n": "更新时间",
"v": "time"
}, {
"n": "人气",
"v": "hits"
}, {
"n": "评分",
"v": "score"
}]
}],
"zhongguo": [{
"key": "year",
"name": "年份:",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}, {
"n": "2003",
"v": "2003"
}, {
"n": "2002",
"v": "2002"
}, {
"n": "2001",
"v": "2001"
}, {
"n": "2000以前",
"v": "2000以前"
}]
}, {
"key": "class",
"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": "悬疑",
"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": "耽美",
"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": "欢乐向"
}]
}, {
"key": "letter",
"name": "字母:",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "A"
}, {
"n": "B",
"v": "B"
}, {
"n": "C",
"v": "C"
}, {
"n": "D",
"v": "D"
}, {
"n": "E",
"v": "E"
}, {
"n": "F",
"v": "F"
}, {
"n": "G",
"v": "G"
}, {
"n": "H",
"v": "H"
}, {
"n": "I",
"v": "I"
}, {
"n": "J",
"v": "J"
}, {
"n": "K",
"v": "K"
}, {
"n": "L",
"v": "L"
}, {
"n": "M",
"v": "M"
}, {
"n": "N",
"v": "N"
}, {
"n": "O",
"v": "O"
}, {
"n": "P",
"v": "P"
}, {
"n": "Q",
"v": "Q"
}, {
"n": "R",
"v": "R"
}, {
"n": "S",
"v": "S"
}, {
"n": "T",
"v": "T"
}, {
"n": "U",
"v": "U"
}, {
"n": "V",
"v": "V"
}, {
"n": "W",
"v": "W"
}, {
"n": "X",
"v": "X"
}, {
"n": "Y",
"v": "Y"
}, {
"n": "Z",
"v": "Z"
}, {
"n": "0~9",
"v": "0~9"
}]
}, {
"key": "by",
"name": "排序:",
"value": [{
"n": "更新时间",
"v": "time"
}, {
"n": "人气",
"v": "hits"
}, {
"n": "评分",
"v": "score"
}]
}],
"omei": [{
"key": "year",
"name": "年份:",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}, {
"n": "2003",
"v": "2003"
}, {
"n": "2002",
"v": "2002"
}, {
"n": "2001",
"v": "2001"
}, {
"n": "2000以前",
"v": "2000以前"
}]
}, {
"key": "class",
"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": "悬疑",
"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": "耽美",
"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": "欢乐向"
}]
}, {
"key": "letter",
"name": "字母:",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "A"
}, {
"n": "B",
"v": "B"
}, {
"n": "C",
"v": "C"
}, {
"n": "D",
"v": "D"
}, {
"n": "E",
"v": "E"
}, {
"n": "F",
"v": "F"
}, {
"n": "G",
"v": "G"
}, {
"n": "H",
"v": "H"
}, {
"n": "I",
"v": "I"
}, {
"n": "J",
"v": "J"
}, {
"n": "K",
"v": "K"
}, {
"n": "L",
"v": "L"
}, {
"n": "M",
"v": "M"
}, {
"n": "N",
"v": "N"
}, {
"n": "O",
"v": "O"
}, {
"n": "P",
"v": "P"
}, {
"n": "Q",
"v": "Q"
}, {
"n": "R",
"v": "R"
}, {
"n": "S",
"v": "S"
}, {
"n": "T",
"v": "T"
}, {
"n": "U",
"v": "U"
}, {
"n": "V",
"v": "V"
}, {
"n": "W",
"v": "W"
}, {
"n": "X",
"v": "X"
}, {
"n": "Y",
"v": "Y"
}, {
"n": "Z",
"v": "Z"
}, {
"n": "0~9",
"v": "0~9"
}]
}, {
"key": "by",
"name": "排序:",
"value": [{
"n": "更新时间",
"v": "time"
}, {
"n": "人气",
"v": "hits"
}, {
"n": "评分",
"v": "score"
}]
}]
},
searchUrl: '/search/**----------fypage---.html',
searchable: 2, //是否启用全局搜索,
quickSearch: 0, //是否启用快速搜索,
headers: { //网站的请求头,完整支持所有的,常带ua和cookies
'User-Agent': 'MOBILE_UA',
},
class_parse: '.search-tag li;a&&Text;a&&href;.*/(\\w+).html',
play_parse: true,
detailUrl: '',
lazy: "",
limit: 6,
推荐: '*',
一级: '.blockcontent1&&.blockdif2;img&&alt;img&&src;.newname&&Text;a&&href',
二级访问前: '',
二级: {
"title": "h4&&Text;.detail_imform_value:eq(6)&&Text",
"img": ".poster&&src",
"desc": ".detail_imform_kv:eq(0)&&Text;.detail_imform_value:eq(5)&&Text;.detail_imform_value:eq(2)&&Text;.detail_imform_kv:eq(0)&&Text;.detail_imform_kv:eq(3)&&Text",
"content": ".detail_imform_desc_pre&&Text",
"tabs": "#menu0&&li",
"lists": ".movurl:eq(#id)&&li"
},
搜索: '*',
}
+193
View File
@@ -0,0 +1,193 @@
//本资源来源于互联网公开渠道,仅可用于个人学习爬虫技术。
//严禁将其用于任何商业用途,下载后请于 24 小时内删除,搜索结果均来自源站,本人不承担任何责任。
let host = '';
const tab = new Set(['泰剧','日剧','美剧','台剧']);
const headers = {
'User-Agent': 'okhttp-okgo/jeasonlzy',
'Connection': 'Keep-Alive',
'Accept-Language': 'zh-CN,zh;q=0.8'
};
async function init(cfg) {
let ext = cfg.ext;
if (typeof ext === 'string' && ext.startsWith('http')) {
host = ext;
}
}
async function home(filter) {
if (!host) return JSON.stringify({ class: [] });
const resp = await req(`${host}/v3/type/top_type`, {
method: 'post',
data: payload(),
postType: 'form',
headers: headers
});
const json = JSON.parse(resp.content);
let classes = [];
for (const i of json.data.list) {
if (!tab.has(i.type_name)) {
classes.push({
'type_id': i.type_id.toString(),
'type_name': i.type_name
});
}
}
return JSON.stringify({ class: classes });
}
async function homeVod() {
if (!host) return JSON.stringify({ list: [] });
const resp = await req(`${host}/v3/type/tj_vod`, {
method: 'post',
data: payload({ '': '' }),
postType: 'form',
headers: headers
});
const data = JSON.parse(resp.content).data;
let videos = [];
videos.push(...arr2vods(data.cai || []));
videos.push(...arr2vods(data.loop || []));
for (const i of (data.type_vod || [])) {
if (!tab.has(i.type_name)) {
videos.push(...arr2vods(i.vod || []));
}
}
return JSON.stringify({ list: videos });
}
async function category(tid, pg, filter, extend) {
if (!host) return JSON.stringify({ list: [] });
const resp = await req(`${host}/v3/home/type_search`, {
method: 'post',
data: payload({ 'type_id': tid.toString(), 'page': pg.toString() }),
postType: 'form',
headers: headers
});
const json = JSON.parse(resp.content);
return JSON.stringify({list: arr2vods(json.data.list), page: parseInt(pg)});
}
async function search(wd, quick, pg) {
if (!host) return JSON.stringify({ list: [] });
const resp = await req(`${host}/v3/home/search`, {
method: 'post',
data: payload({ 'keyword': wd }),
postType: 'form',
headers: headers
});
const json = JSON.parse(resp.content);
let videos = arr2vods(json.data.list);
return JSON.stringify({ list: videos, page: parseInt(pg || '1') });
}
async function detail(id) {
if (!host) return JSON.stringify({ list: [] });
const resp = await req(`${host}/v3/home/vod_details`, {
method: 'post',
data: payload({ 'vod_id': id.toString() }),
postType: 'form',
headers: headers
});
const data = JSON.parse(resp.content).data;
let shows = [];
let play_urls = [];
for (const i of data.vod_play_list) {
const parses = i.parse_urls.join(',');
let urls = [];
for (const j of i.urls) {
urls.push(`${j.name}$${j.url}@${parses}@${i.ua || ''}@${i.referer || ''}`);
}
play_urls.push(urls.join('#'));
let name = (i.title || i.name || '').replace(/[\(](?:点击|换)[^)]*[\)]|[Z▶❤【].*/g, '');
if (name === i.flag) {
shows.push(name);
} else {
shows.push(`${name}(${i.flag})`);
}
}
const video = {
'vod_id': data.vod_id.toString(),
'vod_name': data.vod_name,
'vod_pic': data.vod_pic || data.vod_pic_thumb,
'vod_remarks': data.vod_remarks,
'vod_year': data.vod_year,
'vod_area': data.vod_area,
'vod_actor': data.vod_actor,
'vod_director': data.vod_director,
'vod_content': data.vod_content,
'vod_play_from': shows.join('$$$'),
'vod_play_url': play_urls.join('$$$'),
'type_name': data.vod_class
};
return JSON.stringify({ list: [video] });
}
async function play(flag, id, flags) {
const parts = id.split('@');
const raw_url = parts[0];
const parses = parts[1] ? parts[1].split(',') : [];
const ua = parts[2] || '';
const referer = parts[3] || '';
let play_headers = {};
if (ua) play_headers['User-Agent'] = ua;
if (referer) play_headers['Referer'] = referer;
let final_url = '';
let jx = 0;
for (const parse of parses) {
if (parse.startsWith('http')) {
try {
const res = await req(parse + raw_url, { headers: headers });
const json = JSON.parse(res.content);
if (json.url && json.url.startsWith('http')) {
final_url = json.url;
break;
}
} catch (e) {}
}
}
if (!final_url && raw_url.startsWith('http')) {
final_url = raw_url;
if (/(?:www\.iqiyi|v\.qq|v\.youku|www\.mgtv|www\.bilibili)\.com/.test(raw_url)) {
jx = 1;
}
}
return JSON.stringify({parse: jx, url: final_url, header: play_headers});
}
function arr2vods(arr) {
let videos = [];
for (const i of arr) {
try {
if(i.vod_name !== '首页轮播'){
videos.push({
'vod_id': i.vod_id.toString(),
'vod_name': i.vod_name,
'vod_pic': i.vod_pic || i.vod_pic_thumb,
'vod_remarks': i.vod_remarks,
'type_name': i.type_name,
'vod_year': i.vod_year
});
}
} catch (e) {}
}
return videos;
}
function payload(arr = {}) {
const timestamp = Math.floor(Date.now() / 1000).toString();
const sign = md5X('7gp0bnd2sr85ydii2j32pcypscoc4w6c7g5spl' + timestamp);
return {...arr, 'sign': sign, 'timestamp': timestamp};
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
search: search,
detail: detail,
play: play
};
}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
var il='jsjiami.com.v6',il_=['il'],lIIIl1ll=[il,'\x6f\x6b\x68\x74\x74\x70\x2f\x33\x2e\x31\x35','\x69\x6e\x64\x65\x78\x4f\x66','\x24\x24\x24','\x73\x70\x6c\x69\x74','\x74\x72\x69\x6d','\x26\x26\x26','\x3a\x2f\x2f','\x6c\x6f\x67','\x70\x69\x63\x55\x72\x6c\x3a\x20','\x72\x65\x70\x6c\x61\x63\x65','\x70\x75\x73\x68','\x2f\x66\x69\x6c\x65\x2f\x6c\x69\x76\x65\x73\x6f\x75\x72\x63\x65\x6c\x69\x73\x74','\x2f\x6c\x69\x76\x65\x73\x6f\x75\x72\x63\x65\x6c\x69\x73\x74','\x47\x45\x54','\x70\x61\x72\x73\x65','\x63\x6f\x6e\x74\x65\x6e\x74','\x73\x75\x62\x73\x74\x72\x69\x6e\x67','\x6c\x61\x73\x74\x49\x6e\x64\x65\x78\x4f\x66','\x6e\x61\x6d\x65','\x75\x72\x6c','\x3d\x3d\x3d\x3d\x20\x3e\x3e\x3e\x20','\x73\x74\x72\x69\x6e\x67\x69\x66\x79','\x65\x78\x65\x63','\x74\x65\x73\x74','\x6d\x61\x74\x63\x68','\x63\x68\x61\x6e\x6e\x65\x6c','\x2c\x23\x67\x65\x6e\x72\x65\x23\x0a','\x75\x72\x6c\x73','\x64\x61\x74\x61','\x64\x61\x74\x61\x6c\x69\x73\x74','\x70\x72\x6f\x76','\x6c\x69\x73\x74','\x2d\x2d\x2d','\x6c\x69\x6e\x65','\x77\x65\x62\x50\x69\x63\x55\x72\x6c\x3a\x20','\x23\x45\x58\x54\x4d\x33\x55','\x22\x63\x68\x61\x6e\x6e\x65\x6c\x22','\x22\x75\x72\x6c\x73\x22','\x22\x64\x61\x74\x61\x6c\x69\x73\x74\x22','\x6c\x65\x6e\x67\x74\x68','\x23\x67\x65\x6e\x72\x65\x23','\x7b\x6e\x61\x6d\x65\x7d','\x7b\x63\x61\x74\x65\x7d','\u76f4\u64ad\u5217\u8868','\x6e\x75\x6c\x6c','\x74\x79\x70\x65\x5f\x69\x64','\x76\x6f\x64\x5f\x70\x6c\x61\x79\x5f\x75\x72\x6c','\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79','\x6a\x6f\x69\x6e','\x76\x6f\x64\x5f\x70\x6c\x61\x79\x5f\x66\x72\x6f\x6d','\x6a\x43\x50\x73\x4e\x6a\x77\x69\x4a\x61\x51\x6d\x69\x2e\x63\x6f\x4e\x4f\x6d\x47\x72\x2e\x76\x56\x36\x41\x46\x67\x79\x74\x74\x3d\x3d'];function Ii1l1III(_0x3b13df,_0x346a54){_0x3b13df=~~'0x'['concat'](_0x3b13df['slice'](0x0));var _0x4db44b=lIIIl1ll[_0x3b13df];return _0x4db44b;};(function(_0x209161,_0x5eaa4a){var _0x42ecdf=0x0;for(_0x5eaa4a=_0x209161['shift'](_0x42ecdf>>0x2);_0x5eaa4a&&_0x5eaa4a!==(_0x209161['pop'](_0x42ecdf>>0x3)+'')['replace'](/[CPNwJQNOGrVAFgytt=]/g,'');_0x42ecdf++){_0x42ecdf=_0x42ecdf^0x127efd;}}(lIIIl1ll,Ii1l1III));let headers={'User-Agent':Ii1l1III('0')};let classes=[];let cates={};let picUrl='';let webPaths={};function init(IiIIi1i){let i1Ii11I1='';if(IiIIi1i[Ii1l1III('1')](Ii1l1III('2'))>0x0){i1Ii11I1=IiIIi1i[Ii1l1III('3')](Ii1l1III('2'))[0x0][Ii1l1III('4')]();IiIIi1i=IiIIi1i[Ii1l1III('3')](Ii1l1III('2'))[0x1][Ii1l1III('4')]();}if(IiIIi1i[Ii1l1III('1')](Ii1l1III('5'))>0x0){picUrl=IiIIi1i[Ii1l1III('3')](Ii1l1III('5'))[0x1][Ii1l1III('4')]();if(picUrl[Ii1l1III('1')](Ii1l1III('6'))<0x0){picUrl=i1Ii11I1+picUrl;}IiIIi1i=IiIIi1i[Ii1l1III('3')](Ii1l1III('5'))[0x0][Ii1l1III('4')]();}console[Ii1l1III('7')](Ii1l1III('8')+picUrl);let IIlIlI1I=IiIIi1i[Ii1l1III('3')]('\x23');for(const IlII1I1 of IIlIlI1I){if(IlII1I1[Ii1l1III('1')]('\x24')>0x0){let illIl111=IlII1I1;let Ill1iIi=IlII1I1[Ii1l1III('3')]('\x24')[0x0];if(illIl111[Ii1l1III('1')](Ii1l1III('6'))<0x0){illIl111=illIl111[Ii1l1III('9')]('\x24','\x24'+i1Ii11I1);}classes[Ii1l1III('a')]({'type_id':illIl111,'type_name':Ill1iIi[Ii1l1III('9')]('\x21\x21','')});}else{let II1lIlli=IlII1I1;if(II1lIlli[Ii1l1III('1')](Ii1l1III('6'))<0x0){II1lIlli=i1Ii11I1+II1lIlli;}II1lIlli=II1lIlli[Ii1l1III('9')](Ii1l1III('b'),Ii1l1III('c'));let Illi11ll=req(II1lIlli,{'\x6d\x65\x74\x68\x6f\x64':Ii1l1III('d'),'\x68\x65\x61\x64\x65\x72\x73':headers});try{let l1lIiill=JSON[Ii1l1III('e')](Illi11ll[Ii1l1III('f')]);let lillI11l=II1lIlli[Ii1l1III('10')](0x0,II1lIlli[Ii1l1III('11')]('\x2f')+0x1);for(const i1iilII1 of l1lIiill){let Iillil=i1iilII1[Ii1l1III('12')];let lI1iIl=i1iilII1[Ii1l1III('13')];let illIl111=Iillil+'\x24'+(lI1iIl[Ii1l1III('1')](Ii1l1III('6'))<0x0?lillI11l:'')+lI1iIl;classes[Ii1l1III('a')]({'type_id':illIl111,'type_name':Iillil[Ii1l1III('9')]('\x21\x21','')});webPaths[illIl111]=lillI11l;}}catch(Ii1Ii11){console[Ii1l1III('7')](Ii1l1III('14')+Ii1Ii11);}}}}function home(I1iiIiIl){return JSON[Ii1l1III('15')]({'class':classes,'filters':null});}function parseM3u(iIi1Ii1I,I1IlIIIi){let iI1iiIii={};let iiI11111=/(#EXTINF:.+?),([^,]+?)\s*\n(.+?)\s*\n/g;let ii1iilil=null;while((ii1iilil=iiI11111[Ii1l1III('16')](iIi1Ii1I))!=null){let lllli1iI=ii1iilil[0x1];let il1Ili1I=ii1iilil[0x2];let liIlll1l=ii1iilil[0x3];if(il1Ili1I==null||liIlll1l==null||il1Ili1I==''||liIlll1l==''){continue;}il1Ili1I=il1Ili1I[Ii1l1III('4')]();liIlll1l=liIlll1l[Ii1l1III('4')]();let IiI1lI1l=I1IlIIIi;let ilIl1i1i=/group-title="(.*?)"/;if(ilIl1i1i[Ii1l1III('17')](lllli1iI)){IiI1lI1l=lllli1iI[Ii1l1III('18')](ilIl1i1i)[0x1];}if(!iI1iiIii[IiI1lI1l]){iI1iiIii[IiI1lI1l]=[];}iI1iiIii[IiI1lI1l][Ii1l1III('a')](il1Ili1I+'\x2c'+liIlll1l);}let ll11III1='';for(const li1Ili in iI1iiIii){ll11III1+=li1Ili+'\x0a';let IlIil1ll=iI1iiIii[li1Ili];for(const li1iI11 of IlIil1ll){ll11III1+=li1iI11+'\x0a';}}return ll11III1;}function parseFm(IliiIl1I){let lliiI1i1='';let Iii1ll=JSON[Ii1l1III('e')](IliiIl1I);for(const i1lIlli1 of Iii1ll){let I111Il1l=i1lIlli1[Ii1l1III('12')];let ilI11li=i1lIlli1[Ii1l1III('19')];lliiI1i1+=I111Il1l+Ii1l1III('1a');for(const iiilI1iI of ilI11li){let I11111l1=iiilI1iI[Ii1l1III('12')];let IlI1l1I1=iiilI1iI[Ii1l1III('1b')];for(const l1II1lll of IlI1l1I1){lliiI1i1+=I11111l1+'\x2c'+l1II1lll+'\x0a';}}}return lliiI1i1;}function parseLu(iIliI1lI){let IIlilI1i='';let I11ilI1i=JSON[Ii1l1III('e')](iIliI1lI)[Ii1l1III('1c')];for(const i1Ii1l1 of I11ilI1i[Ii1l1III('1d')]){let I11111l=i1Ii1l1[Ii1l1III('1e')];let IiIiii1l=i1Ii1l1[Ii1l1III('1f')];IIlilI1i+=I11111l+Ii1l1III('1a');for(const l1111lI of IiIiii1l){let lIlI1iI=l1111lI[Ii1l1III('12')];let ll11i1II=l1111lI[Ii1l1III('1b')];for(const Iliilii of ll11i1II){IIlilI1i+=lIlI1iI+Ii1l1III('20')+Iliilii[Ii1l1III('21')]+'\x2c'+Iliilii[Ii1l1III('13')]+'\x0a';}}}return IIlilI1i;}function getCateData(IliI1i){let iI1I1I1I=picUrl;if(IliI1i[Ii1l1III('1')](Ii1l1III('5'))>0x0){iI1I1I1I=IliI1i[Ii1l1III('3')](Ii1l1III('5'))[0x1][Ii1l1III('4')]();if(iI1I1I1I[Ii1l1III('1')](Ii1l1III('6'))<0x0&&webPaths[IliI1i]){iI1I1I1I=webPaths[IliI1i]+iI1I1I1I;}IliI1i=IliI1i[Ii1l1III('3')](Ii1l1III('5'))[0x0][Ii1l1III('4')]();}console[Ii1l1III('7')](Ii1l1III('22')+iI1I1I1I);let ll1iIiiI=IliI1i[Ii1l1III('3')]('\x24')[0x1];let i1I1l1i=IliI1i[Ii1l1III('3')]('\x24')[0x0];if(!cates[IliI1i]){cates[IliI1i]=[];let iIl11Iii=headers;if(ll1iIiiI[Ii1l1III('1')]('\x7c')>0x0){let ii111I1I=decodeURIComponent(ll1iIiiI[Ii1l1III('3')]('\x7c')[0x1]);ll1iIiiI=ll1iIiiI[Ii1l1III('3')]('\x7c')[0x0];for(const II1Ii1l of ii111I1I[Ii1l1III('3')]('\x26')){if(II1Ii1l[Ii1l1III('1')]('\x3d')>0x0){let lI1lliii=II1Ii1l[Ii1l1III('3')]('\x3d')[0x0];let I11Iii1i=II1Ii1l[Ii1l1III('3')]('\x3d')[0x1];iIl11Iii[lI1lliii]=I11Iii1i;}}}let I111lilI=req(ll1iIiiI,{'\x6d\x65\x74\x68\x6f\x64':Ii1l1III('d'),'\x68\x65\x61\x64\x65\x72\x73':iIl11Iii});I111lilI=I111lilI[Ii1l1III('f')][Ii1l1III('4')]();if(I111lilI[Ii1l1III('1')](Ii1l1III('23'))>=0x0){I111lilI=parseM3u(I111lilI,i1I1l1i);}else if(I111lilI[Ii1l1III('1')](Ii1l1III('24'))>0x0&&I111lilI[Ii1l1III('1')](Ii1l1III('25'))>0x0){I111lilI=parseFm(I111lilI);}else if(I111lilI[Ii1l1III('1')](Ii1l1III('26'))>0x0&&I111lilI[Ii1l1III('1')](Ii1l1III('25'))>0x0){I111lilI=parseLu(I111lilI);}let li1IiiII=(i1I1l1i+'\x0a'+I111lilI[Ii1l1III('9')]('\x0d',''))[Ii1l1III('3')]('\x0a');let lli11iI=i1I1l1i;let IiiIIiIi=null;let iiiI1l='';for(let i1ii1IIl=0x0;i1ii1IIl<li1IiiII[Ii1l1III('27')];i1ii1IIl++){let lIliIii=li1IiiII[i1ii1IIl][Ii1l1III('9')](/\s+/g,'');if(lIliIii!=''&&lIliIii[Ii1l1III('1')](Ii1l1III('6'))<0x0&&(lIliIii[Ii1l1III('1')]('\x2c')<0x0||lIliIii[Ii1l1III('1')](Ii1l1III('28'))>0x0)){if(iiiI1l!=''){let ilIIIl=iI1I1I1I[Ii1l1III('9')](Ii1l1III('29'),encodeURIComponent(lli11iI))[Ii1l1III('9')](Ii1l1III('2a'),encodeURIComponent(i1I1l1i));let ilI1ilI=ilIIIl[Ii1l1III('1')]('\x3c');let iili1I1i=ilIIIl[Ii1l1III('11')]('\x3e');if(ilI1ilI>-0x1&&iili1I1i>ilI1ilI){let I11Ilili=ilIIIl[Ii1l1III('10')](ilI1ilI,iili1I1i+0x1);let I1liliII=new RegExp(I11Ilili[Ii1l1III('9')](/<|>/g,''));let lii11liI=lli11iI[Ii1l1III('9')](I1liliII,function(Ili1lIi1,iiliII1l){return iiliII1l;});ilIIIl=ilIIIl[Ii1l1III('9')](I11Ilili,lii11liI);console[Ii1l1III('7')](lli11iI+'\x2c\x20'+ilIIIl);}let IiiIIiIi={'vod_id':IliI1i+Ii1l1III('2')+cates[IliI1i][Ii1l1III('27')],'vod_name':lli11iI,'vod_pic':ilIIIl,'vod_remarks':'','type_name':Ii1l1III('2b'),'vod_year':'','vod_area':'','vod_actor':'','vod_director':'','vod_content':'','vod_play_from':i1I1l1i,'vod_play_url':iiiI1l};cates[IliI1i][Ii1l1III('a')](IiiIIiIi);}lli11iI=lIliIii[Ii1l1III('3')]('\x2c')[0x0][Ii1l1III('4')]();iiiI1l='';}else if(lIliIii[Ii1l1III('1')]('\x2c')>0x0&&/http|rtmp|rtsp|rsp/[Ii1l1III('17')](lIliIii)){let l1iiI1ii=lIliIii[Ii1l1III('3')]('\x2c');if(iiiI1l!=''){iiiI1l+='\x23';}iiiI1l+=l1iiI1ii[0x0][Ii1l1III('4')]()+'\x24'+l1iiI1ii[0x1][Ii1l1III('4')]();}}if(iiiI1l!=''){let II1Iliil=iI1I1I1I[Ii1l1III('9')](Ii1l1III('29'),encodeURIComponent(lli11iI))[Ii1l1III('9')](Ii1l1III('2a'),encodeURIComponent(i1I1l1i));let ilI1ilI=II1Iliil[Ii1l1III('1')]('\x3c');let iili1I1i=II1Iliil[Ii1l1III('11')]('\x3e');if(ilI1ilI>-0x1&&iili1I1i>ilI1ilI){let I11Ilili=II1Iliil[Ii1l1III('10')](ilI1ilI,iili1I1i+0x1);let I1liliII=new RegExp(I11Ilili[Ii1l1III('9')](/<|>/g,''));let lii11liI=I1liliII[Ii1l1III('17')](lli11iI)?lli11iI[Ii1l1III('18')](I1liliII)[0x1]:Ii1l1III('2c');II1Iliil=II1Iliil[Ii1l1III('9')](I11Ilili,lii11liI);}let IiiIIiIi={'vod_id':IliI1i+Ii1l1III('2')+cates[IliI1i][Ii1l1III('27')],'vod_name':lli11iI,'vod_pic':II1Iliil,'vod_remarks':'','type_name':Ii1l1III('2b'),'vod_year':'','vod_area':'','vod_actor':'','vod_director':'','vod_content':'','vod_play_from':i1I1l1i,'vod_play_url':iiiI1l};cates[IliI1i][Ii1l1III('a')](IiiIIiIi);}}return cates[IliI1i];}function homeVod(liIIlIl1){let iIl1IIii=getCateData(classes[0x0][Ii1l1III('2d')]);let I1l1iil=JSON[Ii1l1III('15')]({'list':iIl1IIii});return I1l1iil;}function category(I1l1i1Ii,l1IiiIli,IIi1Illi,lilIliIl){let IIi1i1ll=[];if(l1IiiIli==0x1){IIi1i1ll=getCateData(I1l1i1Ii);}let iIiiIi1i=JSON[Ii1l1III('15')]({'list':IIi1i1ll});return iIiiIi1i;}function detail(lIl11iii){let I1IIIil=lIl11iii[Ii1l1III('3')](Ii1l1III('2'));let liiiil1i=I1IIIil[0x0];let l1l111II=liiiil1i[Ii1l1III('3')]('\x24')[0x0];let Il1li11i=parseInt(I1IIIil[0x1]);let Iill11Ii=getCateData(liiiil1i)[Il1li11i];console[Ii1l1III('7')](JSON[Ii1l1III('15')](Iill11Ii));if(l1l111II[Ii1l1III('1')]('\x21\x21')>=0x0){l1l111II=l1l111II[Ii1l1III('9')]('\x21\x21','');const ii1l1iil=Iill11Ii[Ii1l1III('2e')][Ii1l1III('3')]('\x23');console[Ii1l1III('7')](JSON[Ii1l1III('15')](ii1l1iil));let i1Ili1I={};let IIIllli1={};for(const i1IiIlIl of ii1l1iil){let Ill1iii1=i1IiIlIl[Ii1l1III('3')]('\x24')[0x0];let IIiIII11=l1l111II;if(Ill1iii1[Ii1l1III('1')](Ii1l1III('20'))>0x0){IIiIII11=Ill1iii1[Ii1l1III('3')](Ii1l1III('20'))[0x1];Ill1iii1=Ill1iii1[Ii1l1III('3')](Ii1l1III('20'))[0x0];}if(!i1Ili1I[Ii1l1III('2f')](Ill1iii1)){i1Ili1I[Ill1iii1]=0x1;}else{i1Ili1I[Ill1iii1]++;}IIiIII11=l1l111II+(i1Ili1I[Ill1iii1]>0x1?'\x20'+i1Ili1I[Ill1iii1]:'');if(!IIIllli1[Ii1l1III('2f')](IIiIII11)){IIIllli1[IIiIII11]=[];}IIIllli1[IIiIII11][Ii1l1III('a')](Ill1iii1+'\x24'+i1IiIlIl[Ii1l1III('3')]('\x24')[0x1]);}let III1i1ii=[];let iii1lIIi=[];for(let iliI1I1i in IIIllli1){III1i1ii[Ii1l1III('a')](iliI1I1i);iii1lIIi[Ii1l1III('a')](IIIllli1[iliI1I1i][Ii1l1III('30')]('\x23'));}Iill11Ii[Ii1l1III('31')]=III1i1ii[Ii1l1III('30')](Ii1l1III('2'));Iill11Ii[Ii1l1III('2e')]=iii1lIIi[Ii1l1III('30')](Ii1l1III('2'));}return JSON[Ii1l1III('15')]({'list':[Iill11Ii]});}function play(l1llIIii,illiiIII,lIIIiIiI){return JSON[Ii1l1III('15')]({'parse':0x0,'url':illiiIII});}function search(I1lll,lI1iiIII){return null;}__JS_SPIDER__={'\x69\x6e\x69\x74':init,'\x68\x6f\x6d\x65':home,'\x68\x6f\x6d\x65\x56\x6f\x64':homeVod,'\x63\x61\x74\x65\x67\x6f\x72\x79':category,'\x64\x65\x74\x61\x69\x6c':detail,'\x70\x6c\x61\x79':play,'\x73\x65\x61\x72\x63\x68':search};;il='jsjiami.com.v6';
+98
View File
@@ -0,0 +1,98 @@
import { Crypto, load, _ } from './qyg16.js';
/**
* 直播源
* authorLeospring
*/
let siteUrl = 'http://api.hclyz.com:81/mf/';
let siteKey = '';
let siteType = 0;
let cateList = {};
async function request(reqUrl, postData, post) {
let res = await req(reqUrl, {
method: post ? 'post' : 'get',
data: postData || {},
postType: post ? 'form' : '',
});
let content = res.content;
return content;
}
async function init(cfg) {
siteKey = cfg.skey;
siteType = cfg.stype;
if (cfg.ext) {
siteUrl = cfg.ext;
}
cateList = JSON.parse(await request(siteUrl + 'json.txt'));
}
async function home(filter) {
let classes = [];
Object.keys(cateList).forEach(function(key) {
classes.push({
type_id: key,
type_name: key,
});
});
return JSON.stringify({
class: classes,
// filters: filterObj
});
}
async function category(tid, pg, filter, ext) {
let videos = _.map(cateList[tid], (item) => {
return {
vod_id: item['address'],
vod_name: item['title'],
vod_pic: item['xinimg'].replace("http://cdn.gcufbd.top/img/", "https://slink.ltd/https://raw.githubusercontent.com/fish2018/lib/refs/heads/main/imgs/"),
vod_remarks: item['Number']
}
})
return JSON.stringify({
list: videos,
page: pg,
pagecount: 1,
total: videos.length
});
}
async function detail(id) {
try {
const res = JSON.parse(await request(siteUrl + id))['zhubo'];
let playUrls = _.map(res, (vod) => {
return vod.title + '$' + vod.address;
}).join('#');
const video = {
vod_play_from: 'Leospring',
vod_play_url: playUrls,
vod_content: 'github.com/fish2018',
};
const list = [video];
const result = { list };
return JSON.stringify(result);
} catch (e) {
console.log('err', e);
}
return null;
}
async function play(flag, id, flags) {
let playUrl = id;
return JSON.stringify({
parse: 0,
url: playUrl,
});
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
category: category,
detail: detail,
play: play,
};
}
+73
View File
File diff suppressed because one or more lines are too long
+73
View File
File diff suppressed because one or more lines are too long
+78
View File
@@ -0,0 +1,78 @@
/* 直播弹幕 -> vod_area:'bililivedanmu'
目前只有皮皮虾大佬的DMBox, 支持弹幕
DMBox下载:https://t.me/pipixiawerun
设置 > 窗口预览 > 开启
*/
/* Cookie设置
Cookie获取方法 https://github.com/UndCover/PyramidStore/blob/main/list.md#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9
Cookie设置方法1: DR-PY 后台管理界面
CMS后台管理 > 设置中心 > 环境变量 > {"bili_cookie":"XXXXXXX","vmid":"XXXXXX"} > 保存
Cookie设置方法2: 手动替换Cookie
底下代码 headers的
"Cookie":"$bili_cookie"
手动替换为
"Cookie":"将获取的Cookie黏贴在这"
*/
var rule = {
title:'哔哩直播',
host:'https://api.live.bilibili.com',
homeUrl:'/xlive/web-interface/v1/second/getUserRecommend?page=1&page_size=30&platform=web',//用于"分类获取"和"推荐获取"
url:'/xlive/web-interface/v1/second/getList?platform=web&parent_area_id=fyclass&area_id=fyfilter&sort_type=online&page=fypage',
class_name:'娱乐&网游&手游&单机游戏&电台&虚拟主播&生活&知识&赛事&购物',
class_url:'10&2&3&6&1&5&9&11&13&300',
filterable: 1,
filter_url: '{{fl.area}}',
filter_def:{
10:{area:'33'},
2:{area:'86'},
3:{area:'35'},
6:{area:'236'},
1:{area:'21'},
5:{area:'190'},
9:{area:'371'},
11:{area:'376'},
13:{area:'561'},
300:{area:'30000'}
},
filter: {
"2":[{"key":"area","name":"分区","value":[{"n":"英雄联盟","v":"86"},{"n":"DOTA2","v":"92"},{"n":"CS:GO","v":"89"},{"n":"APEX英雄","v":"240"},{"n":"永劫无间","v":"666"},{"n":"穿越火线","v":"88"},{"n":"守望先锋","v":"87"},{"n":"吃鸡行动","v":"80"},{"n":"逃离塔科夫","v":"252"},{"n":"传奇","v":"695"},{"n":"DNF","v":"78"},{"n":"生死狙击2","v":"575"},{"n":"洛奇英雄传","v":"599"},{"n":"最终幻想14","v":"102"},{"n":"星际战甲","v":"249"},{"n":"梦三国","v":"710"},{"n":"英魂之刃","v":"690"},{"n":"剑网3","v":"82"},{"n":"铁甲雄兵","v":"691"},{"n":"封印者","v":"300"},{"n":"新天龙八部","v":"653"},{"n":"赛尔号","v":"667"},{"n":"造梦西游","v":"668"},{"n":"洛克王国","v":"669"},{"n":"问道","v":"670"},{"n":"诛仙世界","v":"654"},{"n":"大话西游","v":"652"},{"n":"奇迹MU","v":"683"},{"n":"永恒之塔","v":"684"},{"n":"QQ三国","v":"685"},{"n":"人间地狱","v":"677"},{"n":"VALORANT","v":"329"},{"n":"彩虹岛","v":"686"},{"n":"洛奇","v":"663"},{"n":"跑跑卡丁车","v":"664"},{"n":"星际公民","v":"658"},{"n":"Squad战术小队","v":"659"},{"n":"反恐精英Online","v":"629"},{"n":"风暴奇侠","v":"648"},{"n":"装甲战争","v":"642"},{"n":"失落的方舟","v":"590"},{"n":"阿尔比恩","v":"639"},{"n":"猎杀对决","v":"600"},{"n":"CFHD ","v":"472"},{"n":"骑士精神2","v":"650"},{"n":"超击突破","v":"680"},{"n":"武装突袭","v":"634"},{"n":"300英雄","v":"84"},{"n":"炉石传说","v":"91"},{"n":"剑网3缘起","v":"499"},{"n":"街头篮球","v":"649"},{"n":"综合射击","v":"601"},{"n":"剑灵","v":"505"},{"n":"艾尔之光","v":"651"},{"n":"黑色沙漠","v":"632"},{"n":"天涯明月刀","v":"596"},{"n":"超激斗梦境","v":"519"},{"n":"冒险岛","v":"574"},{"n":"逆战","v":"487"},{"n":"魔兽争霸3","v":"181"},{"n":"QQ飞车","v":"610"},{"n":"魔兽世界","v":"83"},{"n":"FIFA ONLINE 4","v":"388"},{"n":"NBA2KOL2","v":"581"},{"n":"使命召唤:战区","v":"318"},{"n":"VRChat","v":"656"},{"n":"坦克世界","v":"115"},{"n":"战舰世界","v":"248"},{"n":"战争雷霆","v":"316"},{"n":"战意","v":"383"},{"n":"风暴英雄","v":"114"},{"n":"星际争霸2","v":"93"},{"n":"刀塔自走棋","v":"239"},{"n":"堡垒之夜","v":"164"},{"n":"枪神纪","v":"251"},{"n":"三国杀","v":"81"},{"n":"龙之谷","v":"112"},{"n":"古剑奇谭OL","v":"173"},{"n":"幻想全明星","v":"176"},{"n":"怀旧网游","v":"288"},{"n":"新游前瞻","v":"298"},{"n":"星战前夜:晨曦","v":"331"},{"n":"梦幻西游端游","v":"350"},{"n":"流放之路","v":"551"},{"n":"FPS沙盒","v":"633"},{"n":"永恒轮回","v":"459"},{"n":"激战2","v":"607"},{"n":"其他网游","v":"107"}] }],
"3":[{"key":"area","name":"分区","value":[{"n":"王者荣耀","v":"35"},{"n":"和平精英","v":"256"},{"n":"LOL手游","v":"395"},{"n":"原神","v":"321"},{"n":"第五人格","v":"163"},{"n":"明日方舟","v":"255"},{"n":"哈利波特:魔法觉醒 ","v":"474"},{"n":"幻塔","v":"550"},{"n":"金铲铲之战","v":"514"},{"n":"APEX手游","v":"506"},{"n":"深空之眼","v":"598"},{"n":"无期迷途","v":"675"},{"n":"光遇","v":"687"},{"n":"跃迁旅人","v":"717"},{"n":"香肠派对","v":"689"},{"n":"猫之城","v":"645"},{"n":"玛娜希斯回响","v":"644"},{"n":"使命召唤手游","v":"386"},{"n":"黑色沙漠手游","v":"615"},{"n":"崩坏3","v":"40"},{"n":"游戏王:决斗链接","v":"407"},{"n":"游戏王","v":"303"},{"n":"蛋仔派对","v":"571"},{"n":"阴阳师","v":"36"},{"n":"空之要塞:启航","v":"718"},{"n":"火影忍者手游","v":"292"},{"n":"Fate/GO","v":"37"},{"n":"综合棋牌","v":"354"},{"n":"QQ飞车手游","v":"154"},{"n":"决战!平安京","v":"140"},{"n":"狼人杀","v":"41"},{"n":"三国杀移动版","v":"352"},{"n":"碧蓝航线","v":"113"},{"n":"影之诗","v":"156"},{"n":"明日之后","v":"189"},{"n":"部落冲突:皇室战争","v":"50"},{"n":"奥比岛手游","v":"661"},{"n":"盾之勇者成名录:浪潮","v":"704"},{"n":"雀姬","v":"214"},{"n":"公主连结Re:Dive","v":"330"},{"n":"DNF手游","v":"343"},{"n":"FIFA足球世界","v":"641"},{"n":"BanG Dream","v":"258"},{"n":"荒野乱斗","v":"469"},{"n":"CF手游","v":"333"},{"n":"战双帕弥什","v":"293"},{"n":"天涯明月刀手游","v":"389"},{"n":"解密游戏","v":"42"},{"n":"恋爱养成游戏","v":"576"},{"n":"暗黑破坏神:不朽","v":"492"},{"n":"暗区突围","v":"502"},{"n":"跑跑卡丁车手游","v":"265"},{"n":"非人学园","v":"212"},{"n":"百闻牌","v":"286"},{"n":"猫和老鼠手游","v":"269"},{"n":"坎公骑冠剑","v":"442"},{"n":"忍者必须死3","v":"203"},{"n":"梦幻西游手游","v":"342"},{"n":"航海王热血航线","v":"504"},{"n":"少女前线","v":"39"},{"n":"300大作战","v":"688"},{"n":"少女前线:云图计划","v":"525"},{"n":"漫威超级战争","v":"478"},{"n":"摩尔庄园手游","v":"464"},{"n":"宝可梦大集结","v":"493"},{"n":"小动物之星","v":"473"},{"n":"天地劫:幽城再临","v":"448"},{"n":"漫威对决","v":"511"},{"n":" 东方归言录","v":"538"},{"n":"梦幻模拟战","v":"178"},{"n":"时空猎人3","v":"643"},{"n":"重返帝国","v":"613"},{"n":"休闲小游戏","v":"679"},{"n":"其他手游","v":"98"},{"n":"新游评测","v":"274"}] }],
"6":[{"key":"area","name":"分区","value":[{"n":"主机游戏","v":"236"},{"n":"我的世界","v":"216"},{"n":"独立游戏","v":"283"},{"n":"怀旧游戏","v":"237"},{"n":"弹幕互动玩法","v":"460"},{"n":"恐怖游戏","v":"276"},{"n":"禁闭求生","v":"707"},{"n":"斯普拉遁3","v":"694"},{"n":"卧龙:苍天陨落","v":"700"},{"n":"使命召唤19","v":"282"},{"n":"异度神剑","v":"665"},{"n":"艾尔登法环","v":"555"},{"n":"聚会游戏","v":"636"},{"n":"哥谭骑士","v":"716"},{"n":"命运2","v":"277"},{"n":"沙石镇时光","v":"630"},{"n":"Dread Hunger","v":"591"},{"n":"红色警戒2","v":"693"},{"n":"失落迷城:群星的诅咒","v":"714"},{"n":"策略游戏","v":"570"},{"n":"战地风云","v":"597"},{"n":"幽灵线:东京","v":"612"},{"n":"糖豆人","v":"357"},{"n":"消逝的光芒2","v":"586"},{"n":"只狼","v":"245"},{"n":"怪物猎人","v":"578"},{"n":"饥荒","v":"218"},{"n":"精灵宝可梦","v":"228"},{"n":"FIFA23","v":"708"},{"n":"暖雪","v":"582"},{"n":"全面战争:战锤3","v":"594"},{"n":"彩虹六号:异种","v":"580"},{"n":"战神","v":"579"},{"n":"FORZA 极限竞速","v":"302"},{"n":"NBA2K","v":"362"},{"n":"帝国时代4","v":"548"},{"n":"光环:无限","v":"559"},{"n":"孤岛惊魂6","v":"537"},{"n":"植物大战僵尸","v":"309"},{"n":"仙剑奇侠传七","v":"540"},{"n":"灵魂筹码","v":"223"},{"n":"格斗游戏","v":"433"},{"n":"荒野大镖客2","v":"226"},{"n":"重生细胞","v":"426"},{"n":"刺客信条","v":"227"},{"n":"恐鬼症","v":"387"},{"n":"以撒","v":"219"},{"n":"双人成行","v":"446"},{"n":"方舟","v":"295"},{"n":"仁王2","v":"313"},{"n":"鬼泣5","v":"244"},{"n":"枪火重生","v":"364"},{"n":"盗贼之海","v":"341"},{"n":"胡闹厨房","v":"507"},{"n":"体育游戏","v":"500"},{"n":"恐惧之间","v":"439"},{"n":"塞尔达","v":"308"},{"n":"马力欧制造2","v":"261"},{"n":"全境封锁2","v":"243"},{"n":"骑马与砍杀","v":"326"},{"n":"人类一败涂地","v":"270"},{"n":"鬼谷八荒","v":"424"},{"n":"无主之地3","v":"273"},{"n":"辐射76","v":"220"},{"n":"全面战争","v":"257"},{"n":"亿万僵尸","v":"463"},{"n":"暗黑破坏神2","v":"535"},{"n":"文字游戏","v":"583"},{"n":"恋爱模拟游戏","v":"592"},{"n":"泰拉瑞亚","v":"593"},{"n":"雨中冒险2","v":"441"},{"n":"游戏速通","v":"678"},{"n":"摔角城大乱斗","v":"681"},{"n":"勇敢的哈克","v":"692"},{"n":" 审判系列","v":"698"},{"n":"其他单机","v":"235"}] }],
"1":[{"key":"area","name":"分区","value":[{"n":"视频唱见","v":"21"},{"n":"萌宅领域","v":"530"},{"n":"视频聊天","v":"145"},{"n":"舞见","v":"207"},{"n":"情感","v":"706"},{"n":"户外","v":"123"},{"n":"日常","v":"399"}] }],
"5":[{"key":"area","name":"分区","value":[{"n":"唱见电台","v":"190"},{"n":"聊天电台","v":"192"},{"n":"配音","v":"193"}] }],
"9":[{"key":"area","name":"分区","value":[{"n":"虚拟主播","v":"371"},{"n":"3D虚拟主播","v":"697"}] }],
"10":[{"key":"area","name":"分区","value":[{"n":"生活分享","v":"646"},{"n":"运动","v":"628"},{"n":"搞笑","v":"624"},{"n":"手工绘画","v":"627"},{"n":"萌宠","v":"369"},{"n":"美食","v":"367"},{"n":"时尚","v":"378"},{"n":"影音馆","v":"33"}] }],
"11":[{"key":"area","name":"分区","value":[{"n":"社科法律心理","v":"376"},{"n":"人文历史","v":"702"},{"n":"校园学习","v":"372"},{"n":"职场·技能","v":"377"},{"n":" 科技","v":"375"},{"n":"科学科普","v":"701"},{"n":"时政","v":"715"}] }],
"13":[{"key":"area","name":"分区","value":[{"n":"游戏赛事","v":"561"},{"n":"体育赛事","v":"562"},{"n":"赛事综合","v":"563"}] }],
"300":[{"key":"area","name":"分区","value":[{"n":"购物","v":"300000"}] }]
},
detailUrl:'https://live.bilibili.com/fyid',//二级详情拼接链接(json格式用)
// detailUrl:'https://api.live.bilibili.com/xlive/web-room/v1/playUrl/playUrl?cid=fyid&platform=h5&otype=json&quality=0',//二级详情拼接链接(json格式用)
// searchUrl:'/x/web-interface/search/type?__refresh__=true&page=fypage&page_size=42&order=online&platform=pc&highlight=1&single_column=0&keyword=**&search_type=live&dynamic_offset=0&preload=true',
searchUrl:'https://api.bilibili.com/x/web-interface/search/type?search_type=live&keyword=**&page=1',
searchable:2,
quickSearch:0,
headers:{
"User-Agent":"PC_UA",
"Referer": "https://www.bilibili.com",
"Cookie":"$bili_cookie"
},
timeout:5000,
limit:8,
play_parse:true,
// play_json:[{re:'*', json:{jx:0, parse:1,header:JSON.stringify({"user-agent":"Mozilla/5.0 (Linux; U; Android 9; zh-CN; MI 9 Build/PKQ1.181121.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.5.5.1035 Mobile Safari/537.36"})}}],
// play_json:[{re:'*', json:{jx:0, parse:1,header:JSON.stringify({"user-agent":"uc_ua"})}}],
// play_json:0,
lazy:"js:let ids=input.split('_');let result={};let iurl='https://api.live.bilibili.com/room/v1/Room/playUrl?cid='+ids[1]+'&'+ids[0];let html=request(iurl);let jRoot=JSON.parse(html);let jo=jRoot['data'];let ja=jo['durl'];let purl='';if(ja.length>0){purl=ja[0]['url']}result['parse']=0;result['playUrl']='';result['url']=unescape(purl);result['header']={Referer:'https://live.bilibili.com','User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36'};if(/h5/.test(ids[0])){result['contentType']='';input=result}else{result['contentType']='video/x-flv';input=result}",
double:false,
推荐:'*',
一级:'json:data.list;title;system_cover;uname;roomid',
// 二级:'*',
二级:"js:let aid=input.match(/\\/(\\d+)/)[1];log(aid);let html=request('https://api.live.bilibili.com/room/v1/Room/get_info?room_id='+aid);let jo=JSON.parse(html).data;let title=jo['title'];let pic=jo['keyframe'];let desc=jo['description'];let dire=jo['uid'];let typeName=jo['area_name'];let remark='在线人数:'+jo['online'];let vod={vod_id:aid,vod_name:title,vod_pic:pic,type_name:typeName,vod_area:'bililivedanmu',vod_remarks:remark,vod_actor:'直播间id-'+aid,vod_director:dire,vod_content:desc};vod['vod_play_from']='B站';vod['vod_play_url']='flv线路原画$platform=web&quality=4_'+aid+'#flv线路高清$platform=web&quality=3_'+aid+'#h5线路原画$platform=h5&quality=4_'+aid+'#h5线路高清$platform=h5&quality=3_'+aid;VOD=vod;",
// 搜索:'json:data.result.live_room;title;cover;uname;roomid',
搜索:'js:let html=request(input);let msg=JSON.parse(html).message;if(msg!=="0"){VODS=[{vod_name:KEY+"➢"+msg,vod_id:"no_data",vod_remarks:"别点,缺少bili_cookie",vod_pic:"https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg"}]}else{let videos=[];let vodList=JSON.parse(html).data.result.live_room;vodList.forEach(function(vod){let aid=vod["roomid"];let title="直播间:"+vod["title"].replace(\'<em class="keyword">\',"").replace("</em>","");let img="https:"+vod["user_cover"];let remark=vod["watched_show"]["text_small"]+" "+vod["uname"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})});VODS=videos}',
}
+149
View File
@@ -0,0 +1,149 @@
let host = 'https://a123tv.com';
let headers = {
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; M2102J2SC Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/144.0.7559.31 Mobile Safari/537.36',
'Referer': host
};
function getList(html) {
let videos = [];
pdfa(html, '.w4-item-wrap').forEach(it => {
const id = pdfh(it, 'a.w4-item&&href') || '',
name = pdfh(it, 'img&&alt') || '',
pic = pdfh(it, 'img&&data-src') || pdfh(it, 'img&&src') || '',
remark = pdfh(it, '.w4-item-cover .s span&&Text') || '';
if (id && name) {
let vod_pic = pic.startsWith('//') ? `https:${pic}` : pic.startsWith('/') ? `${host}${pic}` : pic;
vod_pic = vod_pic || 'data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=';
videos.push({
vod_id: id.replace(host, '').replace(/^\//, ''),
vod_name: name.trim(),
vod_pic,
vod_remarks: remark.trim()
});
}
});
return videos;
}
async function init(cfg) {}
async function home(filter) {
return JSON.stringify({
class: [{ "type_id": "10", "type_name": "电影" }, { "type_id": "11", "type_name": "连续剧" },
{ "type_id": "12", "type_name": "综艺" }, { "type_id": "13", "type_name": "动漫" },
{ "type_id": "15", "type_name": "福利" }],
filters: {}
});
}
async function homeVod() {
let resp = await req(host, { headers });
return JSON.stringify({ list: getList(resp.content) });
}
async function category(tid, pg, filter, extend) {
let p = parseInt(pg) || 1;
let resp = await req(`${host}/t/${tid}/p${p}.html`, { headers });
return JSON.stringify({ list: getList(resp.content), page: p, pagecount: p + 5, limit: 20 });
}
async function detail(id) {
const playFrom = [], playList = [];
let detailUrl = id.startsWith('http') ? id : `${host}/${id.replace(/^\//, '')}`;
let { content: html = '' } = await req(detailUrl, { headers });
// 基础信息
let vod_name = (pdfh(html, 'li.on h1&&Text') || pdfh(html, 'h1.title&&Text') || '未知片名').trim();
let vod_pic = pdfh(html, '#awp1&&data-poster') || '';
vod_pic = vod_pic.startsWith('//') ? `https:${vod_pic}` : vod_pic.startsWith('/') ? `${host}${vod_pic}` : vod_pic;
let vod_remarks = pdfh(html, '.w4-line-cover .i&&Text')?.split(' / ')[1] || '720p';
// 解析meta中的导演/演员/地区/年代/类型/简介
let vod_area = '', vod_year = '', type_name = '', vod_actor = '', vod_director = '', vod_content = '';
// 提取description
const descMatch = html.match(/<meta name="description" content="([^"]+)"[^>]*>/i);
const descText = descMatch ? descMatch[1] : '';
// 从标题提取类型和年代
const titleMatch = html.match(/《[^》]+》\s*-\s*([^-]+)\s*-\s*(\d+)年/i);
if (titleMatch) {
type_name = titleMatch[1].trim();
vod_year = titleMatch[2].trim();
}
// 解析描述中的地区、导演、演员、剧情
if (descText) {
const areaMatch = descText.match(/地区:([^。]+)。/);
const dirMatch = descText.match(/导演:([^。]+)。/);
const actorMatch = descText.match(/演员:([^。]+)。/);
const contentMatch = descText.match(/剧情:([\s\S]+)/);
vod_area = areaMatch ? areaMatch[1].trim() : '';
vod_director = dirMatch ? dirMatch[1].trim().replace(/、/g, '/') : '';
vod_actor = actorMatch ? actorMatch[1].trim().replace(/、/g, '/') : '';
vod_content = contentMatch ? contentMatch[1].trim() : descText;
}
const ppMatch = html.match(/var\s+pp\s*=\s*({[\s\S]*?});/);
if (ppMatch) {
const { la = [] } = JSON.parse(ppMatch[1]);
const episodeNames = pdfa(html, '.w4-episode-list .w a').map((a, i) =>
(pdfh(a, 'a&&Text') || pdfh(a, 'a&&title') || `${i+1}`).trim()
);
la.forEach((item, index) => {
if (Array.isArray(item) && item.length >= 5) {
const [, , episodeNum, , m3u8] = item;
const realEpNum = parseInt(episodeNum) || episodeNames.length;
const lineEpisodes = [];
for (let i = 0; i < realEpNum; i++) {
let epName = episodeNames[i] || `${i+1}`;
let realM3u8 = m3u8.startsWith('//') ? `https:${m3u8}` : m3u8;
lineEpisodes.push(`${epName}$${realM3u8}`);
}
playFrom.push(`✨乐哥推荐✨${index + 1}`);
playList.push(lineEpisodes.join('#'));
}
});
}
return JSON.stringify({
list: [{
vod_id: id, vod_name, vod_pic, vod_remarks, vod_year, vod_area,
type_name, vod_actor, vod_director, vod_content,
vod_play_from: playFrom.join('$$$'), vod_play_url: playList.join('$$$')
}]
});
}
async function search(wd, quick, pg) {
let p = parseInt(pg) || 1;
let resp = await req(`${host}/s/${encodeURIComponent(wd)}/p${p}.html`, { headers });
return JSON.stringify({ list: getList(resp.content), page: p, pagecount: p + 5, limit: 20 });
}
async function play(flag, id, flags) {
let url = id.startsWith('http') ? id : `${host}/${id.replace(/^\//, '')}`;
let { content: html = '' } = await req(url, { headers });
const playerVarMatch = html.match(/var\s+player_aaaa\s*=\s*({[^;]+});/);
if (playerVarMatch) {
let jsonStr = playerVarMatch[1].replace(/(\w+):/g, '"$1":').replace(/\\/g, '');
let { url: playUrl } = JSON.parse(jsonStr);
if (playUrl) return JSON.stringify({ parse: playUrl.includes('.m3u8') ? 0 : 1, url: playUrl, header: headers });
}
let m3u8Match = html.match(/"url":"([^"]+\.m3u8(\?[^"]*)?)"/) || html.match(/'url':'([^']+\.m3u8(\?[^']*)?)'/) ||
html.match(/"(https?:\/\/[^"]+\.m3u8[^"]*)"/) || html.match(/'(https?:\/\/[^']+\.m3u8[^']*)'/) ||
html.match(/https?:\/\/[^\s"]+\.m3u8[^\s"]*/);
if (m3u8Match) {
let playUrl = m3u8Match[1] || m3u8Match[0];
return JSON.stringify({ parse: 0, url: playUrl.replace(/\\/g, ""), header: headers });
}
let iframeMatch = html.match(/<iframe[^>]*src="([^"]+)"[^>]*>/i) || html.match(/<video[^>]*src="([^"]+)"[^>]*>/i);
if (iframeMatch) {
let iframeUrl = iframeMatch[1];
iframeUrl = iframeUrl.startsWith('//') ? `https:${iframeUrl}` : !iframeUrl.startsWith('http') ? `${host}${iframeUrl.startsWith('/') ? '' : '/'}${iframeUrl}` : iframeUrl;
return JSON.stringify({ parse: 1, url: iframeUrl, header: headers });
}
return JSON.stringify({ parse: 1, url: url, header: headers });
}
export default { init, home, homeVod, category, detail, search, play };
+414
View File
@@ -0,0 +1,414 @@
import {Crypto,_} from 'assets://js/lib/cat.js';
var HOST;
let device_id = '';
const pkg = 'com.sunshine.tv';
const ver = '4';
const device_id_cache_key = 'com.sunshine.tv_3qys_B7k7Dt56Rn';
const KParams = {
headers: {}
};
async function init(cfg) {
try {
let host = cfg.ext?.host?.trim() || 'https://qqqys.com';
HOST = host.replace(/\/$/, '');
KParams.headers['Referer'] = HOST;
let parseTimeout = parseInt(cfg.ext?.timeout?.trim(), 10);
KParams.timeout = parseTimeout > 0 ? parseTimeout : 5000;
KParams.catesSet = cfg.ext?.catesSet?.trim() || '';
KParams.tabsSet = cfg.ext?.tabsSet?.trim() || '';
KParams.resObj = safeParseJSON(await request(`${HOST}/api.php/app/index/home`));
} catch (e) {
console.error('初始化参数失败:', e.message);
}
}
async function home(filter) {
try {
let resObj = KParams.resObj;
let typeArr = resObj?.data?.categories ?? [];
let classes = typeArr.map(item => {
return {
type_name: item?.type_name ?? '分类名',
type_id: item?.type_name ?? '分类值'
};
});
if (KParams.catesSet) {
classes = ctSet(classes, KParams.catesSet);
}
let filters = {"电影":[{"key":"class","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":"剧情"}]},{"key":"area","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":"澳大利亚"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2025","v":"2025"},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015-2011","v":"2015-2011"},{"n":"2010-2000","v":"2010-2000"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"},{"n":"更早","v":"更早"}]},{"key":"by","name":"排序","value":[{"n":"人气","v":""},{"n":"最新","v":"time"},{"n":"评分","v":"score"},{"n":"年份","v":"year"}]}],"剧集":[{"key":"class","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":"恐怖"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"美国","v":"美国"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2025","v":"2025"},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020-2016","v":"2020-2016"},{"n":"2015-2011","v":"2015-2011"},{"n":"2010-2000","v":"2010-2000"},{"n":"更早","v":"更早"}]},{"key":"by","name":"排序","value":[{"n":"人气","v":""},{"n":"最新","v":"time"},{"n":"评分","v":"score"},{"n":"年份","v":"year"}]}],"动漫":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"冒险","v":"冒险"},{"n":"奇幻","v":"奇幻"},{"n":"科幻","v":"科幻"},{"n":"武侠","v":"武侠"},{"n":"悬疑","v":"悬疑"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"日本","v":"日本"},{"n":"欧美","v":"欧美"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2025","v":"2025"},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"更早","v":"更早"}]},{"key":"by","name":"排序","value":[{"n":"人气","v":""},{"n":"最新","v":"time"},{"n":"评分","v":"score"},{"n":"年份","v":"year"}]}],"综艺":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"真人秀","v":"真人秀"},{"n":"音乐","v":"音乐"},{"n":"脱口秀","v":"脱口秀"},{"n":"歌舞","v":"歌舞"},{"n":"爱情","v":"爱情"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"美国","v":"美国"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2025","v":"2025"},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"更早","v":"更早"}]},{"key":"by","name":"排序","value":[{"n":"人气","v":""},{"n":"最新","v":"time"},{"n":"评分","v":"score"},{"n":"年份","v":"year"}]}]};
return JSON.stringify({
class: classes,
filters: filters
});
} catch (e) {
console.error('获取分类失败:', e.message);
return JSON.stringify({
class: [],
filters: {}
});
}
}
async function homeVod() {
try {
let resObj = KParams.resObj;
let homeArr = resObj?.data?.recommend ?? [];
(resObj?.data?.categories || []).forEach(it => {
if (Array.isArray(it.videos) && it.videos.length) {
homeArr.push(...it.videos);
}
});
let VODS = getVodList(homeArr);
return JSON.stringify({
list: VODS
});
} catch (e) {
console.error('推荐页获取失败:', e.message);
return JSON.stringify({
list: []
});
}
}
async function category(tid, pg, filter, extend) {
try {
pg = parseInt(pg, 10);
pg = pg > 0 ? pg : 1;
let cateUrl = `${HOST}/api.php/app/filter/vod?type_name=${extend?.cateId || tid}&class=${extend?.class ?? ''}&area=${extend?.area ?? ''}&year=${extend?.year ?? ''}&sort=${extend?.by ?? ''}&page=${pg}&limit=30`;
let resObj = safeParseJSON(await request(cateUrl));
let cateArr = resObj?.data ?? [];
let VODS = getVodList(cateArr);
let {
pageCount = 999, limit = 30, total = 29970
} = resObj ?? {};
return JSON.stringify({
list: VODS,
page: pg,
pagecount: pageCount,
limit: limit,
total: total
});
} catch (e) {
console.error('类别页获取失败:', e.message);
return JSON.stringify({
list: [],
page: 1,
pagecount: 0,
limit: 30,
total: 0
});
}
}
async function search(wd, quick, pg) {
try {
pg = parseInt(pg, 10);
pg = pg > 0 ? pg : 1;
let searchUrl = `${HOST}/api.php/app/search/index?wd=${wd}&page=${pg}&limit=30`;
let resObj = safeParseJSON(await request(searchUrl));
let searchArr = resObj?.data ?? [];
let VODS = getVodList(searchArr);
let {
pageCount = 999, limit = 30, total = 29970
} = resObj ?? {};
return JSON.stringify({
list: VODS,
page: pg,
pagecount: pageCount,
limit: limit,
total: total
});
} catch (e) {
console.error('搜索页获取失败:', e.message);
return JSON.stringify({
list: [],
page: 1,
pagecount: 0,
limit: 30,
total: 0
});
}
}
function getVodList(listArr) {
try {
if (!Array.isArray(listArr)) {
throw new Error('输入参数非数组');
}
let kvods = [];
for (let it of listArr) {
let kname = it.vod_name ?? '名称';
let kpic = it.vod_pic ?? '图片';
let kremarks = `${it.vod_remarks || '状态'}|${it.vod_score || '无评分'}|${it.vod_class || '类型'}`;
let kyear = it.vod_year || '';
kvods.push({
vod_name: kname,
vod_pic: kpic,
vod_remarks: kremarks,
vod_year: kyear,
vod_id: `${it.vod_id}@${kname}@${kpic}@${kremarks}@${kyear}@${it.area || '地区'}`
});
}
return kvods;
} catch (e) {
console.error(`生成视频列表失败:`, e.message);
return [];
}
}
async function detail(ids) {
try {
let [id, kname, kpic, remarks, kyear, karea] = ids.split('@');
let [kremarks, kscore, ktype] = remarks.split('|');
const batchPathList = [`/api.php/app/vod/get_detail?vod_id=${id}`, `/api.php/app/internal/search_aggregate?vod_id=${id}`]
const [resObj1, resObj2] = await Promise.all(
batchPathList.map(async (path) => {
try {
return safeParseJSON(await request(`${HOST}${path}`));
} catch (sErr) {
return null;
}
})
);
let [ktabs, kurls, kfroms1, kfroms2] = Array.from({
length: 4
}, () => []);
let kvod1 = resObj1?.data?.[0] ?? null;
let kvod2 = Array.isArray(resObj2?.data) ? resObj2.data : null;
let kdetail = kvod1;
if (kvod1) {
kfroms1 = kvod1.vod_play_from ? kvod1.vod_play_from.split('$$$') : [];
let ud_urlsArr = kvod1.vod_play_url ? kvod1.vod_play_url.split('$$$') : [];
ud_urlsArr.forEach((it, idx) => {
let kurl = it.split('#').map(ep => `${ep}@${kfroms1[idx] || 'from'}`);
kurls.push(kurl.join('#'));
});
let ktabsName = resObj1?.vodplayer ?? [];
kfroms1.forEach(it => {
let tg = ktabsName.find(item => item.from === it)
ktabs.push(tg?.show ?? it);
});
}
if (kvod2) {
kfroms2 = kvod2.map(it => it.vod_play_from);
kvod2.forEach((it, idx) => {
let ud_urlArr = it.vod_play_url ? it.vod_play_url.split('#') : [];
let kurl = ud_urlArr.map(ep => `${ep}@${kfroms2[idx] || 'from'}`);
kurls.push(kurl.join('#'));
});
kvod2.forEach(it => ktabs.push(it.site_name));
}
if (KParams.tabsSet) {
let ktus = ktabs.map((it, idx) => {
return {
type_name: it,
type_value: kurls[idx]
}
});
ktus = ctSet(ktus, KParams.tabsSet);
ktabs = ktus.map(it => it.type_name);
kurls = ktus.map(it => it.type_value);
}
let VOD = {
vod_id: kdetail?.vod_id || id,
vod_name: kdetail?.vod_name || kname,
vod_pic: kdetail?.vod_pic || kpic,
type_name: kdetail?.vod_class || ktype,
vod_remarks: `${kdetail?.vod_remarks || '状态'}|${kscore}`,
vod_year: kdetail?.vod_year || kyear || '1000',
vod_area: kdetail?.vod_area || karea,
vod_lang: kdetail?.vod_lang || '国语',
vod_director: kdetail?.vod_director || '导演',
vod_actor: kdetail?.vod_actor || '主演',
vod_content: kdetail?.vod_content.replace(/<[^>]*?>/g, '')?.trim() || '简介',
vod_play_from: ktabs.join('$$$'),
vod_play_url: kurls.join('$$$')
};
return JSON.stringify({
list: [VOD]
});
} catch (e) {
console.error('详情页获取失败:', e.message);
return JSON.stringify({
list: []
});
}
}
async function play(flag, ids, flags) {
try {
let kurl = '',
jx = 0,
kp = 0,
token = '';
let [id, kfrom] = ids.split('@');
if (/\.(m3u8|mp4|mkv)/.test(id)) {
kurl = id;
} else {
for (let i = 0; i < 2; i++) {
try {
let playUrl = `https://czys001.com/api.php/app/decode/url/?url=${id}&vodFrom=${kfrom}&token=${token}`;
let resObj = safeParseJSON(await request(playUrl));
if (resObj?.code === 2 && resObj?.hasOwnProperty('challenge')) {
token = eval(resObj.challenge);
}
if (resObj?.code === 1 && resObj?.hasOwnProperty('data')) {
kurl = resObj.data;
break;
}
} catch (e) {
continue;
}
}
if (!/^http/.test(kurl)) {
jx = 1;
kp = 1;
kurl = id;
} else if (!/m3u8|mp4|mkv/.test(kurl)) {
kp = 1;
}
}
return JSON.stringify({
jx: jx,
parse: kp,
url: kurl,
header: await getHeaders()
});
} catch (e) {
console.error('播放失败:', e.message);
return JSON.stringify({
jx: 0,
parse: 0,
url: '',
header: {}
});
}
}
function ctSet(kArr, setStr) {
if (!Array.isArray(kArr)) {
return kArr;
}
try {
let [set_arr, arrNames] = [
[...kArr], setStr.split('&')
];
if (arrNames.length) {
let filtered_arr = arrNames.map((item) => set_arr.find(it => it.type_name === item)).filter(Boolean);
set_arr = filtered_arr.length ? filtered_arr : [set_arr[0]];
}
return set_arr;
} catch (e) {
return kArr;
}
}
function safeParseJSON(jStr) {
try {
return JSON.parse(jStr);
} catch (e) {
return null;
}
}
async function request(reqUrl, options = {}) {
if (typeof reqUrl !== 'string' || !reqUrl.trim()) {
throw new Error('reqUrl需为字符串且非空');
}
if (typeof options !== 'object' || Array.isArray(options) || !options) {
throw new Error('options类型需为非null对象');
}
try {
options.method = options.method?.toLowerCase() || 'get';
if (['get', 'head'].includes(options.method)) {
delete options.data;
delete options.postType;
} else {
options.data = options.data ?? '';
options.postType = options.postType?.toLowerCase() || 'form';
}
let {
headers,
timeout,
charset,
toBase64 = false,
...restOpts
} = options;
const optObj = {
headers: (typeof headers === 'object' && !Array.isArray(headers) && headers) ? headers : await getHeaders(),
timeout: parseInt(timeout, 10) > 0 ? parseInt(timeout, 10) : KParams.timeout,
charset: charset?.toLowerCase() || 'utf-8',
buffer: toBase64 ? 2 : 0,
...restOpts
};
const res = await req(reqUrl, optObj);
if (options.withHeaders) {
const resHeaders = typeof res.headers === 'object' && !Array.isArray(res.headers) && res.headers ? res.headers : {};
const resWithHeaders = {
...resHeaders,
body: res?.content ?? ''
};
return JSON.stringify(resWithHeaders);
}
return res?.content ?? '';
} catch (e) {
console.error(`${reqUrl}→请求失败:`, e.message);
return options?.withHeaders ? JSON.stringify({
body: ''
}) : '';
}
}
async function getHeaders() {
const timestamp = Math.floor(Date.now() / 1000).toString();
const nonce = randomStr(3, '0123456789');
if (!device_id) {
device_id = await local.get('cache', device_id_cache_key);
if (!device_id || device_id.length !== 16) {
device_id = randomStr(16);
await local.set('cache', device_id_cache_key, device_id);
}
}
const sign_str = `finger=SF-C3B2B41F6EFFFF9869176CF68F6790E8F07506FC88632C94B4F5F0430D5498CA&id=${pkg}&nonce=${nonce}&sk=SK-thanks&time=${timestamp}&v=${ver}`;
const sign = sha256(sign_str);
return {
'User-Agent': 'okhttp/4.12.0',
'Accept': 'application/json',
'x-aid': pkg,
'x-ave': ver,
'x-time': timestamp,
'x-nonc': nonce,
'x-sign': sign,
'x-device-id': device_id,
'x-device-brand': 'vivo',
'x-device-model': 'V2309A',
'x-update-id': '0245861b-2ebf-5524-389d-f983830651ec'
};
}
function randomStr(len, chars = '0123456789abcdef') {
let str = '';
for (let i = 0; i < len; i++) {
str += chars[_.random(0, chars.length - 1)];
}
return str;
}
function sha256(text) {
return Crypto.SHA256(text).toString().toUpperCase();
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
search: search,
detail: detail,
play: play,
proxy: null
};
}
+211
View File
@@ -0,0 +1,211 @@
let host = 'https://www.qnmp4.com';
let headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Referer": host
};
async function init(cfg) {}
function getList(html) {
let videos = [];
let items = pdfa(html, ".content-list&&li");
items.forEach(it => {
let idMatch = it.match(/href="([\s\S]*?)"/);
let nameMatch = it.match(/title="([\s\S]*?)"/);
let picMatch = it.match(/data-original="([\s\S]*?)"/) || it.match(/src="([\s\S]*?)"/);
let remarksMatch = it.match(/<\/i>([\s\S]*?)<\/span>/);
if (idMatch && nameMatch) {
let pic = picMatch ? picMatch[1] : "";
videos.push({
vod_id: idMatch[1],
vod_name: nameMatch[1],
vod_pic: pic.startsWith('/') ? host + pic : pic,
vod_remarks: (remarksMatch || ["", ""])[1].replace(/<.*?>/g, "")
});
}
});
return videos;
}
async function home(filter) {
return JSON.stringify({
"class": [{
"type_id": "1",
"type_name": "电影"
},
{
"type_id": "2",
"type_name": "剧集"
},
{
"type_id": "3",
"type_name": "综艺"
},
{
"type_id": "4",
"type_name": "动漫"
},
{
"type_id": "30",
"type_name": "短剧"
}
]
});
}
async function homeVod() {
let resp = await req(host, {
headers
});
return JSON.stringify({
list: getList(resp.content)
});
}
async function category(tid, pg, filter, extend) {
let p = pg || 1;
let url = `${host}/ms/${tid}--time------${p}---.html`;
let resp = await req(url, {
headers
});
return JSON.stringify({
list: getList(resp.content),
page: parseInt(p)
});
}
async function detail(id) {
const url = host + id;
const resp = await req(url, {
headers
});
const html = resp.content;
const tabs = pdfa(html, '.py-tabs&&li');
const lists = pdfa(html, '.bd&&ul');
const playPairs = tabs.map((tab, idx) => {
const name = (tab.match(/>([\s\S]*?)</) || ['', '未知线路'])[1].trim();
const urlArr = pdfa(lists[idx] || '', 'a').map(a => {
const n = (a.match(/>([\s\S]*?)</) || ['', '未知播放'])[1];
const v = a.match(/href="([\s\S]*?)"/);
return n + '$' + (v ? v[1] : '');
}).join('#');
return {
name,
url: urlArr
};
});
const Downtabs = pdfa(html, '.nav-tabs li');
const Downlists = pdfa(html, '.down-list ul');
const DownplayPairs = Downtabs.map((Downtab, idx) => {
const name = (Downtab.match(/>([\s\S]*?)</) || ['', '未知线路'])[1].trim();
const urlArr = pdfa(Downlists[idx] || '', 'p').map(a => {
const n = (a.match(/title="([\s\S]*?)"/) || ['', '未知播放'])[1];
const v = a.match(/href="([\s\S]*?)"/);
return n + '$' + (v ? v[1] : '');
}).join('#');
return {
name,
url: urlArr
};
});
const allPairs = [...playPairs, ...DownplayPairs];
const playFrom = allPairs.map(p => p.name).join('$$$');
const playUrl = allPairs.map(p => p.url).join('$$$');
return JSON.stringify({
list: [{
vod_id: id,
vod_name: (html.match(/<h1>([\s\S]*?)<span class="year"/) || ['', ''])[1],
vod_pic: (html.match(/<div class="img">[\s\S]*?<img src="([\s\S]*?)"/) || ["", ""])[1],
vod_year: (html.match(/上映:<\/span>([\s\S]*?)<\/div>/) || ['', ''])[1],
vod_area: Array.from(
html.match(/地区:<\/span>([\s\S]*?)<\/div>/)?.[1]?.replace(/<!--[\s\S]*?-->/g, '').matchAll(/<a [^>]*>([^<]+)<\/a>/g) || []
).map(m => m[1]).join(' / ') || '',
vod_remarks: (html.match(/<div class="otherbox">([\s\S]*?)<\/div>/) || ['', ''])[1].replace(/<.*?>/g, ''),
type_name: Array.from(
html.match(/类型:<\/span>([\s\S]*?)<\/div>/)?.[1]?.replace(/<!--[\s\S]*?-->/g, '').matchAll(/<a [^>]*>([^<]+)<\/a>/g) || []
).map(m => m[1]).join(' / ') || '',
vod_actor: Array.from(
html.match(/主演:<\/span>([\s\S]*?)<\/div>/)?.[1]?.replace(/<!--[\s\S]*?-->/g, '').matchAll(/<a [^>]*>([^<]+)<\/a>/g) || []
).map(m => m[1]).join(' / ') || '',
vod_director: Array.from(
html.match(/导演:<\/span>([\s\S]*?)<\/div>/)?.[1]?.replace(/<!--[\s\S]*?-->/g, '').matchAll(/<a [^>]*>([^<]+)<\/a>/g) || []
).map(m => m[1]).join(' / ') || '',
vod_content: (html.match(/<p class="sqjj_a"[\s\S]*?>([\s\S]*?)</) || ['', ''])[1].replace(/<.*?>/g, ''),
vod_play_from: playFrom,
vod_play_url: playUrl
}]
});
}
async function search(wd, quick, pg) {
let p = pg || 1;
let url = `${host}/index.php/ajax/suggest?mid=1&wd=${wd}&limit=500`;
let resp = await req(url, {
headers
});
let json = JSON.parse(resp.content);
let videos = json.list.map(item => ({
vod_id: '/mv/' + item.id + '.html',
vod_name: item.name,
vod_pic: item.pic
}));
return JSON.stringify({
list: videos,
page: json.page || 1,
pagecount: json.pagecount || 1,
total: json.total || 0
});
}
async function play(flag, id, flags) {
if (id.startsWith('/py/')) {
try {
const playUrl = `${host}${id}`;
const resHtml = (await req(playUrl, {
headers
})).content;
const kcode = safeParseJSON(
resHtml.match(/var\s+player_\w+\s*=\s*(\{[^]*?\})\s*</)?.[1] ?? ''
);
let kurl = kcode?.url ?? '';
const kp = /m3u8|mp4|mkv/i.test(kurl) ? 0 : 1;
if (kp) kurl = playUrl;
return JSON.stringify({
jx: 0,
parse: kp,
url: kurl,
header: headers
});
} catch (e) {
return JSON.stringify({
jx: 0,
parse: 0,
url: '',
header: {}
});
}
}
if (/^https?:\/\/.*\.(baidu|quark|xunlei|aliyun|189|115|123|uc)\./i.test(id)) {
return JSON.stringify({
parse: 1,
url: `push://${id}`,
header: headers
});
}
return JSON.stringify({
parse: 1,
url: id,
header: headers
});
}
function safeParseJSON(str) {
try {
return JSON.parse(str.trim().replace(/;+$/, ''));
} catch {
return null;
}
}
export default {
init,
home,
homeVod,
category,
detail,
search,
play
};
+1435
View File
@@ -0,0 +1,1435 @@
var HOST;
const MOBILE_UA = 'Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36';
const DefHeader = {
'User-Agent': MOBILE_UA
};
const KParams = {
headers: {
'User-Agent': MOBILE_UA
}
};
async function init(cfg) {
try {
let host = cfg.ext?.host?.trim() || 'https://www.zrys.pw';
HOST = host.replace(/\/$/, '');
KParams.headers['Referer'] = HOST;
let parseTimeout = parseInt(cfg.ext?.timeout?.trim(), 10);
KParams.timeout = parseTimeout > 0 ? parseTimeout : 5000;
KParams.catesSet = cfg.ext?.catesSet?.trim() || '';
KParams.tabsSet = cfg.ext?.tabsSet?.trim() || '';
KParams.resHtml = await request(HOST);
} catch (e) {
console.error('初始化参数失败:', e.message);
}
}
async function home(filter) {
try {
let resHtml = KParams.resHtml;
let classes = pdfa(resHtml, '.navbar-items&&a').slice(1, 6).map(it => {
let cName = _pdfh(it, 'Text', '分类名');
let cId = _pdfh(it, 'a&&href').match(/(\d+)/)?.[1] ?? '分类值';
return {
type_name: cName,
type_id: cId
};
});
if (KParams.catesSet) {
classes = ctSet(classes, KParams.catesSet);
}
let filters = {
"1": [{
"key": "cateId",
"name": "类型",
"value": [{
"n": "全部",
"v": "1"
}, {
"n": "动作片",
"v": "6"
}, {
"n": "喜剧片",
"v": "7"
}, {
"n": "爱情片",
"v": "8"
}, {
"n": "科幻片",
"v": "9"
}, {
"n": "恐怖片",
"v": "10"
}, {
"n": "剧情片",
"v": "11"
}, {
"n": "战争片",
"v": "12"
}, {
"n": "记录片",
"v": "29"
}]
},
{
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "中国大陆",
"v": "/area/中国大陆"
}, {
"n": "香港",
"v": "/area/香港"
}, {
"n": "台湾",
"v": "/area/台湾"
}, {
"n": "美国",
"v": "/area/美国"
}, {
"n": "法国",
"v": "/area/法国"
}, {
"n": "英国",
"v": "/area/英国"
}, {
"n": "日本",
"v": "/area/日本"
}, {
"n": "韩国",
"v": "/area/韩国"
}, {
"n": "德国",
"v": "/area/德国"
}, {
"n": "泰国",
"v": "/area/泰国"
}, {
"n": "印度",
"v": "/area/印度"
}, {
"n": "意大利",
"v": "/area/意大利"
}, {
"n": "西班牙",
"v": "/area/西班牙"
}, {
"n": "加拿大",
"v": "/area/加拿大"
}, {
"n": "其他",
"v": "/area/其他"
}]
},
{
"key": "lang",
"name": "语言",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "国语",
"v": "/lang/国语"
}, {
"n": "英语",
"v": "/lang/英语"
}, {
"n": "粤语",
"v": "/lang/粤语"
}, {
"n": "闽南语",
"v": "/lang/闽南语"
}, {
"n": "韩语",
"v": "/lang/韩语"
}, {
"n": "日语",
"v": "/lang/日语"
}, {
"n": "法语",
"v": "/lang/法语"
}, {
"n": "德语",
"v": "/lang/德语"
}, {
"n": "其它",
"v": "/lang/其它"
}]
},
{
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}]
},
{
"key": "letter",
"name": "字母",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "/letter/A"
}, {
"n": "B",
"v": "/letter/B"
}, {
"n": "C",
"v": "/letter/C"
}, {
"n": "D",
"v": "/letter/D"
}, {
"n": "E",
"v": "/letter/E"
}, {
"n": "F",
"v": "/letter/F"
}, {
"n": "G",
"v": "/letter/G"
}, {
"n": "H",
"v": "/letter/H"
}, {
"n": "I",
"v": "/letter/I"
}, {
"n": "J",
"v": "/letter/J"
}, {
"n": "K",
"v": "/letter/K"
}, {
"n": "L",
"v": "/letter/L"
}, {
"n": "M",
"v": "/letter/M"
}, {
"n": "N",
"v": "/letter/N"
}, {
"n": "O",
"v": "/letter/O"
}, {
"n": "P",
"v": "/letter/P"
}, {
"n": "Q",
"v": "/letter/Q"
}, {
"n": "R",
"v": "/letter/R"
}, {
"n": "S",
"v": "/letter/S"
}, {
"n": "T",
"v": "/letter/T"
}, {
"n": "U",
"v": "/letter/U"
}, {
"n": "V",
"v": "/letter/V"
}, {
"n": "W",
"v": "/letter/W"
}, {
"n": "X",
"v": "/letter/X"
}, {
"n": "Y",
"v": "/letter/Y"
}, {
"n": "Z",
"v": "/letter/Z"
}, {
"n": "0-9",
"v": "/letter/0-9"
}]
},
{
"key": "by",
"name": "排序",
"value": [{
"n": "按时间",
"v": "/by/time"
}, {
"n": "按人气",
"v": "/by/hits"
}, {
"n": "按评分",
"v": "/by/score"
}]
}
],
"2": [{
"key": "cateId",
"name": "类型",
"value": [{
"n": "全部",
"v": "2"
}, {
"n": "国产剧",
"v": "13"
}, {
"n": "港台剧",
"v": "14"
}, {
"n": "韩日剧",
"v": "15"
}, {
"n": "欧美剧",
"v": "16"
}, {
"n": "海外剧",
"v": "20"
}, {
"n": "泰国剧",
"v": "21"
}]
},
{
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "中国大陆",
"v": "/area/中国大陆"
}, {
"n": "韩国",
"v": "/area/韩国"
}, {
"n": "香港",
"v": "/area/香港"
}, {
"n": "台湾",
"v": "/area/台湾"
}, {
"n": "日本",
"v": "/area/日本"
}, {
"n": "美国",
"v": "/area/美国"
}, {
"n": "泰国",
"v": "/area/泰国"
}, {
"n": "英国",
"v": "/area/英国"
}, {
"n": "新加坡",
"v": "/area/新加坡"
}, {
"n": "其他",
"v": "/area/其他"
}]
},
{
"key": "lang",
"name": "语言",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "国语",
"v": "/lang/国语"
}, {
"n": "英语",
"v": "/lang/英语"
}, {
"n": "粤语",
"v": "/lang/粤语"
}, {
"n": "闽南语",
"v": "/lang/闽南语"
}, {
"n": "韩语",
"v": "/lang/韩语"
}, {
"n": "日语",
"v": "/lang/日语"
}, {
"n": "其它",
"v": "/lang/其它"
}]
},
{
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}]
},
{
"key": "letter",
"name": "字母",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "/letter/A"
}, {
"n": "B",
"v": "/letter/B"
}, {
"n": "C",
"v": "/letter/C"
}, {
"n": "D",
"v": "/letter/D"
}, {
"n": "E",
"v": "/letter/E"
}, {
"n": "F",
"v": "/letter/F"
}, {
"n": "G",
"v": "/letter/G"
}, {
"n": "H",
"v": "/letter/H"
}, {
"n": "I",
"v": "/letter/I"
}, {
"n": "J",
"v": "/letter/J"
}, {
"n": "K",
"v": "/letter/K"
}, {
"n": "L",
"v": "/letter/L"
}, {
"n": "M",
"v": "/letter/M"
}, {
"n": "N",
"v": "/letter/N"
}, {
"n": "O",
"v": "/letter/O"
}, {
"n": "P",
"v": "/letter/P"
}, {
"n": "Q",
"v": "/letter/Q"
}, {
"n": "R",
"v": "/letter/R"
}, {
"n": "S",
"v": "/letter/S"
}, {
"n": "T",
"v": "/letter/T"
}, {
"n": "U",
"v": "/letter/U"
}, {
"n": "V",
"v": "/letter/V"
}, {
"n": "W",
"v": "/letter/W"
}, {
"n": "X",
"v": "/letter/X"
}, {
"n": "Y",
"v": "/letter/Y"
}, {
"n": "Z",
"v": "/letter/Z"
}, {
"n": "0-9",
"v": "/letter/0-9"
}]
},
{
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}
],
"3": [{
"key": "cateId",
"name": "类型",
"value": [{
"n": "全部",
"v": "3"
}, {
"n": "大陆综艺",
"v": "22"
}, {
"n": "港台综艺",
"v": "23"
}, {
"n": "日韩综艺",
"v": "24"
}, {
"n": "欧美综艺",
"v": "25"
}]
},
{
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "内地",
"v": "/area/内地"
}, {
"n": "港台",
"v": "/area/港台"
}, {
"n": "日韩",
"v": "/area/日韩"
}, {
"n": "欧美",
"v": "/area/欧美"
}]
},
{
"key": "lang",
"name": "语言",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "国语",
"v": "/lang/国语"
}, {
"n": "英语",
"v": "/lang/英语"
}, {
"n": "粤语",
"v": "/lang/粤语"
}, {
"n": "闽南语",
"v": "/lang/闽南语"
}, {
"n": "韩语",
"v": "/lang/韩语"
}, {
"n": "日语",
"v": "/lang/日语"
}, {
"n": "其它",
"v": "/lang/其它"
}]
},
{
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}]
},
{
"key": "letter",
"name": "字母",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "/letter/A"
}, {
"n": "B",
"v": "/letter/B"
}, {
"n": "C",
"v": "/letter/C"
}, {
"n": "D",
"v": "/letter/D"
}, {
"n": "E",
"v": "/letter/E"
}, {
"n": "F",
"v": "/letter/F"
}, {
"n": "G",
"v": "/letter/G"
}, {
"n": "H",
"v": "/letter/H"
}, {
"n": "I",
"v": "/letter/I"
}, {
"n": "J",
"v": "/letter/J"
}, {
"n": "K",
"v": "/letter/K"
}, {
"n": "L",
"v": "/letter/L"
}, {
"n": "M",
"v": "/letter/M"
}, {
"n": "N",
"v": "/letter/N"
}, {
"n": "O",
"v": "/letter/O"
}, {
"n": "P",
"v": "/letter/P"
}, {
"n": "Q",
"v": "/letter/Q"
}, {
"n": "R",
"v": "/letter/R"
}, {
"n": "S",
"v": "/letter/S"
}, {
"n": "T",
"v": "/letter/T"
}, {
"n": "U",
"v": "/letter/U"
}, {
"n": "V",
"v": "/letter/V"
}, {
"n": "W",
"v": "/letter/W"
}, {
"n": "X",
"v": "/letter/X"
}, {
"n": "Y",
"v": "/letter/Y"
}, {
"n": "Z",
"v": "/letter/Z"
}, {
"n": "0-9",
"v": "/letter/0-9"
}]
},
{
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}
],
"4": [{
"key": "cateId",
"name": "类型",
"value": [{
"n": "全部",
"v": "4"
}, {
"n": "动漫电影",
"v": "30"
}, {
"n": "国产动漫",
"v": "26"
}, {
"n": "韩日动漫",
"v": "27"
}, {
"n": "欧美动漫",
"v": "28"
}]
},
{
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "中国大陆",
"v": "/area/中国大陆"
}, {
"n": "日本",
"v": "/area/日本"
}, {
"n": "欧美",
"v": "/area/欧美"
}, {
"n": "其他",
"v": "/area/其他"
}]
},
{
"key": "lang",
"name": "语言",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "国语",
"v": "/lang/国语"
}, {
"n": "英语",
"v": "/lang/英语"
}, {
"n": "粤语",
"v": "/lang/粤语"
}, {
"n": "闽南语",
"v": "/lang/闽南语"
}, {
"n": "韩语",
"v": "/lang/韩语"
}, {
"n": "日语",
"v": "/lang/日语"
}, {
"n": "其它",
"v": "/lang/其它"
}]
},
{
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}]
},
{
"key": "letter",
"name": "字母",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "/letter/A"
}, {
"n": "B",
"v": "/letter/B"
}, {
"n": "C",
"v": "/letter/C"
}, {
"n": "D",
"v": "/letter/D"
}, {
"n": "E",
"v": "/letter/E"
}, {
"n": "F",
"v": "/letter/F"
}, {
"n": "G",
"v": "/letter/G"
}, {
"n": "H",
"v": "/letter/H"
}, {
"n": "I",
"v": "/letter/I"
}, {
"n": "J",
"v": "/letter/J"
}, {
"n": "K",
"v": "/letter/K"
}, {
"n": "L",
"v": "/letter/L"
}, {
"n": "M",
"v": "/letter/M"
}, {
"n": "N",
"v": "/letter/N"
}, {
"n": "O",
"v": "/letter/O"
}, {
"n": "P",
"v": "/letter/P"
}, {
"n": "Q",
"v": "/letter/Q"
}, {
"n": "R",
"v": "/letter/R"
}, {
"n": "S",
"v": "/letter/S"
}, {
"n": "T",
"v": "/letter/T"
}, {
"n": "U",
"v": "/letter/U"
}, {
"n": "V",
"v": "/letter/V"
}, {
"n": "W",
"v": "/letter/W"
}, {
"n": "X",
"v": "/letter/X"
}, {
"n": "Y",
"v": "/letter/Y"
}, {
"n": "Z",
"v": "/letter/Z"
}, {
"n": "0-9",
"v": "/letter/0-9"
}]
},
{
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}
],
"47": [{
"key": "cateId",
"name": "类型",
"value": [{
"n": "全部",
"v": "47"
}, {
"n": "短剧",
"v": "44"
}]
},
{
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}]
},
{
"key": "letter",
"name": "字母",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "/letter/A"
}, {
"n": "B",
"v": "/letter/B"
}, {
"n": "C",
"v": "/letter/C"
}, {
"n": "D",
"v": "/letter/D"
}, {
"n": "E",
"v": "/letter/E"
}, {
"n": "F",
"v": "/letter/F"
}, {
"n": "G",
"v": "/letter/G"
}, {
"n": "H",
"v": "/letter/H"
}, {
"n": "I",
"v": "/letter/I"
}, {
"n": "J",
"v": "/letter/J"
}, {
"n": "K",
"v": "/letter/K"
}, {
"n": "L",
"v": "/letter/L"
}, {
"n": "M",
"v": "/letter/M"
}, {
"n": "N",
"v": "/letter/N"
}, {
"n": "O",
"v": "/letter/O"
}, {
"n": "P",
"v": "/letter/P"
}, {
"n": "Q",
"v": "/letter/Q"
}, {
"n": "R",
"v": "/letter/R"
}, {
"n": "S",
"v": "/letter/S"
}, {
"n": "T",
"v": "/letter/T"
}, {
"n": "U",
"v": "/letter/U"
}, {
"n": "V",
"v": "/letter/V"
}, {
"n": "W",
"v": "/letter/W"
}, {
"n": "X",
"v": "/letter/X"
}, {
"n": "Y",
"v": "/letter/Y"
}, {
"n": "Z",
"v": "/letter/Z"
}, {
"n": "0-9",
"v": "/letter/0-9"
}]
},
{
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}
]
};
return JSON.stringify({
class: classes,
filters: filters
});
} catch (e) {
console.error('获取分类失败:', e.message);
return JSON.stringify({
class: [],
filters: {}
});
}
}
async function homeVod() {
try {
let resHtml = KParams.resHtml;
let VODS = getVodList(resHtml);
return JSON.stringify({
list: VODS
});
} catch (e) {
console.error('推荐页获取失败:', e.message);
return JSON.stringify({
list: []
});
}
}
async function category(tid, pg, filter, extend) {
try {
pg = parseInt(pg, 10);
pg = pg > 0 ? pg : 1;
let cateUrl = `${HOST}/index.php/vod/show/id/${extend?.cateId ?? tid}${extend?.area ?? ''}${extend?.by ?? ''}${extend?.class ?? ''}${extend?.lang ?? ''}${extend?.letter ?? ''}/page/${pg}${extend?.year ?? ''}.html`;
let resHtml = await request(cateUrl);
let VODS = getVodList(resHtml);
let pagecount = 999;
return JSON.stringify({
list: VODS,
page: pg,
pagecount: pagecount,
limit: 30,
total: 30 * pagecount
});
} catch (e) {
console.error('类别页获取失败:', e.message);
return JSON.stringify({
list: [],
page: 1,
pagecount: 0,
limit: 30,
total: 0
});
}
}
async function search(wd, quick, pg) {
try {
pg = parseInt(pg, 10);
pg = pg > 0 ? pg : 1;
let searchUrl = `${HOST}/index.php/vod/search/page/${pg}/wd/${wd}.html`;
let resHtml = await request(searchUrl);
let VODS = getVodList(resHtml);
return JSON.stringify({
list: VODS,
page: pg,
pagecount: 10,
limit: 30,
total: 300
});
} catch (e) {
console.error('搜索页获取失败:', e.message);
return JSON.stringify({
list: [],
page: 1,
pagecount: 0,
limit: 30,
total: 0
});
}
}
async function detail(id) {
try {
let detailUrl = !/^http/.test(id) ? `${HOST}${id}` : id;
let resHtml = await request(detailUrl);
let intros = pdfh(resHtml, '.module-main:has(h1)');
let ktabs = pdfa(resHtml, '.tab-item').map((it, idx) => _pdfh(it, 'span&&Text', `线-${idx+1}`));
let kurls = pdfa(resHtml, '.module-play-list').map(item => {
let kurl = pdfa(item, 'a').map(it => {
return _pdfh(it, 'body&&Text', 'noEpi') + '$' + _pdfh(it, 'a&&href', 'noUrl');
});
return kurl.join('#');
});
if (KParams.tabsSet) {
let ktus = ktabs.map((it, idx) => {
return {
type_name: it,
type_value: kurls[idx]
}
});
ktus = ctSet(ktus, KParams.tabsSet);
ktabs = ktus.map(it => it.type_name);
kurls = ktus.map(it => it.type_value);
}
let VOD = {
vod_id: detailUrl,
vod_name: _pdfh(intros, 'h1&&Text', '名称'),
vod_pic: _pdfh(intros, 'img&&data-original', '图片'),
type_name: _pdfh(intros, '.module-info-tag-link:eq(-1)&&Text', '类型'),
vod_remarks: `${_pdfh(intros, '.module-info-item-content:eq(-1)&&Text', '状态')}|${_pdfh(intros, '.module-info-item-content:eq(-2)&&Text', '更新')}`,
vod_year: _pdfh(intros, '.module-info-tag-link&&Text', '1000'),
vod_area: _pdfh(intros, '.module-info-tag-link:eq(1)&&Text', '地区'),
vod_lang: '语言',
vod_director: cutStr(intros, '导演:', '</div>', '导演'),
vod_actor: cutStr(intros, '主演:', '</div>', '主演'),
vod_content: _pdfh(intros, '.show-desc&&Text', '简介'),
vod_play_from: ktabs.join('$$$'),
vod_play_url: kurls.join('$$$')
};
return JSON.stringify({
list: [VOD]
});
} catch (e) {
console.error('详情页获取失败:', e.message);
return JSON.stringify({
list: []
});
}
}
async function play(flag, id, flags) {
try {
let playUrl = !/^http/.test(id) ? `${HOST}${id}` : id;
let kp = 0;
let resHtml = await request(playUrl);
let kcode = safeParseJSON(resHtml.match(/var player_.*?=([^]*?)</)?.[1] ?? '');
let kurl = kcode?.url ?? '';
if (!/m3u8|mp4|mkv/.test(kurl)) {
kp = 1;
kurl = playUrl;
}
return JSON.stringify({
jx: 0,
parse: kp,
url: kurl,
header: DefHeader
});
} catch (e) {
console.error('播放失败:', e.message);
return JSON.stringify({
jx: 0,
parse: 0,
url: '',
header: {}
});
}
}
function getVodList(khtml) {
try {
let kvods = [];
let listArr = pdfa(khtml, '.module-item');
listArr.forEach(it => {
kvods.push({
vod_name: _pdfh(it, 'img&&alt', '名称'),
vod_pic: _pdfh(it, 'img&&data-original', '图片'),
vod_remarks: _pdfh(it, '.module-item-note&&Text', '状态'),
vod_id: _pdfh(it, 'a&&href'),
});
});
return kvods;
} catch (e) {
console.error(`生成视频列表失败:`, e.message);
return [];
}
}
function _pdfh(dom, selector, defaultValue = '') {
if (typeof dom !== 'string' || typeof selector !== 'string' || !dom.trim() || !selector.trim()) {
return defaultValue;
}
return (pdfh(dom, selector) || '').replace(/\s+/g, ' ').trim() || defaultValue;
}
function safeParseJSON(jStr) {
try {
return JSON.parse(jStr);
} catch (e) {
return null;
}
}
function cutStr(str, prefix = '', suffix = '', defaultVal = '截取失败') {
if (!str || typeof str !== 'string') return defaultVal;
const esc = s => String(s).replace(/[.*+?${}()|[\]\\/^]/g, '\\$&');
let [pre, end] = [esc(prefix), esc(suffix)];
let regex = new RegExp(`${pre ? pre : '^'}([^]*?)${end ? end : '$'}`);
let result = str.match(regex)?.[1].replace(/<[^>]*?>/g, '').trim().replace(/\s+/g, ' ') ?? defaultVal;
return result;
}
function ctSet(kArr, setStr) {
if (!Array.isArray(kArr)) {
return kArr;
}
try {
let [set_arr, arrNames] = [
[...kArr], setStr.split('&')
];
if (arrNames.length) {
let filtered_arr = arrNames.map((item) => set_arr.find(it => it.type_name === item)).filter(Boolean);
set_arr = filtered_arr.length ? filtered_arr : [set_arr[0]];
}
return set_arr;
} catch (e) {
return kArr;
}
}
async function request(reqUrl, options = {}) {
if (typeof reqUrl !== 'string' || !reqUrl.trim()) {
throw new Error('reqUrl需为字符串且非空');
}
if (typeof options !== 'object' || Array.isArray(options) || !options) {
throw new Error('options类型需为非null对象');
}
try {
options.method = options.method?.toLowerCase() || 'get';
if (['get', 'head'].includes(options.method)) {
delete options.data;
delete options.postType;
} else {
options.data = options.data ?? '';
options.postType = options.postType?.toLowerCase() || 'form';
}
let {
headers,
timeout,
charset,
toBase64 = false,
...restOpts
} = options;
const optObj = {
headers: (typeof headers === 'object' && !Array.isArray(headers) && headers) ? headers : KParams.headers,
timeout: parseInt(timeout, 10) > 0 ? parseInt(timeout, 10) : KParams.timeout,
charset: charset?.toLowerCase() || 'utf-8',
buffer: toBase64 ? 2 : 0,
...restOpts
};
const res = await req(reqUrl, optObj);
if (options.withHeaders) {
const resHeaders = typeof res.headers === 'object' && !Array.isArray(res.headers) && res.headers ? res.headers : {};
const resWithHeaders = {
...resHeaders,
body: res?.content ?? ''
};
return JSON.stringify(resWithHeaders);
}
return res?.content ?? '';
} catch (e) {
console.error(`${reqUrl}→请求失败:`, e.message);
return options?.withHeaders ? JSON.stringify({
body: ''
}) : '';
}
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
search: search,
detail: detail,
play: play,
proxy: null
};
}
+133
View File
@@ -0,0 +1,133 @@
let host = 'https://vip.wwgz.cn:5200';
let headers = {
"User-Agent": "Mozilla/5.0 (Linux; Android 13; M2102J2SC Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/145.0.7632.7 Mobile Safari/537.36"
};
async function init(cfg) {}
function getList(html) {
let videos = [];
let selector = '';
if (html.includes('class="globalPicList"')) selector = '.globalPicList&&li';
else if (html.includes('class="ulPicTxt')) selector = '.ulPicTxt&&li';
if (!selector) return videos;
let items = pdfa(html, selector);
items.forEach(it => {
let idMatch = it.match(/href="(.*?)"/);
let nameMatch = it.match(/<span class="sTit">(.*?)<\/span>/);
let picMatch = it.match(/data-src="(.*?)"/) || it.match(/src="(.*?)"/);
let remarksMatch = it.match(/<span>([\s\S]*?)<em>/) || it.match(/<span class="sStyle">([\s\S]*?)<\/span>/);
if (idMatch && nameMatch) {
let pic = picMatch ? (picMatch[1] || picMatch[2]) : "";
videos.push({
vod_id: idMatch[1],
vod_name: nameMatch?.[1]?.trim() || "未知片名",
vod_pic: pic.startsWith('/') ? host + pic : pic,
vod_remarks: remarksMatch?.[1]?.trim() || "未提供"
});
}
});
return videos;
}
async function home(filter) {
return JSON.stringify({
"class": [{
"type_id": "1",
"type_name": "电影"
}, {
"type_id": "2",
"type_name": "剧集"
}, {
"type_id": "3",
"type_name": "综艺"
}, {
"type_id": "4",
"type_name": "动漫"
}, {
"type_id": "26",
"type_name": "短剧"
}]
});
}
async function homeVod() {
let resp = await req(host, {
headers
});
return JSON.stringify({
list: getList(resp.content)
});
}
async function category(tid, pg, filter, extend) {
let p = pg || 1;
let targetId = (extend && extend.class) ? extend.class : tid;
let url = `${host}/vod-list-id-${tid}-pg-${p}-order--by-time-class-0-year-0-letter--area--lang-.html`;
let resp = await req(url, {
headers
});
return JSON.stringify({
list: getList(resp.content),
page: parseInt(p)
});
}
async function detail(id) {
const dUrl = host + id;
const dResp = await req(dUrl, {
headers
});
const dhtml = dResp.content;
const playPageUrl = pdfh(dhtml, '.page-btn a.greenBtn&&href');
if (!playPageUrl) {
return JSON.stringify({
list: []
});
}
const pResp = await req(host + playPageUrl, {
headers
});
const phtml = pResp.content;
const playFrom = phtml.match(/mac_from='([\s\S]*?)'/)?.[1] ?? '';
const playUrl = phtml.match(/mac_url='([\s\S]*?)'/)?.[1] ?? '';
return JSON.stringify({
list: [{
vod_id: id,
vod_name: (dhtml.match(/<h1 class="title">[\s\S]*?title="[\s\S]*?">([\s\S]*?)<\/a>/) || ['', ''])[1],
vod_pic: (dhtml.match(/<img src="([\s\S]*?)"/) || ["", ""])[1],
vod_year: (dhtml.match(/年代:[\s\S]*?<em>([\s\S]*?)<\/em>/) || ['', ''])[1],
vod_remarks: (dhtml.match(/red">([\s\S]*?)<\/font>/) || ['', ''])[1],
vod_actor: Array.from(
dhtml.match(/主演:([\s\S]*?)<\/div>/)?.[1]?.matchAll(/<a [^>]*>([^<]+)<\/a>/g) || []
).map(m => m[1]).join(' / ') || '',
vod_director: Array.from(
dhtml.match(/导演:([\s\S]*?)<\/div>/)?.[1]?.matchAll(/<a [^>]*>([^<]+)<\/a>/g) || []
).map(m => m[1]).join(' / ') || '',
vod_content: (dhtml.match(/<p>([\s\S]*?)<\/p>/) || ['', ''])[1].replace(/<.*?>/g, '').replace("简&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;介:", ""),
vod_play_from: playFrom,
vod_play_url: playUrl
}]
});
}
async function search(wd, quick, pg) {
let url = `${host}/index.php?m=vod-search&wd=${wd}`;
let resp = await req(url, {
method: 'POST',
headers: headers
});
return JSON.stringify({
list: getList(resp.content)
});
}
async function play(flag, id, flags) {
return JSON.stringify({
parse: 1,
url: `https://api.nmvod.me:520/player/?url=${id}`,
header: headers
});
}
export default {
init,
home,
homeVod,
category,
detail,
search,
play
};
+214
View File
@@ -0,0 +1,214 @@
const host = 'https://app.whjzjx.cn';
const headers = {
'User-Agent': 'okhttp/4.10.0',
'user_agent': 'Mozilla/5.0 (Linux; Android 9; RMX1931 Build/PQ3A.190605.05081124; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36',
'app_version': '3.0.0.1',
'version_name': '3.0.0.1',
'support_h265': '1',
'platform': '1',
'device_platform': 'android',
'device_type': 'RMX1931',
'device_brand': 'realme',
'os_version': '9',
'channel': 'default',
'raw_channel': 'default',
'oaid': '',
'msa_oaid': '',
'uuid': 'randomUUID_' + Math.random().toString(36).slice(2),
'device_id': Math.random().toString(36).slice(2, 18),
'ab_id': '',
'manufacturer': 'realme',
'personalized_recommend_status': '1',
'Content-Type': 'application/json'
};
const CACHE_KEY = 'xyAuthorization';
function getCache() {
try {
return localStorage.getItem(CACHE_KEY) || '';
} catch {
return '';
}
}
function setCache(val) {
try {
localStorage.setItem(CACHE_KEY, val);
} catch {}
}
async function refreshToken() {
const url = 'https://u.shytkjgs.com/user/v1/account/login';
const payload = {
device: headers.device_id,
install_first_open: false,
first_install_time: Date.now(),
last_update_time: Date.now(),
report_link_url: ''
};
const resp = await req(url, {
method: 'POST',
headers: headers,
data: payload
});
const obj = JSON.parse(resp.content);
const tk = obj?.data?.token || '';
if (tk) setCache(tk);
return tk;
}
async function assureAuth() {
let tk = getCache();
if (!tk) tk = await refreshToken();
return tk;
}
async function init(cfg) {}
async function home(filter) {
return JSON.stringify({
class: [{
type_id: '1',
type_name: '剧场'
},
{
type_id: '2',
type_name: '热播剧'
},
{
type_id: '7',
type_name: '星选好剧'
},
{
type_id: '3',
type_name: '新剧'
},
{
type_id: '5',
type_name: '阳光剧场'
},
{
type_id: '8',
type_name: '会员'
}
]
});
}
async function homeVod() {
const auth = await assureAuth();
const url = `${host}/cloud/v2/theater/home_page?theater_class_id=2&type=2&class2_ids=0&page_num=1&page_size=24`;
const resp = await req(url, {
headers: {
headers,
authorization: auth
}
});
const list = JSON.parse(resp.content).data?.list || [];
const videos = list.map(it => ({
vod_id: it.theater.id,
vod_name: it.theater.title,
vod_pic: it.theater.cover_url,
vod_remarks: '共' + it.theater.total + '集'
}));
return JSON.stringify({
list: videos
});
}
async function category(tid, pg, filter, extend) {
const auth = await assureAuth();
const p = pg || 1;
const url = `${host}/cloud/v2/theater/home_page?theater_class_id=${tid}&type=${tid}&class2_ids=0&page_num=${p}&page_size=24`;
const resp = await req(url, {
headers: {
headers,
authorization: auth
}
});
const list = JSON.parse(resp.content).data?.list || [];
const videos = list.map(it => ({
vod_id: it.theater.id,
vod_name: it.theater.title,
vod_pic: it.theater.cover_url,
vod_remarks: '共' + it.theater.total + '集'
}));
return JSON.stringify({
list: videos,
page: parseInt(p)
});
}
async function detail(id) {
const auth = await assureAuth();
const url = `${host}/v2/theater_parent/detail?theater_parent_id=${id}`;
const resp = await req(url, {
headers: {
headers,
authorization: auth
}
});
const data = JSON.parse(resp.content).data;
const playUrl = (data.theaters || [])
.map(item => item.son_video_url)
.join('#');
return JSON.stringify({
list: [{
vod_id: id,
vod_name: data.title || '',
vod_pic: data.cover_url || '',
vod_remarks: '更新至' + data.total + '集',
type_name: (data.desc_tags || []).join(','),
vod_content: data.introduction || '',
vod_play_from: '星芽速播',
vod_play_url: playUrl
}]
});
}
async function search(wd, quick, pg) {
const auth = await assureAuth();
const p = pg || 1;
const url = `${host}/v3/search`;
const resp = await req(url, {
method: 'POST',
headers: {
headers,
authorization: auth
},
data: {
text: wd
}
});
const list = JSON.parse(resp.content).data?.theater?.search_data || [];
const videos = list.map(it => ({
vod_id: it.id,
vod_name: it.title,
vod_pic: it.cover_url,
vod_remarks: '共' + it.total + '集'
}));
return JSON.stringify({
list: videos
});
}
async function play(flag, id, flags) {
return JSON.stringify({
parse: 0,
url: id,
header: headers
});
}
export default {
init,
home,
homeVod,
category,
detail,
search,
play
};
+101
View File
@@ -0,0 +1,101 @@
let host = 'https://mov.cenguigui.cn/duanju/api.php?';
let headers = {
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; M2102J2SC Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/141.0.7390.17 Mobile Safari/537.36'
};
async function init(cfg) {}
function getList(data) {
let videos = [];
let list = data.data || [];
list.forEach(it => {
videos.push({
vod_id: it.book_id,
vod_name: it.title,
vod_pic: it.cover,
vod_remarks: "共" + it.episode_cnt + "集"
});
});
return videos;
}
async function home(filter) {
return JSON.stringify({
class: [{"type_id":"推荐榜","type_name":"推荐榜"},{"type_id":"新剧","type_name":"新剧"},{"type_id":"逆袭","type_name":"逆袭"},{"type_id":"霸总","type_name":"霸总"},{"type_id":"现代言情","type_name":"现代言情"},{"type_id":"打脸虐渣","type_name":"打脸虐渣"},{"type_id":"豪门恩怨","type_name":"豪门恩怨"},{"type_id":"神豪","type_name":"神豪"},{"type_id":"马甲","type_name":"马甲"},{"type_id":"都市日常","type_name":"都市日常"},{"type_id":"战神归来","type_name":"战神归来"},{"type_id":"小人物","type_name":"小人物"},{"type_id":"女性成长","type_name":"女性成长"},{"type_id":"大女主","type_name":"大女主"},{"type_id":"穿越","type_name":"穿越"},{"type_id":"都市修仙","type_name":"都市修仙"},{"type_id":"强者回归","type_name":"强者回归"},{"type_id":"亲情","type_name":"亲情"},{"type_id":"古装","type_name":"古装"},{"type_id":"重生","type_name":"重生"},{"type_id":"闪婚","type_name":"闪婚"},{"type_id":"赘婿逆袭","type_name":"赘婿逆袭"},{"type_id":"虐恋","type_name":"虐恋"},{"type_id":"追妻","type_name":"追妻"},{"type_id":"天下无敌","type_name":"天下无敌"},{"type_id":"家庭伦理","type_name":"家庭伦理"},{"type_id":"萌宝","type_name":"萌宝"},{"type_id":"古风权谋","type_name":"古风权谋"},{"type_id":"职场","type_name":"职场"},{"type_id":"奇幻脑洞","type_name":"奇幻脑洞"},{"type_id":"异能","type_name":"异能"},{"type_id":"无敌神医","type_name":"无敌神医"},{"type_id":"古风言情","type_name":"古风言情"},{"type_id":"传承觉醒","type_name":"传承觉醒"},{"type_id":"现言甜宠","type_name":"现言甜宠"},{"type_id":"奇幻爱情","type_name":"奇幻爱情"},{"type_id":"乡村","type_name":"乡村"},{"type_id":"历史古代","type_name":"历史古代"},{"type_id":"王妃","type_name":"王妃"},{"type_id":"高手下山","type_name":"高手下山"},{"type_id":"娱乐圈","type_name":"娱乐圈"},{"type_id":"强强联合","type_name":"强强联合"},{"type_id":"破镜重圆","type_name":"破镜重圆"},{"type_id":"暗恋成真","type_name":"暗恋成真"},{"type_id":"民国","type_name":"民国"},{"type_id":"欢喜冤家","type_name":"欢喜冤家"},{"type_id":"系统","type_name":"系统"},{"type_id":"真假千金","type_name":"真假千金"},{"type_id":"龙王","type_name":"龙王"},{"type_id":"校园","type_name":"校园"},{"type_id":"穿书","type_name":"穿书"},{"type_id":"女帝","type_name":"女帝"},{"type_id":"团宠","type_name":"团宠"},{"type_id":"年代爱情","type_name":"年代爱情"},{"type_id":"玄幻仙侠","type_name":"玄幻仙侠"},{"type_id":"青梅竹马","type_name":"青梅竹马"},{"type_id":"悬疑推理","type_name":"悬疑推理"},{"type_id":"皇后","type_name":"皇后"},{"type_id":"替身","type_name":"替身"},{"type_id":"大叔","type_name":"大叔"},{"type_id":"喜剧","type_name":"喜剧"},{"type_id":"剧情","type_name":"剧情"}]
});
}
async function homeVod() {
let resp = await req(host+"classname=新剧&page=1", {
headers
});
let data = JSON.parse(resp.content);
return JSON.stringify({
list: getList(data)
});
}
async function category(tid, pg, filter, extend) {
const p = pg || 1;
let url = `${host}classname=${tid}&page=${p}`;
let resp = await req(url, {
headers
});
let data = JSON.parse(resp.content);
return JSON.stringify({
list: getList(data),
page: parseInt(p)
});
}
async function detail(id) {
const url = `${host}book_id=${id}`;
const resp = await req(url, { headers });
const json = JSON.parse(resp.content);
const playUrl = (json.data || []).map(it => `${it.title}$https://mov.cenguigui.cn/duanju/api.php?video_id=${it.video_id}&type=mp4`).join('#');
return JSON.stringify({
list: [{
vod_id: id,
vod_name: json.book_name || '',
vod_pic: json.book_pic || '',
vod_year: json.time || '',
vod_remarks: "更新至"+json.total+"集"+"|"+"时长:"+json.duration,
type_name: (json.category_names || []).join(','),
vod_director: json.author || '',
vod_content: json.desc || '',
vod_play_from: '红果速播',
vod_play_url: playUrl
}]
});
}
async function search(wd, quick, pg) {
const p = pg || 1;
let url = `${host}name=${wd}&page=${p}`;
let resp = await req(url, {
headers
});
let data = JSON.parse(resp.content);
return JSON.stringify({
list: getList(data),
page: parseInt(p)
});
}
async function play(flag, id, flags) {
return JSON.stringify({
parse: 0,
url: id,
header: headers
});
}
export default {
init,
home,
homeVod,
category,
detail,
search,
play
};
+202
View File
@@ -0,0 +1,202 @@
let host = 'https://www.guangzhiqi.com';
let headers = {
"User-Agent": "Mozilla/5.0 (Linux; Android 13; M2102J2SC Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/143.0.7499.3 Mobile Safari/537.36"
};
async function init(cfg) {}
function getList(html) {
let videos = [];
const list = pdfa(html, '.a-con-inner');
list.forEach(it => {
const id = pdfh(it, 'a&&href');
const name = pdfh(it, 'a&&title');
const pic = pdfh(it, 'img&&data-src');
const remark = pdfh(it, '.s4.text-left&&Text');
const year = pdfh(it, '.s3.text-left&&Text');
videos.push({
vod_id: id,
vod_name: name,
vod_pic: pic,
vod_year: `评分:${year}`,
vod_remarks: remark
});
});
return videos;
}
async function home(filter) {
return JSON.stringify({
"class": [{
"type_id": "1",
"type_name": "电影"
}, {
"type_id": "2",
"type_name": "剧集"
}, {
"type_id": "3",
"type_name": "综艺"
}, {
"type_id": "4",
"type_name": "动漫"
}, {
"type_id": "5",
"type_name": "短剧"
}]
});
}
async function homeVod() {
let resp = await req(host, {
headers
});
return JSON.stringify({
list: getList(resp.content)
});
}
async function category(tid, pg, filter, extend) {
let p = pg || 1;
let url = `${host}/index.php/ajax/data?mid=1&tid=${tid}&page=${p}&limit=30`;
let resp = await req(url, {
headers
});
let json = JSON.parse(resp.content);
let videos = json.list.map(item => ({
vod_id: '/guadetail/' + item.vod_id + '.html',
vod_name: item.vod_name,
vod_pic: item.vod_pic,
vod_year: "评分:"+item.vod_score,
vod_remarks: item.vod_remarks
}));
return JSON.stringify({
list: videos,
page: parseInt(p)
});
}
async function detail(id) {
const dUrl = host + id;
const dResp1 = await req(dUrl, {
headers
});
const thtml = dResp1.content;
const playPageUrl = pdfh(thtml, '.con&&.play a&&href');
if (!playPageUrl) {
return JSON.stringify({
list: []
});
}
const dResp2 = await req(host + playPageUrl, {
headers
});
const phtml = dResp2.content;
const lineBtnList = pdfa(phtml, '.mxianlu a');
const lineInfo = lineBtnList.map(a => ({
name: pdfh(a, 'a&&Text').replace(/\d+/g, '').trim(),
href: pdfh(a, 'a&&href')
}));
const playUrlArr = [];
for (const l of lineInfo) {
let html;
if (l.href.includes('javascript:')) {
html = phtml;
} else {
const lineUrl = l.href.startsWith('http') ? l.href : host + l.href;
const tmp = await req(lineUrl, {
headers
});
html = tmp.content;
}
const jiStr = pdfa(html, '.jisu a')
.map(it => {
const title = pdfh(it, 'a&&Text');
const href = pdfh(it, 'a&&href');
return `${title}$${href}`;
})
.join('#');
playUrlArr.push(jiStr);
}
const playFrom = lineInfo.map(l => l.name).join('$$$');
const playUrl = playUrlArr.join('$$$');
return JSON.stringify({
list: [{
vod_id: id,
vod_name: (thtml.match(/<p class="tit">([\s\S]*?)<\/p>/) || ["", ""])[1],
vod_pic: (thtml.match(/data-src="([\s\S]*?)"/) || ["", ""])[1],
vod_year: (thtml.match(/<a href="\/guasw\/[\s\S]*?-----------[\s\S]*?.html">([\s\S]*?)<\/a>/) || ["", ""])[1],
vod_area: (thtml.match(/<a href="\/guasw\/[\s\S]*?-[\s\S]*?----------.html">([\s\S]*?)<\/a>/) || ["", ""])[1],
vod_remarks: (thtml.match(/状态:<\/span>([\s\S]*?)</) || ['', ''])[1] + "时间:" + (thtml.match(/时间:<\/span>([\s\S]*?)</) || ['', ''])[1],
type_name: (thtml.match(/<a href="\/guasw\/[\s\S]*?---[\s\S]*?--------.html" title="[\s\S]*?">([\s\S]*?)<\/a>/) || ["", ""])[1],
vod_actor: Array.from(
thtml.match(/主演:<\/span>([\s\S]*?)<\/p>/)?.[1]?.matchAll(/<a [^>]*>([^<]+)<\/a>/g) || []).map(m => m[1]).join(' / ') || '',
vod_director: Array.from(
thtml.match(/导演:<\/span>([\s\S]*?)<\/p>/)?.[1]?.matchAll(/<a [^>]*>([^<]+)<\/a>/g) || []).map(m => m[1]).join(' / ') || '',
vod_content: (thtml.match(/articleText">([\s\S]*?)<span/) || ["", ""])[1].replace(/<.*?>/g, ""),
vod_play_from: playFrom,
vod_play_url: playUrl
}]
});
}
async function search(wd, quick, pg) {
let p = pg || 1;
let url = `${host}/index.php/ajax/suggest?mid=1&wd=${wd}&limit=500`;
let resp = await req(url, {
headers
});
let json = JSON.parse(resp.content);
let videos = json.list.map(item => ({
vod_id: '/guadetail/' + item.id + '.html',
vod_name: item.name,
vod_pic: item.pic,
vod_remarks: item.en
}));
return JSON.stringify({
list: videos,
page: json.page || 1,
pagecount: json.pagecount || 1,
total: json.total || 0
});
}
async function play(flag, id, flags) {
try {
const playUrl = /^http/.test(id) ? id : `${host}${id}`;
const resHtml = (await req(playUrl, {
headers
})).content;
const kcode = safeParseJSON(
resHtml.match(/var player_.*?=([^]*?)</)?.[1] ?? ''
);
let kurl = kcode?.url ?? '';
const kp = /m3u8|mp4|mkv/i.test(kurl) ? 0 : 1;
if (kp) kurl = playUrl;
return JSON.stringify({
jx: 0,
parse: kp,
url: kurl,
header: headers
});
} catch (e) {
return JSON.stringify({
jx: 0,
parse: 0,
url: '',
header: {}
});
}
}
function safeParseJSON(str) {
try {
return JSON.parse(str.trim().replace(/;+$/, ''));
} catch {
return null;
}
}
export default {
init,
home,
homeVod,
category,
detail,
search,
play
};
+168
View File
@@ -0,0 +1,168 @@
let host = 'https://www.jdmv.net';
let headers = {
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; M2102J2SC Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/144.0.7559.31 Mobile Safari/537.36',
};
function getList(html) {
let videos = [];
const list = pdfa(html, '.public-list-box');
list.forEach(it => {
const id = pdfh(it, 'a&&href');
const name = pdfh(it, 'a&&title');
const pic = pdfh(it, 'img&&data-src');
const remark = pdfh(it, '.ft2&&Text');
videos.push({
vod_id: id,
vod_name: name,
vod_pic: pic,
vod_remarks: remark
});
});
return videos;
}
async function init(cfg) {}
async function home(filter) {
return JSON.stringify({
class: [{
"type_id": "1",
"type_name": "电影"
}, {
"type_id": "2",
"type_name": "电视剧"
}, {
"type_id": "3",
"type_name": "综艺"
}, {
"type_id": "4",
"type_name": "动漫"
}, {
"type_id": "5",
"type_name": "短剧"
}]
});
}
async function homeVod() {
let resp = await req(host, {
headers
});
return JSON.stringify({
list: getList(resp.content)
});
}
async function category(tid, pg, filter, extend) {
const p = pg || 1;
const url = `${host}/vodtype/${tid}-${p}.html`;
const resp = await req(url, {
headers
});
return JSON.stringify({
list: getList(resp.content),
page: parseInt(p),
pagecount: parseInt(p) + 1
});
}
async function detail(id) {
const url = host + id;
const resp = await req(url, {
headers
});
const html = resp.content;
const blockList = [];
const tabs = pdfa(html, 'a.swiper-slide');
const lists = pdfa(html, '.anthology-list-box ul');
const playPairs = tabs
.map((tab, idx) => {
const name = pdfh(tab, 'a&&Text').replace(/\s+/g, '').replace(/(\D+)(\d+)/, '$1|共$2集').replace(/腾讯/g, "线路一").replace(/优酷/g, "线路二").replace(/奇艺/g, "线路三").replace(/哔哩/g, "线路四").replace(/芒果/g, "线路五");
const urlArr = pdfa(lists[idx] || '', 'a')
.map(a => pdfh(a, 'a&&Text') + '$' + pdfh(a, 'a&&href'))
.join('#');
return {
name,
url: urlArr
};
})
.filter(item => !blockList.includes(item.name));
const playFrom = playPairs.map(p => p.name).join('$$$');
const playUrl = playPairs.map(p => p.url).join('$$$');
return JSON.stringify({
list: [{
vod_id: id,
vod_name: pdfh(html, '.this-desc-title"&&Text'),
vod_pic: pd(html, '.this-pic-bj&&style'),
vod_year: pdfh(html, '.slide-desc-box&&span:eq(3)&&Text'),
vod_area: pdfh(html, '.slide-desc-box&&span:eq(4)&&Text'),
vod_remarks: pdfh(html, '.slide-desc-box&&span:eq(5)&&Text'),
type_name: pdfa(html, '.this-desc-tags&&span').map((it) => pdfh(it, 'body&&Text')).join('/'),
vod_actor: pdfa(html, '.this-info:contains(演员) a').map(it => pdfh(it, 'body&&Text')).join('/'),
vod_director: pdfa(html, '.this-info:contains(导演) a').map(it => pdfh(it, 'body&&Text')).join('/'),
vod_content: pdfh(html, '.text&&Text').replace(/\s+/g, '').replace("描述:", ""),
vod_play_from: playFrom,
vod_play_url: playUrl
}]
});
}
async function search(wd, quick, pg) {
let p = pg || 1;
let url = `${host}/index.php/ajax/suggest?mid=1&wd=${wd}&limit=500`;
let resp = await req(url, {
headers
});
let json = JSON.parse(resp.content);
let videos = json.list.map(item => ({
vod_id: '/voddetail/' + item.id + '.html',
vod_name: item.name,
vod_pic: item.pic,
vod_remarks: item.en
}));
return JSON.stringify({
list: videos,
page: json.page || 1,
pagecount: json.pagecount || 1,
total: json.total || 0
});
}
async function play(flag, id, flags) {
try {
let playUrl = !/^http/.test(id) ? `${host}${id}` : id;
let resHtml = (await req(playUrl, {
headers
})).content;
let kcode = safeParseJSON(
resHtml.match(/var\s+player_\w+\s*=\s*(\{[^]*?\})\s*</)?.[1] ?? ''
);
let kurl = kcode?.url ?? '';
let kp = /m3u8|mp4|mkv/i.test(kurl) ? 0 : 1;
if (kp) kurl = playUrl;
return JSON.stringify({
jx: 0,
parse: kp,
url: kurl,
header: headers
});
} catch (e) {
return JSON.stringify({
jx: 0,
parse: 0,
url: '',
header: {}
});
}
}
function safeParseJSON(str) {
try {
return JSON.parse(str.trim().replace(/;+$/, ''));
} catch {
return null;
}
}
export default {
init,
home,
homeVod,
category,
detail,
search,
play
};
+162
View File
@@ -0,0 +1,162 @@
let host = 'https://api.jinlidj.com';
let headers = {
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; M2102J2SC Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/144.0.7559.31 Mobile Safari/537.36'
};
async function init(cfg) {}
function getList(data) {
let videos = [];
let list = data.data?.list || [];
list.forEach(it => {
videos.push({
vod_id: it.vod_id,
vod_name: it.vod_name,
vod_pic: it.vod_pic,
vod_remarks: "共" + it.vod_total + "集"
});
});
return videos;
}
async function home(filter) {
return JSON.stringify({
class: [{
"type_id": "1",
"type_name": "情感关系"
},
{
"type_id": "2",
"type_name": "成长逆袭"
},
{
"type_id": "3",
"type_name": "奇幻异能"
},
{
"type_id": "4",
"type_name": "战斗热血"
},
{
"type_id": "5",
"type_name": "现实"
},
{
"type_id": "6",
"type_name": "时空穿越"
},
{
"type_id": "7",
"type_name": "权谋身份"
}
]
});
}
async function homeVod() {
let resp = await req(host + '/api/search', {
method: 'POST',
headers: headers,
data: {
"page": 1,
"limit": 24,
"type_id": 2,
"year": "",
"keyword": ""
}
});
let data = JSON.parse(resp.content);
return JSON.stringify({
list: getList(data)
});
}
async function category(tid, pg, filter, extend) {
const p = pg || 1;
const cateId = extend.cateId || tid;
let resp = await req(host + '/api/search', {
method: 'POST',
headers: headers,
data: {
"page": p,
"limit": 24,
"type_id": tid,
"year": "",
"keyword": ""
}
});
let data = JSON.parse(resp.content);
return JSON.stringify({
list: getList(data),
page: parseInt(p)
});
}
async function detail(id) {
const url = host + '/api/detail/' + id;
const resp = await req(url, { headers });
const data = JSON.parse(resp.content).data;
const playUrl = Object.values(data.player || {}).join('#');
return JSON.stringify({
list: [{
vod_id: id,
vod_name: data.vod_name || "",
vod_pic: data.vod_pic || "",
vod_year: data.vod_year || "",
vod_area: data.vod_area || "",
vod_remarks: "更新至" + (data.vod_total || 0) + "集",
type_name: [data.vod_class, data.vod_tag].filter(Boolean).join(','),
vod_actor: data.vod_actor || "",
vod_director: data.vod_director || "",
vod_content: data.vod_blurb || "",
vod_play_from: '锦鲤速播',
vod_play_url: playUrl
}]
});
}
async function search(wd, quick, pg) {
let p = pg || 1;
let resp = await req(host + '/api/search', {
method: 'POST',
headers: headers,
data: {
"page": p,
"limit": 24,
"type_id": "",
"year": "",
"keyword": wd
}
});
let data = JSON.parse(resp.content);
return JSON.stringify({
list: getList(data)
});
}
async function play(flag, id, flags) {
const resp = await req(id + "&auto=1", {
headers: headers
});
const html = resp.content;
const m3u8Match = html.match(/let data =[\s\S]*?"url":"(.*?)"};/);
if (m3u8Match) {
return JSON.stringify({
parse: 0,
url: m3u8Match[1].replace(/\\/g, ""),
header: headers
});
}
}
export default {
init,
home,
homeVod,
category,
detail,
search,
play
};
File diff suppressed because one or more lines are too long
+3201
View File
@@ -0,0 +1,3201 @@
import {
cheerio,
模板
} from "drpy-core-lite.min.js";
let vercode = typeof pdfl === "function" ? "drpy2.1" : "drpy2";
const VERSION = vercode + " 3.9.52beta3 20250801";
const UpdateInfo = [{
date: "20250801",
title: "drpy依赖更新,使用drpy-core-lite.min.js",
version: "3.9.52beta3 20250801",
msg: `
drpy-core.min.js 更换为更小的drpy-core-lite.min.js
`
}, {
date: "20250729",
title: "drpy更新,所有依赖打包成一个js文件",
version: "3.9.52beta2 20250729",
msg: `
1. wasm支持
2. 引入 TextEncoder、TextDecoder对象
3. 引入 WXXH 加解密库
4. 所有依赖打包成一个js
5. 增加 buildQueryString
`
}, {
date: "20250728",
title: "drpy更新,增加tab_order线路模糊排序,优化解密算法支持文件头",
version: "3.9.52beta1 20250728",
msg: `
1. 增加tab_order线路模糊排序
2. 优化解密算法支持文件头
3. wasm支持
4. 增加 removeHeader 函数可用于清除js/py文件的头信息及所有头注释
5. 引入 TextEncoder、TextDecoder对象
6. 引入 WXXH 加解密库
`
}, {
date: "20241126",
title: "drpy更新,优化去广告算法",
version: "3.9.51beta6 20241126",
msg: `
1. 更新龙头大佬提供的去广告算法
`
}, {
date: "20241104",
title: "drpy更新,增加新特性",
version: "3.9.51beta5 20241104",
msg: `
1. rule增加 搜索验证标识 属性,可以不定义,默认为 '系统安全验证|请输入验证码'
2. rule增加 searchNoPage 属性,可以不定义,如果定义 1 将关闭该源的搜索翻页功能,超过1页直接返回空
`
}];
function getUpdateInfo() {
return UpdateInfo.map(_o => {
_o.msg = _o.msg.trim().split("\n").map(_it => _it.trim()).join("\n");
return _o
})
}
function init_test() {
console.log("init_test_start");
console.log("当前版本号:" + VERSION);
console.log("本地代理地址:" + getProxyUrl());
console.log(RKEY);
console.log(JSON.stringify(rule));
console.log("init_test_end")
}
function ocr_demo_test() {
let img_base64 = `iVBORw0KGgoAAAANSUhEUgAAAIAAAAAoBAMAAADEX+97AAAAG1BMVEXz+/4thQTa7N6QwIFFkyNeokKozqDB3b93sWHFR+MEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABN0lEQVRIie2TQU+DQBCFt9vScvQpxR4xrcSjJCZ67JDGXsX+AdR4B3vpsSYm/m2HXaRLmuySepR3Gdidb/btDAjRq5dT96eCMlfBuzi1QLZUoZy2yz5sOvI+9iomaPEZ6nWnEtxqIyiM1RcAy44GNDhBXUjot/VVNweV1ah68FqWRyjKIOqAcyYF6rGcmpYnHzGt3fycNoMw0d3/THFu7hFSJ/8OXO6iTM8/KSg09obAzIHLO250LgQ0txOZSfgrV4Exdw98uGycJ0ErAeExZGhOmFHV9zHO6qVSj0MpLq7xZON56o++MjlsEgfVhbQWWME+xQX7J4V6zfi9A1Ly9rP1BvEXp+BbVJ/M77n+wfOIDVp51pZ4iBxvmj9AGrtvry6emwfKnVkW+ZRKd5ZNMvob36vXP9YPDmQki8QiCFAAAAAASUVORK5CYII=`;
OcrApi.api = OCR_API;
let code = OcrApi.classification(img_base64);
log("测试验证码图片的ocr识别结果为:" + code)
}
function rsa_demo_test() {
let t1 = (new Date).getTime();
let pkcs1_public = `
-----BEGIN RSA PUBLIC KEY-----
MEgCQQCrI0pQ/ERRpJ3Ou190XJedFq846nDYP52rOtXyDxlFK5D3p6JJu2RwsKwy
lsQ9xY0xYPpRZUZKMEeR7e9gmRNLAgMBAAE=
-----END RSA PUBLIC KEY-----
`.trim();
let pkcs1_public_pem = `
MEgCQQCrI0pQ/ERRpJ3Ou190XJedFq846nDYP52rOtXyDxlFK5D3p6JJu2RwsKwy
lsQ9xY0xYPpRZUZKMEeR7e9gmRNLAgMBAAE=
`.trim();
let pkcs8_public = `
-----BEGIN PUBLIC KEY-----
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKsjSlD8RFGknc67X3Rcl50WrzjqcNg/
nas61fIPGUUrkPenokm7ZHCwrDKWxD3FjTFg+lFlRkowR5Ht72CZE0sCAwEAAQ==
-----END PUBLIC KEY-----`.trim();
let pkcs8_public_pem = `
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKsjSlD8RFGknc67X3Rcl50WrzjqcNg/
nas61fIPGUUrkPenokm7ZHCwrDKWxD3FjTFg+lFlRkowR5Ht72CZE0sCAwEAAQ==
`.trim();
let pkcs1_private = `
-----BEGIN RSA PRIVATE KEY-----
MIIBOAIBAAJBAKsjSlD8RFGknc67X3Rcl50WrzjqcNg/nas61fIPGUUrkPenokm7
ZHCwrDKWxD3FjTFg+lFlRkowR5Ht72CZE0sCAwEAAQI/b6OV1z65UokQaMvSeRXt
0Yv6wiYtduQI9qpq5nzy/ytaqsbBfClNTi/HifKPKxlRouWFkc518EQI8LBxoarJ
AiEA4DaONMplV8PQNa3TKn2F+SDEvLOCjdL0kHKdN90Ti28CIQDDZnTBaHgZwZbA
hS7Bbf5yvwjWMhO6Y7l04/Qm7R+35QIgPuQuqXIoUSD080mp1N5WyRW++atksIF+
5lGv9e6GP/MCICnj8y/rl6Pd7tXDN6zcSeqLrfdNsREKhB3dKOCXgW9JAiAFYtFS
EJNBXVRTK42SNsZ2hJ/9xLwOwnH2epT8Q43s3Q==
-----END RSA PRIVATE KEY-----
`.trim();
let pkcs8_private = `
-----BEGIN PRIVATE KEY-----
MIIBUgIBADANBgkqhkiG9w0BAQEFAASCATwwggE4AgEAAkEAqyNKUPxEUaSdzrtf
dFyXnRavOOpw2D+dqzrV8g8ZRSuQ96eiSbtkcLCsMpbEPcWNMWD6UWVGSjBHke3v
YJkTSwIDAQABAj9vo5XXPrlSiRBoy9J5Fe3Ri/rCJi125Aj2qmrmfPL/K1qqxsF8
KU1OL8eJ8o8rGVGi5YWRznXwRAjwsHGhqskCIQDgNo40ymVXw9A1rdMqfYX5IMS8
s4KN0vSQcp033ROLbwIhAMNmdMFoeBnBlsCFLsFt/nK/CNYyE7pjuXTj9CbtH7fl
AiA+5C6pcihRIPTzSanU3lbJFb75q2SwgX7mUa/17oY/8wIgKePzL+uXo93u1cM3
rNxJ6out902xEQqEHd0o4JeBb0kCIAVi0VIQk0FdVFMrjZI2xnaEn/3EvA7CcfZ6
lPxDjezd
-----END PRIVATE KEY-----
`.trim();
let data = `
NodeRsa
这是node-rsa 现在修改集成在drpy里使用`.trim();
let encryptedWithPublic = NODERSA.encryptRSAWithPublicKey(data, pkcs1_public, {
outputEncoding: "base64",
options: {
environment: "browser",
encryptionScheme: "pkcs1_oaep"
}
});
console.log("公钥加密");
console.log(encryptedWithPublic);
let decryptedWithPrivate = NODERSA.decryptRSAWithPrivateKey(encryptedWithPublic, pkcs1_private, {
options: {
environment: "browser",
encryptionScheme: "pkcs1_oaep"
}
});
console.log("私钥解密");
console.log(decryptedWithPrivate);
let pkcs1_sha256_sign = NODERSA.sign("1", pkcs1_private, {
outputEncoding: "base64",
options: {
environment: "browser",
encryptionScheme: "pkcs1",
signingScheme: "pkcs1-sha256"
}
});
console.log("pkcs1_sha256_sign");
console.log(pkcs1_sha256_sign);
let pkcs1_sha256_sign_verify = NODERSA.verify("1", "Oulx2QrgeipKYBtqEDqFb2s/+ndk2cGQxO4CkhU7iBM1vyNmmvqubpsmeoUuN3waGrYZLknSEdwBkfv0tUMpFQ==", pkcs1_private, {
options: {
environment: "browser",
encryptionScheme: "pkcs1",
signingScheme: "pkcs1-sha256"
}
});
console.log("pkcs1_sha256_sign_verify");
console.log(pkcs1_sha256_sign_verify);
let pkcs1_oaep_sha256 = NODERSA.encryptRSAWithPublicKey(data, `-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA5KOq1gRNyllLNWKQy8sGpZE3Q1ULLSmzZw+eaAhj9lvqn7IsT1du
SYn08FfoOA2qMwtz+1O2l1mgzNoSVCyVpVabnTG+C9XKeZXAnJHd8aYA7l7Sxhdm
kte+iymYZ0ZBPzijo8938iugtVvqi9UgDmnY3u/NlQDqiL5BGqSxSTd/Sgmy3zD8
PYzEa3wD9vehQ5fZZ45vKIq8GNVh2Z8+IGO85FF1OsN7+b2yGJa/FmDDNn0+HP+m
PfI+kYBqEVpo0Ztbc3UdxgFwGC8O1n8AQyriwHnSOtIiuBH62J/7qyC/3LEAApRb
Dd9YszqzmODjQUddZKHmvc638VW+azc0EwIDAQAB
-----END RSA PUBLIC KEY-----
`, {
outputEncoding: "base64",
options: {
environment: "browser",
encryptionScheme: {
scheme: "pkcs1_oaep",
hash: "sha256"
}
}
});
console.log("pkcs1_oaep_sha256");
console.log(pkcs1_oaep_sha256);
decryptedWithPrivate = NODERSA.decryptRSAWithPrivateKey("kSZesAAyYh2hdsQnYMdGqb6gKAzTauBKouvBzWcc4+F8RvGd0nwO6mVkUMVilPgUuNxjEauHayHiY8gI3Py45UI3+km0rSGyHrS6dHiHgCkMejXHieglYzAB0IxX3Jkm4z/66bdB/D+GFy0oct5fGCMI1UHPjEAYOsazJDa8lBFNbjiWFeb/qiZtIx3vGM7KYPAZzyRf/zPbbQ8zy9xOmRuOl5nnIxgo0Okp3KO/RIPO4GZOSBA8f2lx1UtNwwrXAMpcNavtoqHVcjJ/9lcotXYQFrn5b299pSIRf2gVm8ZJ31SK6Z8cc14nKtvgnmsgClDzIXJ1o1RcDK+knVAySg==", `-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA5KOq1gRNyllLNWKQy8sGpZE3Q1ULLSmzZw+eaAhj9lvqn7Is
T1duSYn08FfoOA2qMwtz+1O2l1mgzNoSVCyVpVabnTG+C9XKeZXAnJHd8aYA7l7S
xhdmkte+iymYZ0ZBPzijo8938iugtVvqi9UgDmnY3u/NlQDqiL5BGqSxSTd/Sgmy
3zD8PYzEa3wD9vehQ5fZZ45vKIq8GNVh2Z8+IGO85FF1OsN7+b2yGJa/FmDDNn0+
HP+mPfI+kYBqEVpo0Ztbc3UdxgFwGC8O1n8AQyriwHnSOtIiuBH62J/7qyC/3LEA
ApRbDd9YszqzmODjQUddZKHmvc638VW+azc0EwIDAQABAoIBADZ/QGgUzInvsLp/
zO2WbfYm39o/uhNAvk9RbLt1TIZbMFhyOpeKynHi3Swwd9xsfWX/U9zS/lGi/m31
iKrhmaW4OA1G3vqpMcK7TBbFufYwUEaA+ZJX344euH8pIfdzyneMQ4z3Far2dS7l
QsmjuilVV2kEFadveXewiYoVOWCu00w6bN8wy2SIHlQn+kIL6HQhWz12iKKflIKu
eGRdzLHsKmBt6WbY1Wuhx7HU0fAKdlBDPxCHNlI+kybUYE9o5C2vJiaVM5wqJBgZ
8Dz8kt1QbLJ910JoLXkLVQ8uC8NJKQwFtqQjTGPnEq0+wbgz6Ij599rKZkwW/xq9
l6KoUiECgYEA6Ah42tVdkNW047f03xVYXFH96RgorHRS36mR8Y+ONUq1fwKidovC
WjwVujt4OPf3l1W6iyn/F6cu/bsmvPrSc3HTN0B1V31QK4OjgetxQ2PSbTldH02J
NPzkt+v+cPxXpx/P5mgt7Weefw5txU547KubGrHUV5rBKFtIx9pj16MCgYEA/EF0
o19+D24DZAPwlDS5VbEd7FStnwY4oQ5PqbuNOSbSJLMWU0AqzXcRokp8UTyCZ0X3
ATkS1REq97kShCuR+npTR6a6DlY7sdpPI1SMLNajgB2tkx0EOzX+PfNIbHUd4jpJ
I0ZMAHv/OOtkzQHDaeTWBTrzsWm6/nTiykfduNECgYEA46AMD4HpPECqKAs66e5i
tI6q7JSKskObWVdcmQEfnSAhVOwcvPb2Ptda6UuV8S0xcwDi88rLOUUFUFzc79+P
vTkY38cYVi/VChsluDpk7ptqv0PbGu5Rf+3n4pZdEjI7OvR2W64wAAn67uIUxc7p
yiO/ET0K9rYWb6S9jXGtKMkCgYEA2kPAqoO7zZoBMQ7/oR0lp/HC1HRIbiqx4RlC
8Lgpb+QZPEwA6zPAVVvLVENi4d+bbcRp/xLlKpraNNJcJSSWAMbLPFoU7sbKjA87
HnTPfRSTEA2d3Ibk3F7Rh8TzS3Ti0JZiJjVzGZAwu41iAMifzwaD8K6boUy80eNN
QH2CaaECgYBUsLYvC/MiYg3w+LGOONuQongoVUXjGqnw2bjVa9RK7lwRdXPUqJ51
MpVO98IkoLvGSI/0sGNP3GKNhC+eMGjJAVwFyEuOn+JsmMv9Y9uStIVi5tIHIhKw
m7mp8il0kaftHdSxTbspG3tZ2fjIiFIZkLEOmRpd7ogWumgOajzUdA==
-----END RSA PRIVATE KEY-----`, {
options: {
environment: "browser",
encryptionScheme: "pkcs1_oaep"
}
});
console.log("decryptedWithPrivate");
console.log(decryptedWithPrivate);
(() => {
let key = new NODERSA.NodeRSA({
b: 1024
});
key.setOptions({
encryptionScheme: "pkcs1"
});
let text = `你好drpy node-ras`;
let encrypted = key.encrypt(text, "base64");
console.log("encrypted: ", encrypted);
const decrypted = key.decrypt(encrypted, "utf8");
console.log("decrypted: ", decrypted)
})();
let t2 = (new Date).getTime();
console.log("rsa_demo_test 测试耗时:" + (t2 - t1) + "毫秒")
}
function pre() {
if (typeof rule.预处理 === "string" && rule.预处理 && rule.预处理.trim()) {
let code = rule.预处理.trim();
console.log("执行预处理代码:" + code);
if (code.startsWith("js:")) {
code = code.replace("js:", "")
}
try {
eval(code)
} catch (e) {
console.log(`预处理执行失败:${e.message}`)
}
}
}
let rule = {};
const MOBILE_UA = "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36";
const PC_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36";
const UA = "Mozilla/5.0";
const UC_UA = "Mozilla/5.0 (Linux; U; Android 9; zh-CN; MI 9 Build/PKQ1.181121.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.5.5.1035 Mobile Safari/537.36";
const IOS_UA = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1";
const RULE_CK = "cookie";
const CATE_EXCLUDE = "首页|留言|APP|下载|资讯|新闻|动态";
const TAB_EXCLUDE = "猜你|喜欢|下载|剧情|榜|评论";
const OCR_RETRY = 3;
const OCR_API = "https://api.nn.ci/ocr/b64/text";
if (typeof MY_URL === "undefined") {
var MY_URL
}
var HOST;
var RKEY;
var fetch;
var print;
var log;
var rule_fetch_params;
var fetch_params;
var oheaders;
var _pdfh;
var _pdfa;
var _pd;
const DOM_CHECK_ATTR = /(url|src|href|-original|-src|-play|-url|style)$/;
const SPECIAL_URL = /^(ftp|magnet|thunder|ws):/;
const NOADD_INDEX = /:eq|:lt|:gt|:first|:last|^body$|^#/;
const URLJOIN_ATTR = /(url|src|href|-original|-src|-play|-url|style)$|^(data-|url-|src-)/;
const SELECT_REGEX = /:eq|:lt|:gt|#/g;
const SELECT_REGEX_A = /:eq|:lt|:gt/g;
const $js = {
toString(func) {
let strfun = func.toString();
return strfun.replace(/^\(\)(\s+)?=>(\s+)?\{/, "js:").replace(/\}$/, "")
}
};
function window_b64() {
let b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
let base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
function btoa(str) {
var out, i, len;
var c1, c2, c3;
len = str.length;
i = 0;
out = "";
while (i < len) {
c1 = str.charCodeAt(i++) & 255;
if (i == len) {
out += b64map.charAt(c1 >> 2);
out += b64map.charAt((c1 & 3) << 4);
out += "==";
break
}
c2 = str.charCodeAt(i++);
if (i == len) {
out += b64map.charAt(c1 >> 2);
out += b64map.charAt((c1 & 3) << 4 | (c2 & 240) >> 4);
out += b64map.charAt((c2 & 15) << 2);
out += "=";
break
}
c3 = str.charCodeAt(i++);
out += b64map.charAt(c1 >> 2);
out += b64map.charAt((c1 & 3) << 4 | (c2 & 240) >> 4);
out += b64map.charAt((c2 & 15) << 2 | (c3 & 192) >> 6);
out += b64map.charAt(c3 & 63)
}
return out
}
function atob(str) {
var c1, c2, c3, c4;
var i, len, out;
len = str.length;
i = 0;
out = "";
while (i < len) {
do {
c1 = base64DecodeChars[str.charCodeAt(i++) & 255]
} while (i < len && c1 == -1);
if (c1 == -1) break;
do {
c2 = base64DecodeChars[str.charCodeAt(i++) & 255]
} while (i < len && c2 == -1);
if (c2 == -1) break;
out += String.fromCharCode(c1 << 2 | (c2 & 48) >> 4);
do {
c3 = str.charCodeAt(i++) & 255;
if (c3 == 61) return out;
c3 = base64DecodeChars[c3]
} while (i < len && c3 == -1);
if (c3 == -1) break;
out += String.fromCharCode((c2 & 15) << 4 | (c3 & 60) >> 2);
do {
c4 = str.charCodeAt(i++) & 255;
if (c4 == 61) return out;
c4 = base64DecodeChars[c4]
} while (i < len && c4 == -1);
if (c4 == -1) break;
out += String.fromCharCode((c3 & 3) << 6 | c4)
}
return out
}
return {
atob: atob,
btoa: btoa
}
}
if (typeof atob !== "function" || typeof btoa !== "function") {
var {
atob,
btoa
} = window_b64()
}
if (typeof Object.assign !== "function") {
Object.assign = function() {
let target = arguments[0];
for (let i = 1; i < arguments.length; i++) {
let source = arguments[i];
for (let key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key]
}
}
}
return target
}
}
if (!String.prototype.includes) {
String.prototype.includes = function(search, start) {
if (typeof start !== "number") {
start = 0
}
if (start + search.length > this.length) {
return false
} else {
return this.indexOf(search, start) !== -1
}
}
}
if (!Array.prototype.includes) {
Object.defineProperty(Array.prototype, "includes", {
value: function(searchElement, fromIndex) {
if (this == null) {
throw new TypeError('"this" is null or not defined')
}
var o = Object(this);
var len = o.length >>> 0;
if (len === 0) {
return false
}
var n = fromIndex | 0;
var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
while (k < len) {
if (o[k] === searchElement) {
return true
}
k++
}
return false
},
enumerable: false
})
}
if (typeof String.prototype.startsWith !== "function") {
String.prototype.startsWith = function(prefix) {
return this.slice(0, prefix.length) === prefix
}
}
if (typeof String.prototype.endsWith !== "function") {
String.prototype.endsWith = function(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1
}
}
Object.defineProperty(Object.prototype, "myValues", {
value: function(obj) {
if (obj == null) {
throw new TypeError("Cannot convert undefined or null to object")
}
var res = [];
for (var k in obj) {
if (obj.hasOwnProperty(k)) {
res.push(obj[k])
}
}
return res
},
enumerable: false
});
if (typeof Object.prototype.values !== "function") {
Object.defineProperty(Object.prototype, "values", {
value: function(obj) {
if (obj == null) {
throw new TypeError("Cannot convert undefined or null to object")
}
var res = [];
for (var k in obj) {
if (obj.hasOwnProperty(k)) {
res.push(obj[k])
}
}
return res
},
enumerable: false
})
}
if (typeof Array.prototype.join !== "function") {
Object.defineProperty(Array.prototype, "join", {
value: function(emoji) {
emoji = emoji || "";
let self = this;
let str = "";
let i = 0;
if (!Array.isArray(self)) {
throw String(self) + "is not Array"
}
if (self.length === 0) {
return ""
}
if (self.length === 1) {
return String(self[0])
}
i = 1;
str = this[0];
for (; i < self.length; i++) {
str += String(emoji) + String(self[i])
}
return str
},
enumerable: false
})
}
if (typeof Array.prototype.toReversed !== "function") {
Object.defineProperty(Array.prototype, "toReversed", {
value: function() {
const clonedList = this.slice();
const reversedList = clonedList.reverse();
return reversedList
},
enumerable: false
})
}
Object.defineProperty(Array.prototype, "append", {
value: Array.prototype.push,
enumerable: false
});
Object.defineProperty(String.prototype, "strip", {
value: String.prototype.trim,
enumerable: false
});
Object.defineProperty(String.prototype, "rstrip", {
value: function(chars) {
let regex = new RegExp(chars + "$");
return this.replace(regex, "")
},
enumerable: false
});
function 是否正版(vipUrl) {
let flag = new RegExp("qq.com|iqiyi.com|youku.com|mgtv.com|bilibili.com|sohu.com|ixigua.com|pptv.com|miguvideo.com|le.com|1905.com|fun.tv");
return flag.test(vipUrl)
}
function urlDeal(vipUrl) {
if (!vipUrl) {
return ""
}
if (!是否正版(vipUrl)) {
return vipUrl
}
if (!/miguvideo/.test(vipUrl)) {
vipUrl = vipUrl.split("#")[0].split("?")[0]
}
return vipUrl
}
function setResult(d) {
if (!Array.isArray(d)) {
return []
}
VODS = [];
d.forEach(function(it) {
let obj = {
vod_id: it.url || "",
vod_name: it.title || "",
vod_remarks: it.desc || "",
vod_content: it.content || "",
vod_pic: it.pic_url || it.img || ""
};
let keys = Object.keys(it);
if (keys.includes("tname")) {
obj.type_name = it.tname || ""
}
if (keys.includes("tid")) {
obj.type_id = it.tid || ""
}
if (keys.includes("year")) {
obj.vod_year = it.year || ""
}
if (keys.includes("actor")) {
obj.vod_actor = it.actor || ""
}
if (keys.includes("director")) {
obj.vod_director = it.director || ""
}
if (keys.includes("area")) {
obj.vod_area = it.area || ""
}
VODS.push(obj)
});
return VODS
}
function setResult2(res) {
VODS = res.list || [];
return VODS
}
function setHomeResult(res) {
if (!res || typeof res !== "object") {
return []
}
return setResult(res.list)
}
function rc(js) {
if (js === "maomi_aes.js") {
var a = CryptoJS.enc.Utf8.parse("625222f9149e961d");
var t = CryptoJS.enc.Utf8.parse("5efdtf6060e2o330");
return {
De: function(word) {
word = CryptoJS.enc.Hex.parse(word);
return CryptoJS.AES.decrypt(CryptoJS.enc.Base64.stringify(word), a, {
iv: t,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
}).toString(CryptoJS.enc.Utf8)
},
En: function(word) {
var Encrypted = CryptoJS.AES.encrypt(word, a, {
iv: t,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
});
return Encrypted.ciphertext.toString()
}
}
}
return {}
}
function maoss(jxurl, ref, key) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
eval(getCryptoJS());
try {
var getVideoInfo = function(text) {
return CryptoJS.AES.decrypt(text, key, {
iv: iv,
padding: CryptoJS.pad.Pkcs7
}).toString(CryptoJS.enc.Utf8)
};
var token_key = key == undefined ? "dvyYRQlnPRCMdQSe" : key;
if (ref) {
var html = request(jxurl, {
headers: {
Referer: ref
}
})
} else {
var html = request(jxurl)
}
if (html.indexOf("&btwaf=") != -1) {
html = request(jxurl + "&btwaf" + html.match(/&btwaf(.*?)"/)[1], {
headers: {
Referer: ref
}
})
}
var token_iv = html.split('_token = "')[1].split('"')[0];
var key = CryptoJS.enc.Utf8.parse(token_key);
var iv = CryptoJS.enc.Utf8.parse(token_iv);
eval(html.match(/var config = {[\s\S]*?}/)[0] + "");
if (!config.url.startsWith("http")) {
config.url = CryptoJS.AES.decrypt(config.url, key, {
iv: iv,
padding: CryptoJS.pad.Pkcs7
}).toString(CryptoJS.enc.Utf8)
}
return config.url
} catch (e) {
return ""
}
}
function urlencode(str) {
str = (str + "").toString();
return encodeURIComponent(str).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A").replace(/%20/g, "+")
}
function encodeUrl(str) {
if (typeof encodeURI == "function") {
return encodeURI(str)
} else {
str = (str + "").toString();
return encodeURIComponent(str).replace(/%2F/g, "/").replace(/%3F/g, "?").replace(/%3A/g, ":").replace(/%40/g, "@").replace(/%3D/g, "=").replace(/%3A/g, ":").replace(/%2C/g, ",").replace(/%2B/g, "+").replace(/%24/g, "$")
}
}
function base64Encode(text) {
return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(text))
}
function base64Decode(text) {
return CryptoJS.enc.Utf8.stringify(CryptoJS.enc.Base64.parse(text))
}
function md5(text) {
return CryptoJS.MD5(text).toString()
}
function uint8ArrayToBase64(uint8Array) {
let binaryString = String.fromCharCode.apply(null, Array.from(uint8Array));
return btoa(binaryString)
}
function Utf8ArrayToStr(array) {
var out, i, len, c;
var char2, char3;
out = "";
len = array.length;
i = 0;
while (i < len) {
c = array[i++];
switch (c >> 4) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
out += String.fromCharCode(c);
break;
case 12:
case 13:
char2 = array[i++];
out += String.fromCharCode((c & 31) << 6 | char2 & 63);
break;
case 14:
char2 = array[i++];
char3 = array[i++];
out += String.fromCharCode((c & 15) << 12 | (char2 & 63) << 6 | (char3 & 63) << 0);
break
}
}
return out
}
function gzip(str) {
let arr = pako.gzip(str, {});
return uint8ArrayToBase64(arr)
}
function ungzip(b64Data) {
let strData = atob(b64Data);
const charData = strData.split("").map(function(x) {
return x.charCodeAt(0)
});
const binData = new Uint8Array(charData);
const data = pako.inflate(binData);
return Utf8ArrayToStr(data)
}
function encodeStr(input, encoding) {
encoding = encoding || "gbk";
if (encoding.startsWith("gb")) {
input = gbkTool.encode(input)
}
return input
}
function decodeStr(input, encoding) {
encoding = encoding || "gbk";
if (encoding.startsWith("gb")) {
input = gbkTool.decode(input)
}
return input
}
function getCryptoJS() {
return 'console.log("CryptoJS已装载");'
}
const RSA = {
decode: function(data, key, option) {
option = option || {};
if (typeof JSEncrypt === "function") {
let chunkSize = option.chunkSize || 117;
let privateKey = this.getPrivateKey(key);
const decryptor = new JSEncrypt;
decryptor.setPrivateKey(privateKey);
let uncrypted = "";
uncrypted = decryptor.decryptUnicodeLong(data);
return uncrypted
} else {
return false
}
},
encode: function(data, key, option) {
option = option || {};
if (typeof JSEncrypt === "function") {
let chunkSize = option.chunkSize || 117;
let publicKey = this.getPublicKey(key);
const encryptor = new JSEncrypt;
encryptor.setPublicKey(publicKey);
let encrypted = "";
encrypted = encryptor.encryptUnicodeLong(data);
return encrypted
} else {
return false
}
},
fixKey(key, prefix, endfix) {
if (!key.includes(prefix)) {
key = prefix + key
}
if (!key.includes(endfix)) {
key += endfix
}
return key
},
getPrivateKey(key) {
let prefix = "-----BEGIN RSA PRIVATE KEY-----";
let endfix = "-----END RSA PRIVATE KEY-----";
return this.fixKey(key, prefix, endfix)
},
getPublicKey(key) {
let prefix = "-----BEGIN PUBLIC KEY-----";
let endfix = "-----END PUBLIC KEY-----";
return this.fixKey(key, prefix, endfix)
}
};
function getProxyUrl() {
if (typeof getProxy === "function") {
return getProxy(true)
} else {
return "http://127.0.0.1:9978/proxy?do=js"
}
}
function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) {
if (!m3u8_text && !m3u8_url || !m3u8_text && m3u8_url && !m3u8_url.startsWith("http")) {
return ""
}
if (!m3u8_text) {
log("m3u8_url:" + m3u8_url);
m3u8_text = request(m3u8_url)
}
log("len(m3u8_text):" + m3u8_text.length);
if (!ad_remove) {
return m3u8_text
}
if (ad_remove.startsWith("reg:")) {
ad_remove = ad_remove.slice(4)
} else if (ad_remove.startsWith("js:")) {
ad_remove = ad_remove.slice(3)
}
let m3u8_start = m3u8_text.slice(0, m3u8_text.indexOf("#EXTINF")).trim();
let m3u8_body = m3u8_text.slice(m3u8_text.indexOf("#EXTINF"), m3u8_text.indexOf("#EXT-X-ENDLIST")).trim();
let m3u8_end = m3u8_text.slice(m3u8_text.indexOf("#EXT-X-ENDLIST")).trim();
let murls = [];
let m3_body_list = m3u8_body.split("\n");
let m3_len = m3_body_list.length;
let i = 0;
while (i < m3_len) {
let mi = m3_body_list[i];
let mi_1 = m3_body_list[i + 1];
if (mi.startsWith("#EXTINF")) {
murls.push([mi, mi_1].join("&"));
i += 2
} else if (mi.startsWith("#EXT-X-DISCONTINUITY")) {
let mi_2 = m3_body_list[i + 2];
murls.push([mi, mi_1, mi_2].join("&"));
i += 3
} else {
break
}
}
let new_m3u8_body = [];
for (let murl of murls) {
if (ad_remove && new RegExp(ad_remove).test(murl)) {} else {
let murl_list = murl.split("&");
if (!murl_list[murl_list.length - 1].startsWith("http") && m3u8_url.startsWith("http")) {
murl_list[murl_list.length - 1] = urljoin(m3u8_url, murl_list[murl_list.length - 1])
}
murl_list.forEach(it => {
new_m3u8_body.push(it)
})
}
}
new_m3u8_body = new_m3u8_body.join("\n").trim();
m3u8_text = [m3u8_start, new_m3u8_body, m3u8_end].join("\n").trim();
return m3u8_text
}
function fixAdM3u8Ai(m3u8_url, headers) {
let ts = (new Date).getTime();
let option = headers ? {
headers: headers
} : {};
function b(s1, s2) {
let i = 0;
while (i < s1.length) {
if (s1[i] !== s2[i]) {
break
}
i++
}
return i
}
function reverseString(str) {
return str.split("").reverse().join("")
}
let m3u8 = request(m3u8_url, option);
m3u8 = m3u8.trim().split("\n").map(it => it.startsWith("#") ? it : urljoin(m3u8_url, it)).join("\n");
m3u8 = m3u8.replace(/\n\n/gi, "\n");
let last_url = m3u8.split("\n").slice(-1)[0];
if (last_url.length < 5) {
last_url = m3u8.split("\n").slice(-2)[0]
}
if (last_url.includes(".m3u8") && last_url !== m3u8_url) {
m3u8_url = urljoin2(m3u8_url, last_url);
log("嵌套的m3u8_url:" + m3u8_url);
m3u8 = request(m3u8_url, option)
}
let s = m3u8.trim().split("\n").filter(it => it.trim()).join("\n");
let ss = s.split("\n");
if (m3u8_url.indexOf("ffzy") > 0) {
let j = 0,
k1 = 0,
m = 0,
n = 0,
t = 0;
let s2 = "";
for (let i = 0; i < ss.length; i++) {
let s = ss[i];
let s1 = "";
if (s.startsWith("#EXTINF")) {
s1 = s.slice(8);
n++;
if (n == 1) k1 = i;
if (s2.indexOf(s1) == -1) {
s2 = s2 + s1;
m++
}
t = t + parseFloat(s1);
i++;
s = ss[i]
}
if (s.startsWith("#EXT-X-DISCONTINUITY")) {
if (n == 5) {
log("n:" + n);
log("m:" + m);
for (let j = k1; j < k1 + n * 2; j++) {
log(ss[j])
}
log("广告位置:" + k1);
log("数据条数:" + n);
log("数据种类:" + m);
log("广告时间:" + t.toFixed(5));
ss.splice(k1, 2 * n + 1);
i = i - 2 * n + 1
}
t = 0;
m = 0;
n = 0;
s2 = ""
}
}
}
let firststr = "";
let maxl = 0;
let kk = 0;
let kkk1 = 1;
let kkk2 = 0;
let secondstr = "";
for (let i = 0; i < ss.length; i++) {
let s = ss[i];
if (!s.startsWith("#")) {
if (kk == 0) firststr = s;
if (kk > 0) {
if (maxl > b(firststr, s) + 1) {
if (secondstr.length < 5) secondstr = s;
kkk2++
} else {
maxl = b(firststr, s);
kkk1++
}
}
kk++;
if (kk >= 30) break
}
}
if (kkk2 > kkk1) firststr = secondstr;
let firststrlen = firststr.length;
let ml = Math.round(ss.length / 2).toString().length;
let maxc = 0;
let laststr = ss.toReversed().find(x => {
if (!x.startsWith("#")) {
let k = b(reverseString(firststr), reverseString(x));
maxl = b(firststr, x);
maxc++;
if (firststrlen - maxl <= ml + k || maxc > 10) {
return true
}
}
return false
});
log("最后一条切片:" + laststr);
let ad_urls = [];
for (let i = 0; i < ss.length; i++) {
let s = ss[i];
if (!s.startsWith("#")) {
if (b(firststr, s) < maxl) {
ad_urls.push(s);
ss.splice(i - 1, 2);
i = i - 2
} else {
ss[i] = urljoin(m3u8_url, s)
}
} else {
ss[i] = s.replace(/URI=\"(.*)\"/, 'URI="' + urljoin(m3u8_url, "$1") + '"')
}
}
log("处理的m3u8地址:" + m3u8_url);
log("----广告地址----");
log(ad_urls);
m3u8 = ss.join("\n");
log("处理耗时:" + ((new Date).getTime() - ts).toString());
log(m3u8);
return m3u8
}
function forceOrder(lists, key, option) {
let start = Math.floor(lists.length / 2);
let end = Math.min(lists.length - 1, start + 1);
if (start >= end) {
return lists
}
let first = lists[start];
let second = lists[end];
if (key) {
try {
first = first[key];
second = second[key]
} catch (e) {}
}
if (option && typeof option === "function") {
try {
first = option(first);
second = option(second)
} catch (e) {}
}
first += "";
second += "";
if (first.match(/(\d+)/) && second.match(/(\d+)/)) {
let num1 = Number(first.match(/(\d+)/)[1]);
let num2 = Number(second.match(/(\d+)/)[1]);
if (num1 > num2) {
lists.reverse()
}
}
return lists
}
let VODS = [];
let VOD = {};
let TABS = [];
let LISTS = [];
function getQuery(url) {
try {
if (url.indexOf("?") > -1) {
url = url.slice(url.indexOf("?") + 1)
}
let arr = url.split("#")[0].split("&");
const resObj = {};
arr.forEach(item => {
let arr1 = item.split("=");
let key = arr1[0];
let value = arr1.slice(1).join("=");
resObj[key] = value
});
return resObj
} catch (err) {
log(`getQuery发生错误:${e.message}`);
return {}
}
}
function urljoin(fromPath, nowPath) {
fromPath = fromPath || "";
nowPath = nowPath || "";
return joinUrl(fromPath, nowPath)
}
var urljoin2 = urljoin;
const defaultParser = {
pdfh: pdfh,
pdfa: pdfa,
pd: pd
};
function pdfh2(html, parse) {
let html2 = html;
try {
if (typeof html !== "string") {
html2 = html.rr(html.ele).toString()
}
} catch (e) {
print(`html对象转文本发生了错误:${e.message}`)
}
let result = defaultParser.pdfh(html2, parse);
let option = parse.includes("&&") ? parse.split("&&").slice(-1)[0] : parse.split(" ").slice(-1)[0];
if (/style/.test(option.toLowerCase()) && /url\(/.test(result)) {
try {
result = result.match(/url\((.*?)\)/)[1];
result = result.replace(/^['|"](.*)['|"]$/, "$1")
} catch (e) {}
}
return result
}
function pdfa2(html, parse) {
let html2 = html;
try {
if (typeof html !== "string") {
html2 = html.rr(html.ele).toString()
}
} catch (e) {
print(`html对象转文本发生了错误:${e.message}`)
}
return defaultParser.pdfa(html2, parse)
}
function pd2(html, parse, uri) {
let ret = pdfh2(html, parse);
if (typeof uri === "undefined" || !uri) {
uri = ""
}
if (DOM_CHECK_ATTR.test(parse) && !SPECIAL_URL.test(ret)) {
if (/http/.test(ret)) {
ret = ret.slice(ret.indexOf("http"))
} else {
ret = urljoin(MY_URL, ret)
}
}
return ret
}
const parseTags = {
jsp: {
pdfh: pdfh2,
pdfa: pdfa2,
pd: pd2
},
json: {
pdfh(html, parse) {
if (!parse || !parse.trim()) {
return ""
}
if (typeof html === "string") {
html = JSON.parse(html)
}
parse = parse.trim();
if (!parse.startsWith("$.")) {
parse = "$." + parse
}
parse = parse.split("||");
for (let ps of parse) {
let ret = cheerio.jp(ps, html);
if (Array.isArray(ret)) {
ret = ret[0] || ""
} else {
ret = ret || ""
}
if (ret && typeof ret !== "string") {
ret = ret.toString()
}
if (ret) {
return ret
}
}
return ""
},
pdfa(html, parse) {
if (!parse || !parse.trim()) {
return ""
}
if (typeof html === "string") {
html = JSON.parse(html)
}
parse = parse.trim();
if (!parse.startsWith("$.")) {
parse = "$." + parse
}
let ret = cheerio.jp(parse, html);
if (Array.isArray(ret) && Array.isArray(ret[0]) && ret.length === 1) {
return ret[0] || []
}
return ret || []
},
pd(html, parse) {
let ret = parseTags.json.pdfh(html, parse);
if (ret) {
return urljoin(MY_URL, ret)
}
return ret
}
},
jq: {
pdfh(html, parse) {
if (!html || !parse || !parse.trim()) {
return ""
}
parse = parse.trim();
let result = defaultParser.pdfh(html, parse);
return result
},
pdfa(html, parse) {
if (!html || !parse || !parse.trim()) {
return []
}
parse = parse.trim();
let result = defaultParser.pdfa(html, parse);
print(`pdfa解析${parse}=>${result.length}`);
return result
},
pd(html, parse, base_url) {
if (!html || !parse || !parse.trim()) {
return ""
}
parse = parse.trim();
base_url = base_url || MY_URL;
return defaultParser.pd(html, parse, base_url)
}
},
getParse(p0) {
if (p0.startsWith("jsp:")) {
return this.jsp
} else if (p0.startsWith("json:")) {
return this.json
} else if (p0.startsWith("jq:")) {
return this.jq
} else {
return this.jq
}
}
};
const stringify = JSON.stringify;
const jsp = parseTags.jsp;
const jq = parseTags.jq;
function readFile(filePath) {
filePath = filePath || "./uri.min.js";
var fd = os.open(filePath);
var buffer = new ArrayBuffer(1024);
var len = os.read(fd, buffer, 0, 1024);
console.log(len);
let text = String.fromCharCode.apply(null, new Uint8Array(buffer));
console.log(text);
return text
}
function dealJson(html) {
try {
html = html.trim();
if (!(html.startsWith("{") && html.endsWith("}") || html.startsWith("[") && html.endsWith("]"))) {
html = "{" + html.match(/.*?\{(.*)\}/m)[1] + "}"
}
} catch (e) {}
try {
html = JSON.parse(html)
} catch (e) {}
return html
}
var OcrApi = {
api: OCR_API,
classification: function(img) {
let code = "";
try {
log("通过drpy_ocr验证码接口过验证...");
let html = "";
if (this.api.endsWith("drpy/text")) {
html = request(this.api, {
data: {
img: img
},
headers: {
"User-Agent": PC_UA
},
method: "POST"
}, true)
} else {
html = post(this.api, {
body: img
})
}
code = html || ""
} catch (e) {
log(`OCR识别验证码发生错误:${e.message}`)
}
return code
}
};
function verifyCode(url) {
let cnt = 0;
let host = getHome(url);
let cookie = "";
while (cnt < OCR_RETRY) {
try {
let yzm_url = `${host}/index.php/verify/index.html`;
console.log(`验证码链接:${yzm_url}`);
let hhtml = request(yzm_url, {
withHeaders: true,
toBase64: true
}, true);
let json = JSON.parse(hhtml);
if (!cookie) {
let setCk = Object.keys(json).find(it => it.toLowerCase() === "set-cookie");
cookie = setCk ? json[setCk].split(";")[0] : ""
}
console.log("cookie:" + cookie);
let img = json.body;
let code = OcrApi.classification(img);
console.log(`${cnt+1}次验证码识别结果:${code}`);
let submit_url = `${host}/index.php/ajax/verify_check?type=search&verify=${code}`;
console.log(submit_url);
let html = request(submit_url, {
headers: {
Cookie: cookie
},
method: "POST"
});
html = JSON.parse(html);
if (html.msg === "ok") {
console.log(`${cnt+1}次验证码提交成功`);
return cookie
} else if (html.msg !== "ok" && cnt + 1 >= OCR_RETRY) {
cookie = ""
}
} catch (e) {
console.log(`${cnt+1}次验证码提交失败:${e.message}`);
if (cnt + 1 >= OCR_RETRY) {
cookie = ""
}
}
cnt += 1
}
return cookie
}
function setItem(k, v) {
local.set(RKEY, k, v);
console.log(`规则${RKEY}设置${k} => ${v}`)
}
function getItem(k, v) {
return local.get(RKEY, k) || v
}
function clearItem(k) {
local.delete(RKEY, k)
}
function getHome(url) {
if (!url) {
return ""
}
let tmp = url.split("//");
url = tmp[0] + "//" + tmp[1].split("/")[0];
try {
url = decodeURIComponent(url)
} catch (e) {}
return url
}
function buildUrl(url, obj) {
obj = obj || {};
if (url.indexOf("?") < 0) {
url += "?"
}
let param_list = [];
let keys = Object.keys(obj);
keys.forEach(it => {
param_list.push(it + "=" + obj[it])
});
let prs = param_list.join("&");
if (keys.length > 0 && !url.endsWith("?")) {
url += "&"
}
url += prs;
return url
}
function $require(url) {
eval(request(url))
}
function keysToLowerCase(obj) {
return Object.keys(obj).reduce((result, key) => {
const newKey = key.toLowerCase();
result[newKey] = obj[key];
return result
}, {})
}
function buildQueryString(params) {
const queryArray = [];
for (const key in params) {
if (params.hasOwnProperty(key)) {
let value = params[key];
if (value === undefined || value === null) {
value = ""
} else {
value = value.toString()
}
const encodedKey = encodeURIComponent(key);
const encodedValue = encodeURIComponent(value);
queryArray.push(encodedKey + "=" + encodedValue)
}
}
return queryArray.join("&")
}
function parseQueryString(query) {
const params = {};
query.split("&").forEach(function(part) {
const regex = /^(.*?)=(.*)/;
const match = part.match(regex);
if (match) {
const key = decodeURIComponent(match[1]);
const value = decodeURIComponent(match[2]);
params[key] = value
}
});
return params
}
function encodeIfContainsSpecialChars(value) {
const specialChars = ":/?#[]@!$'()*+,;=%";
if (specialChars.split("").some(char => value.includes(char))) {
return encodeURIComponent(value)
}
return value
}
function objectToQueryString(obj) {
const encoded = [];
for (let key in obj) {
if (obj.hasOwnProperty(key)) {
encoded.push(encodeURIComponent(key) + "=" + encodeIfContainsSpecialChars(obj[key]))
}
}
return encoded.join("&")
}
function request(url, obj, ocr_flag) {
ocr_flag = ocr_flag || false;
if (typeof obj === "undefined" || !obj || obj === {}) {
if (!fetch_params || !fetch_params.headers) {
let headers = {
"User-Agent": MOBILE_UA
};
if (rule.headers) {
Object.assign(headers, rule.headers)
}
if (!fetch_params) {
fetch_params = {}
}
fetch_params.headers = headers
}
if (!fetch_params.headers.Referer) {
fetch_params.headers.Referer = getHome(url)
}
obj = fetch_params
} else {
let headers = obj.headers || {};
let keys = Object.keys(headers).map(it => it.toLowerCase());
if (!keys.includes("user-agent")) {
headers["User-Agent"] = MOBILE_UA;
if (typeof fetch_params === "object" && fetch_params && fetch_params.headers) {
let fetch_headers = keysToLowerCase(fetch_params.headers);
if (fetch_headers["user-agent"]) {
headers["User-Agent"] = fetch_headers["user-agent"]
}
}
}
if (!keys.includes("referer")) {
headers["Referer"] = getHome(url)
}
obj.headers = headers
}
if (rule.encoding && rule.encoding !== "utf-8" && !ocr_flag) {
if (!obj.headers.hasOwnProperty("Content-Type") && !obj.headers.hasOwnProperty("content-type")) {
obj.headers["Content-Type"] = "text/html; charset=" + rule.encoding
}
}
if (typeof obj.body != "undefined" && obj.body && typeof obj.body === "string") {
if (!obj.headers.hasOwnProperty("Content-Type") && !obj.headers.hasOwnProperty("content-type")) {
obj.headers["Content-Type"] = "application/x-www-form-urlencoded; charset=" + rule.encoding
}
} else if (typeof obj.body != "undefined" && obj.body && typeof obj.body === "object") {
obj.data = obj.body;
delete obj.body
}
if (!url) {
return obj.withHeaders ? "{}" : ""
}
if (obj.toBase64) {
obj.buffer = 2;
delete obj.toBase64
}
if (obj.redirect === false) {
obj.redirect = 0
}
if (obj.headers.hasOwnProperty("Content-Type") || obj.headers.hasOwnProperty("content-type")) {
let _contentType = obj.headers["Content-Type"] || obj.headers["content-type"] || "";
if (_contentType.includes("application/x-www-form-urlencoded")) {
log("custom body is application/x-www-form-urlencoded");
if (typeof obj.body == "string") {
let temp_obj = parseQueryString(obj.body);
console.log(JSON.stringify(temp_obj))
}
}
}
console.log(JSON.stringify(obj.headers));
console.log("request:" + url + `|method:${obj.method||"GET"}|body:${obj.body||""}`);
let res = req(url, obj);
let html = res.content || "";
if (obj.withHeaders) {
let htmlWithHeaders = res.headers;
htmlWithHeaders.body = html;
return JSON.stringify(htmlWithHeaders)
} else {
return html
}
}
function post(url, obj) {
obj = obj || {};
obj.method = "POST";
return request(url, obj)
}
function reqCookie(url, obj, all_cookie) {
obj = obj || {};
obj.withHeaders = true;
all_cookie = all_cookie || false;
let html = request(url, obj);
let json = JSON.parse(html);
let setCk = Object.keys(json).find(it => it.toLowerCase() === "set-cookie");
let cookie = setCk ? json[setCk] : "";
if (Array.isArray(cookie)) {
cookie = cookie.join(";")
}
if (!all_cookie) {
cookie = cookie.split(";")[0]
}
html = json.body;
return {
cookie: cookie,
html: html
}
}
fetch = request;
print = function(data) {
data = data || "";
if (typeof data == "object" && Object.keys(data).length > 0) {
try {
data = JSON.stringify(data);
console.log(data)
} catch (e) {
console.log(typeof data + ":" + data.length);
return
}
} else if (typeof data == "object" && Object.keys(data).length < 1) {
console.log("null object")
} else {
console.log(data)
}
};
log = print;
function checkHtml(html, url, obj) {
if (/\?btwaf=/.test(html)) {
let btwaf = html.match(/btwaf(.*?)"/)[1];
url = url.split("#")[0] + "?btwaf" + btwaf;
print("宝塔验证访问链接:" + url);
html = request(url, obj)
}
return html
}
function getCode(url, obj) {
let html = request(url, obj);
html = checkHtml(html, url, obj);
return html
}
function getHtml(url) {
let obj = {};
if (rule.headers) {
obj.headers = rule.headers
}
let cookie = getItem(RULE_CK, "");
if (cookie) {
if (obj.headers && !Object.keys(obj.headers).map(it => it.toLowerCase()).includes("cookie")) {
log("历史无cookie,新增过验证后的cookie");
obj.headers["Cookie"] = cookie
} else if (obj.headers && obj.headers.cookie && obj.headers.cookie !== cookie) {
obj.headers["Cookie"] = cookie;
log("历史有小写过期的cookie,更新过验证后的cookie")
} else if (obj.headers && obj.headers.Cookie && obj.headers.Cookie !== cookie) {
obj.headers["Cookie"] = cookie;
log("历史有大写过期的cookie,更新过验证后的cookie")
} else if (!obj.headers) {
obj.headers = {
Cookie: cookie
};
log("历史无headers,更新过验证后的含cookie的headers")
}
}
let html = getCode(url, obj);
return html
}
function homeParse(homeObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let classes = [];
if (homeObj.class_name && homeObj.class_url) {
let names = homeObj.class_name.split("&");
let urls = homeObj.class_url.split("&");
let cnt = Math.min(names.length, urls.length);
for (let i = 0; i < cnt; i++) {
classes.push({
type_id: urls[i],
type_name: names[i]
})
}
}
if (homeObj.class_parse) {
if (homeObj.class_parse.startsWith("js:")) {
var input = homeObj.MY_URL;
try {
eval(homeObj.class_parse.replace("js:", ""));
if (Array.isArray(input)) {
classes = input
}
} catch (e) {
log(`通过js动态获取分类发生了错误:${e.message}`)
}
} else {
let p = homeObj.class_parse.split(";");
let p0 = p[0];
let _ps = parseTags.getParse(p0);
let is_json = p0.startsWith("json:");
_pdfa = _ps.pdfa;
_pdfh = _ps.pdfh;
_pd = _ps.pd;
MY_URL = rule.url;
if (is_json) {
try {
let cms_cate_url = homeObj.MY_URL.replace("ac=detail", "ac=list");
let html = homeObj.home_html || getHtml(cms_cate_url);
if (html) {
if (cms_cate_url === homeObj.MY_URL) {
homeHtmlCache = html
}
let list = _pdfa(html, p0.replace("json:", ""));
if (list && list.length > 0) {
classes = list
}
}
} catch (e) {
console.log(e.message)
}
} else if (p.length >= 3 && !is_json) {
try {
let html = homeObj.home_html || getHtml(homeObj.MY_URL);
if (html) {
homeHtmlCache = html;
let list = _pdfa(html, p0);
if (list && list.length > 0) {
list.forEach((it, idex) => {
try {
let name = _pdfh(it, p[1]);
if (homeObj.cate_exclude && new RegExp(homeObj.cate_exclude).test(name)) {
return
}
let url = _pd(it, p[2]);
if (p.length > 3 && p[3] && !homeObj.home_html) {
let exp = new RegExp(p[3]);
url = url.match(exp)[1]
}
classes.push({
type_id: url.trim(),
type_name: name.trim()
})
} catch (e) {
console.log(`分类列表定位第${idex}个元素正常报错:${e.message}`)
}
})
}
}
} catch (e) {
console.log(e.message)
}
}
}
}
classes = classes.filter(it => !homeObj.cate_exclude || !new RegExp(homeObj.cate_exclude).test(it.type_name));
let resp = {
class: classes
};
if (homeObj.filter) {
resp.filters = homeObj.filter
}
console.log(JSON.stringify(resp));
return JSON.stringify(resp)
}
function getPP(p, pn, pp, ppn) {
try {
let ps = p[pn] === "*" && pp.length > ppn ? pp[ppn] : p[pn];
return ps
} catch (e) {
return ""
}
}
function homeVodParse(homeVodObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let d = [];
MY_URL = homeVodObj.homeUrl;
console.log(MY_URL);
let t1 = (new Date).getTime();
let p = homeVodObj.推荐;
print("p:" + p);
if (p === "*" && rule.一级) {
p = rule.一级;
homeVodObj.double = false
}
if (!p || typeof p !== "string") {
return "{}"
}
p = p.trim();
let pp = rule.一级 ? rule.一级.split(";") : [];
if (p.startsWith("js:")) {
const TYPE = "home";
var input = MY_URL;
HOST = rule.host;
eval(p.replace("js:", ""));
d = VODS
} else {
p = p.split(";");
if (!homeVodObj.double && p.length < 5) {
return "{}"
} else if (homeVodObj.double && p.length < 6) {
return "{}"
}
let p0 = getPP(p, 0, pp, 0);
let _ps = parseTags.getParse(p0);
_pdfa = _ps.pdfa;
_pdfh = _ps.pdfh;
_pd = _ps.pd;
let is_json = p0.startsWith("json:");
p0 = p0.replace(/^(jsp:|json:|jq:)/, "");
let html = homeHtmlCache || getHtml(MY_URL);
homeHtmlCache = undefined;
if (is_json) {
html = dealJson(html)
}
try {
console.log("double:" + homeVodObj.double);
if (homeVodObj.double) {
let items = _pdfa(html, p0);
let p1 = getPP(p, 1, pp, 0);
let p2 = getPP(p, 2, pp, 1);
let p3 = getPP(p, 3, pp, 2);
let p4 = getPP(p, 4, pp, 3);
let p5 = getPP(p, 5, pp, 4);
let p6 = getPP(p, 6, pp, 5);
for (let item of items) {
let items2 = _pdfa(item, p1);
for (let item2 of items2) {
try {
let title = _pdfh(item2, p2);
let img = "";
try {
img = _pd(item2, p3)
} catch (e) {}
let desc = "";
try {
desc = _pdfh(item2, p4)
} catch (e) {}
let links = [];
for (let _p5 of p5.split("+")) {
let link = !homeVodObj.detailUrl ? _pd(item2, _p5, MY_URL) : _pdfh(item2, _p5);
links.push(link)
}
let content;
if (p.length > 6 && p[6]) {
content = _pdfh(item2, p6)
} else {
content = ""
}
let vid = links.join("$");
if (rule.二级 === "*") {
vid = vid + "@@" + title + "@@" + img
}
let vod = {
vod_name: title,
vod_pic: img,
vod_remarks: desc,
vod_content: content,
vod_id: vid
};
d.push(vod)
} catch (e) {
console.log(`首页列表双层定位处理发生错误:${e.message}`)
}
}
}
} else {
let items = _pdfa(html, p0);
let p1 = getPP(p, 1, pp, 1);
let p2 = getPP(p, 2, pp, 2);
let p3 = getPP(p, 3, pp, 3);
let p4 = getPP(p, 4, pp, 4);
let p5 = getPP(p, 5, pp, 5);
for (let item of items) {
try {
let title = _pdfh(item, p1);
let img = "";
try {
img = _pd(item, p2, MY_URL)
} catch (e) {}
let desc = "";
try {
desc = _pdfh(item, p3)
} catch (e) {}
let links = [];
for (let _p5 of p4.split("+")) {
let link = !homeVodObj.detailUrl ? _pd(item, _p5, MY_URL) : _pdfh(item, _p5);
links.push(link)
}
let content;
if (p.length > 5 && p[5]) {
content = _pdfh(item, p5)
} else {
content = ""
}
let vid = links.join("$");
if (rule.二级 === "*") {
vid = vid + "@@" + title + "@@" + img
}
let vod = {
vod_name: title,
vod_pic: img,
vod_remarks: desc,
vod_content: content,
vod_id: vid
};
d.push(vod)
} catch (e) {
console.log(`首页列表单层定位处理发生错误:${e.message}`)
}
}
}
} catch (e) {}
}
let t2 = (new Date).getTime();
console.log("加载首页推荐耗时:" + (t2 - t1) + "毫秒");
if (rule.图片替换) {
if (rule.图片替换.startsWith("js:")) {
d.forEach(it => {
try {
var input = it.vod_pic;
eval(rule.图片替换.trim().replace("js:", ""));
it.vod_pic = input
} catch (e) {
log(`图片:${it.vod_pic}替换错误:${e.message}`)
}
})
} else if (rule.图片替换.includes("=>")) {
let replace_from = rule.图片替换.split("=>")[0];
let replace_to = rule.图片替换.split("=>")[1];
d.forEach(it => {
if (it.vod_pic && it.vod_pic.startsWith("http")) {
it.vod_pic = it.vod_pic.replace(replace_from, replace_to)
}
})
}
}
if (rule.图片来源) {
d.forEach(it => {
if (it.vod_pic && it.vod_pic.startsWith("http")) {
it.vod_pic = it.vod_pic + rule.图片来源
}
})
}
if (d.length > 0) {
print(d.slice(0, 2))
}
return JSON.stringify({
list: d
})
}
function categoryParse(cateObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let p = cateObj.一级;
if (!p || typeof p !== "string") {
return "{}"
}
let d = [];
let url = cateObj.url.replaceAll("fyclass", cateObj.tid);
if (cateObj.pg === 1 && url.includes("[") && url.includes("]")) {
url = url.split("[")[1].split("]")[0]
} else if (cateObj.pg > 1 && url.includes("[") && url.includes("]")) {
url = url.split("[")[0]
}
if (rule.filter_url) {
if (!/fyfilter/.test(url)) {
if (!url.endsWith("&") && !rule.filter_url.startsWith("&")) {
url += "&"
}
url += rule.filter_url
} else {
url = url.replace("fyfilter", rule.filter_url)
}
url = url.replaceAll("fyclass", cateObj.tid);
let fl = cateObj.filter ? cateObj.extend : {};
if (rule.filter_def && typeof rule.filter_def === "object") {
try {
if (Object.keys(rule.filter_def).length > 0 && rule.filter_def.hasOwnProperty(cateObj.tid)) {
let self_fl_def = rule.filter_def[cateObj.tid];
if (self_fl_def && typeof self_fl_def === "object") {
let fl_def = JSON.parse(JSON.stringify(self_fl_def));
fl = Object.assign(fl_def, fl)
}
}
} catch (e) {
print(`合并不同分类对应的默认筛选出错:${e.message}`)
}
}
let new_url;
new_url = cheerio.jinja2(url, {
fl: fl,
fyclass: cateObj.tid
});
url = new_url
}
if (/fypage/.test(url)) {
if (url.includes("(") && url.includes(")")) {
let url_rep = url.match(/.*?\((.*)\)/)[1];
let cnt_page = url_rep.replaceAll("fypage", cateObj.pg);
let cnt_pg = eval(cnt_page);
url = url.replaceAll(url_rep, cnt_pg).replaceAll("(", "").replaceAll(")", "")
} else {
url = url.replaceAll("fypage", cateObj.pg)
}
}
MY_URL = url;
console.log(MY_URL);
p = p.trim();
const MY_CATE = cateObj.tid;
if (p.startsWith("js:")) {
var MY_FL = cateObj.extend;
const TYPE = "cate";
var input = MY_URL;
const MY_PAGE = cateObj.pg;
var desc = "";
eval(p.trim().replace("js:", ""));
d = VODS
} else {
p = p.split(";");
if (p.length < 5) {
return "{}"
}
let _ps = parseTags.getParse(p[0]);
_pdfa = _ps.pdfa;
_pdfh = _ps.pdfh;
_pd = _ps.pd;
let is_json = p[0].startsWith("json:");
p[0] = p[0].replace(/^(jsp:|json:|jq:)/, "");
try {
let html = getHtml(MY_URL);
if (html) {
if (is_json) {
html = dealJson(html)
}
let list = _pdfa(html, p[0]);
list.forEach(it => {
let links = p[4].split("+").map(p4 => {
return !rule.detailUrl ? _pd(it, p4, MY_URL) : _pdfh(it, p4)
});
let link = links.join("$");
let vod_id = rule.detailUrl ? MY_CATE + "$" + link : link;
let vod_name = _pdfh(it, p[1]).replace(/\n|\t/g, "").trim();
let vod_pic = _pd(it, p[2], MY_URL);
if (rule.二级 === "*") {
vod_id = vod_id + "@@" + vod_name + "@@" + vod_pic
}
d.push({
vod_id: vod_id,
vod_name: vod_name,
vod_pic: vod_pic,
vod_remarks: _pdfh(it, p[3]).replace(/\n|\t/g, "").trim()
})
})
}
} catch (e) {
console.log(e.message)
}
}
if (rule.图片替换) {
if (rule.图片替换.startsWith("js:")) {
d.forEach(it => {
try {
var input = it.vod_pic;
eval(rule.图片替换.trim().replace("js:", ""));
it.vod_pic = input
} catch (e) {
log(`图片:${it.vod_pic}替换错误:${e.message}`)
}
})
} else if (rule.图片替换.includes("=>")) {
let replace_from = rule.图片替换.split("=>")[0];
let replace_to = rule.图片替换.split("=>")[1];
d.forEach(it => {
if (it.vod_pic && it.vod_pic.startsWith("http")) {
it.vod_pic = it.vod_pic.replace(replace_from, replace_to)
}
})
}
}
if (rule.图片来源) {
d.forEach(it => {
if (it.vod_pic && it.vod_pic.startsWith("http")) {
it.vod_pic = it.vod_pic + rule.图片来源
}
})
}
if (d.length > 0) {
print(d.slice(0, 2))
}
let pagecount = 0;
if (rule.pagecount && typeof rule.pagecount === "object" && rule.pagecount.hasOwnProperty(MY_CATE)) {
print(`MY_CATE:${MY_CATE},pagecount:${JSON.stringify(rule.pagecount)}`);
pagecount = parseInt(rule.pagecount[MY_CATE])
}
let nodata = {
list: [{
vod_name: "无数据,防无限请求",
vod_id: "no_data",
vod_remarks: "不要点,会崩的",
vod_pic: "https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg"
}],
total: 1,
pagecount: 1,
page: 1,
limit: 1
};
let vod = d.length < 1 ? JSON.stringify(nodata) : JSON.stringify({
page: parseInt(cateObj.pg),
pagecount: pagecount || 999,
limit: 20,
total: 999,
list: d
});
return vod
}
function searchParse(searchObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let d = [];
if (!searchObj.searchUrl) {
return "{}"
}
if (rule.searchNoPage && Number(searchObj.pg) > 1) {
return "{}"
}
let p = searchObj.搜索 === "*" && rule.一级 ? rule.一级 : searchObj.搜索;
if (!p || typeof p !== "string") {
return "{}"
}
p = p.trim();
let pp = rule.一级 ? rule.一级.split(";") : [];
let url = searchObj.searchUrl.replaceAll("**", searchObj.wd);
if (searchObj.pg === 1 && url.includes("[") && url.includes("]") && !url.includes("#")) {
url = url.split("[")[1].split("]")[0]
} else if (searchObj.pg > 1 && url.includes("[") && url.includes("]") && !url.includes("#")) {
url = url.split("[")[0]
}
if (/fypage/.test(url)) {
if (url.includes("(") && url.includes(")")) {
let url_rep = url.match(/.*?\((.*)\)/)[1];
let cnt_page = url_rep.replaceAll("fypage", searchObj.pg);
let cnt_pg = eval(cnt_page);
url = url.replaceAll(url_rep, cnt_pg).replaceAll("(", "").replaceAll(")", "")
} else {
url = url.replaceAll("fypage", searchObj.pg)
}
}
MY_URL = url;
console.log(MY_URL);
if (p.startsWith("js:")) {
const TYPE = "search";
const MY_PAGE = searchObj.pg;
const KEY = searchObj.wd;
var input = MY_URL;
var detailUrl = rule.detailUrl || "";
eval(p.trim().replace("js:", ""));
d = VODS
} else {
p = p.split(";");
if (p.length < 5) {
return "{}"
}
let p0 = getPP(p, 0, pp, 0);
let _ps = parseTags.getParse(p0);
_pdfa = _ps.pdfa;
_pdfh = _ps.pdfh;
_pd = _ps.pd;
let is_json = p0.startsWith("json:");
p0 = p0.replace(/^(jsp:|json:|jq:)/, "");
try {
let req_method = MY_URL.split(";").length > 1 ? MY_URL.split(";")[1].toLowerCase() : "get";
let html;
if (req_method === "post") {
let rurls = MY_URL.split(";")[0].split("#");
let rurl = rurls[0];
let params = rurls.length > 1 ? rurls[1] : "";
print(`post=》rurl:${rurl},params:${params}`);
let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let postData = {
body: params
};
Object.assign(_fetch_params, postData);
html = post(rurl, _fetch_params)
} else if (req_method === "postjson") {
let rurls = MY_URL.split(";")[0].split("#");
let rurl = rurls[0];
let params = rurls.length > 1 ? rurls[1] : "";
print(`postjson-》rurl:${rurl},params:${params}`);
try {
params = JSON.parse(params)
} catch (e) {
params = "{}"
}
let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let postData = {
body: params
};
Object.assign(_fetch_params, postData);
html = post(rurl, _fetch_params)
} else {
html = getHtml(MY_URL)
}
if (html) {
let search_tag = rule.搜索验证标识 || "系统安全验证|输入验证码";
if (new RegExp(search_tag).test(html)) {
let cookie = verifyCode(MY_URL);
if (cookie) {
console.log(`本次成功过验证,cookie:${cookie}`);
setItem(RULE_CK, cookie)
} else {
console.log(`本次自动过搜索验证失败,cookie:${cookie}`)
}
html = getHtml(MY_URL)
}
if (!html.includes(searchObj.wd)) {
console.log("搜索结果源码未包含关键字,疑似搜索失败,正为您打印结果源码");
console.log(html)
}
if (is_json) {
html = dealJson(html)
}
let list = _pdfa(html, p0);
let p1 = getPP(p, 1, pp, 1);
let p2 = getPP(p, 2, pp, 2);
let p3 = getPP(p, 3, pp, 3);
let p4 = getPP(p, 4, pp, 4);
let p5 = getPP(p, 5, pp, 5);
list.forEach(it => {
let links = p4.split("+").map(_p4 => {
return !rule.detailUrl ? _pd(it, _p4, MY_URL) : _pdfh(it, _p4)
});
let link = links.join("$");
let content;
if (p.length > 5 && p[5]) {
content = _pdfh(it, p5)
} else {
content = ""
}
let vod_id = link;
let vod_name = _pdfh(it, p1).replace(/\n|\t/g, "").trim();
let vod_pic = _pd(it, p2, MY_URL);
if (rule.二级 === "*") {
vod_id = vod_id + "@@" + vod_name + "@@" + vod_pic
}
let ob = {
vod_id: vod_id,
vod_name: vod_name,
vod_pic: vod_pic,
vod_remarks: _pdfh(it, p3).replace(/\n|\t/g, "").trim(),
vod_content: content.replace(/\n|\t/g, "").trim()
};
d.push(ob)
})
}
} catch (e) {
print(`搜索发生错误:${e.message}`);
return "{}"
}
}
if (rule.图片替换) {
if (rule.图片替换.startsWith("js:")) {
d.forEach(it => {
try {
var input = it.vod_pic;
eval(rule.图片替换.trim().replace("js:", ""));
it.vod_pic = input
} catch (e) {
log(`图片:${it.vod_pic}替换错误:${e.message}`)
}
})
} else if (rule.图片替换.includes("=>")) {
let replace_from = rule.图片替换.split("=>")[0];
let replace_to = rule.图片替换.split("=>")[1];
d.forEach(it => {
if (it.vod_pic && it.vod_pic.startsWith("http")) {
it.vod_pic = it.vod_pic.replace(replace_from, replace_to)
}
})
}
}
if (rule.图片来源) {
d.forEach(it => {
if (it.vod_pic && it.vod_pic.startsWith("http")) {
it.vod_pic = it.vod_pic + rule.图片来源
}
})
}
return JSON.stringify({
page: parseInt(searchObj.pg),
pagecount: 10,
limit: 20,
total: 100,
list: d
})
}
function detailParse(detailObj) {
let t1 = (new Date).getTime();
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let orId = detailObj.orId;
let vod_name = "片名";
let vod_pic = "";
let vod_id = orId;
if (rule.二级 === "*") {
let extra = orId.split("@@");
vod_name = extra.length > 1 ? extra[1] : vod_name;
vod_pic = extra.length > 2 ? extra[2] : vod_pic
}
let vod = {
vod_id: vod_id,
vod_name: vod_name,
vod_pic: vod_pic,
type_name: "类型",
vod_year: "年份",
vod_area: "地区",
vod_remarks: "更新信息",
vod_actor: "主演",
vod_director: "导演",
vod_content: "简介"
};
let p = detailObj.二级;
let url = detailObj.url;
let detailUrl = detailObj.detailUrl;
let fyclass = detailObj.fyclass;
let tab_exclude = detailObj.tab_exclude;
let html = detailObj.html || "";
MY_URL = url;
if (detailObj.二级访问前) {
try {
print(`尝试在二级访问前执行代码:${detailObj.二级访问前}`);
eval(detailObj.二级访问前.trim().replace("js:", ""))
} catch (e) {
print(`二级访问前执行代码出现错误:${e.message}`)
}
}
if (p === "*") {
vod.vod_play_from = "在线播放";
vod.vod_remarks = detailUrl;
vod.vod_actor = "没有二级,只有一级链接直接嗅探播放";
vod.vod_content = MY_URL;
vod.vod_play_url = "嗅探播放$" + MY_URL.split("@@")[0]
} else if (typeof p === "string" && p.trim().startsWith("js:")) {
const TYPE = "detail";
var input = MY_URL;
var play_url = "";
eval(p.trim().replace("js:", ""));
vod = VOD;
console.log(JSON.stringify(vod))
} else if (p && typeof p === "object") {
let tt1 = (new Date).getTime();
if (!html) {
html = getHtml(MY_URL)
}
print(`二级${MY_URL}仅获取源码耗时:${(new Date).getTime()-tt1}毫秒`);
let _ps;
if (p.is_json) {
print("二级是json");
_ps = parseTags.json;
html = dealJson(html)
} else if (p.is_jsp) {
print("二级是jsp");
_ps = parseTags.jsp
} else if (p.is_jq) {
print("二级是jq");
_ps = parseTags.jq
} else {
print("二级默认jq");
_ps = parseTags.jq
}
let tt2 = (new Date).getTime();
print(`二级${MY_URL}获取并装载源码耗时:${tt2-tt1}毫秒`);
_pdfa = _ps.pdfa;
_pdfh = _ps.pdfh;
_pd = _ps.pd;
if (p.title) {
let p1 = p.title.split(";");
vod.vod_name = _pdfh(html, p1[0]).replace(/\n|\t/g, "").trim();
let type_name = p1.length > 1 ? _pdfh(html, p1[1]).replace(/\n|\t/g, "").replace(/ /g, "").trim() : "";
vod.type_name = type_name || vod.type_name
}
if (p.desc) {
try {
let p1 = p.desc.split(";");
vod.vod_remarks = _pdfh(html, p1[0]).replace(/\n|\t/g, "").trim();
vod.vod_year = p1.length > 1 ? _pdfh(html, p1[1]).replace(/\n|\t/g, "").trim() : "";
vod.vod_area = p1.length > 2 ? _pdfh(html, p1[2]).replace(/\n|\t/g, "").trim() : "";
vod.vod_actor = p1.length > 3 ? _pdfh(html, p1[3]).replace(/\n|\t/g, "").trim() : "";
vod.vod_director = p1.length > 4 ? _pdfh(html, p1[4]).replace(/\n|\t/g, "").trim() : ""
} catch (e) {}
}
if (p.content) {
try {
let p1 = p.content.split(";");
vod.vod_content = _pdfh(html, p1[0]).replace(/\n|\t/g, "").trim()
} catch (e) {}
}
if (p.img) {
try {
let p1 = p.img.split(";");
vod.vod_pic = _pd(html, p1[0], MY_URL)
} catch (e) {}
}
let vod_play_from = "$$$";
let playFrom = [];
if (p.重定向 && p.重定向.startsWith("js:")) {
print("开始执行重定向代码:" + p.重定向);
html = eval(p.重定向.replace("js:", ""))
}
if (p.tabs) {
if (p.tabs.startsWith("js:")) {
print("开始执行tabs代码:" + p.tabs);
var input = MY_URL;
eval(p.tabs.replace("js:", ""));
playFrom = TABS
} else {
let p_tab = p.tabs.split(";")[0];
let vHeader = _pdfa(html, p_tab);
console.log(vHeader.length);
let tab_text = p.tab_text || "body&&Text";
let new_map = {};
for (let v of vHeader) {
let v_title = _pdfh(v, tab_text).trim();
if (!v_title) {
v_title = "线路空"
}
console.log(v_title);
if (tab_exclude && new RegExp(tab_exclude).test(v_title)) {
continue
}
if (!new_map.hasOwnProperty(v_title)) {
new_map[v_title] = 1
} else {
new_map[v_title] += 1
}
if (new_map[v_title] > 1) {
v_title += Number(new_map[v_title] - 1)
}
playFrom.push(v_title)
}
}
console.log(JSON.stringify(playFrom))
} else {
playFrom = ["在线播放"]
}
vod.vod_play_from = playFrom.join(vod_play_from);
let vod_play_url = "$$$";
let vod_tab_list = [];
if (p.lists) {
if (p.lists.startsWith("js:")) {
print("开始执行lists代码:" + p.lists);
try {
var input = MY_URL;
var play_url = "";
eval(p.lists.replace("js:", ""));
for (let i in LISTS) {
if (LISTS.hasOwnProperty(i)) {
try {
LISTS[i] = LISTS[i].map(it => it.split("$").slice(0, 2).join("$"))
} catch (e) {
print(`格式化LISTS发生错误:${e.message}`)
}
}
}
vod_play_url = LISTS.map(it => it.join("#")).join(vod_play_url)
} catch (e) {
print(`js执行lists: 发生错误:${e.message}`)
}
} else {
let list_text = p.list_text || "body&&Text";
let list_url = p.list_url || "a&&href";
let list_url_prefix = p.list_url_prefix || "";
let is_tab_js = p.tabs.trim().startsWith("js:");
for (let i = 0; i < playFrom.length; i++) {
let tab_name = playFrom[i];
let tab_ext = p.tabs.split(";").length > 1 && !is_tab_js ? p.tabs.split(";")[1] : "";
let p1 = p.lists.replaceAll("#idv", tab_name).replaceAll("#id", i);
tab_ext = tab_ext.replaceAll("#idv", tab_name).replaceAll("#id", i);
let tabName = tab_ext ? _pdfh(html, tab_ext) : tab_name;
console.log(tabName);
let new_vod_list = [];
let tt1 = (new Date).getTime();
if (typeof pdfl === "function") {
new_vod_list = pdfl(html, p1, list_text, list_url, MY_URL);
if (list_url_prefix) {
new_vod_list = new_vod_list.map(it => it.split("$")[0] + "$" + list_url_prefix + it.split("$").slice(1).join("$"))
}
} else {
let vodList = [];
try {
vodList = _pdfa(html, p1);
console.log("len(vodList):" + vodList.length)
} catch (e) {}
for (let i = 0; i < vodList.length; i++) {
let it = vodList[i];
new_vod_list.push(_pdfh(it, list_text).trim() + "$" + list_url_prefix + _pd(it, list_url, MY_URL))
}
}
if (new_vod_list.length > 0) {
new_vod_list = forceOrder(new_vod_list, "", x => x.split("$")[0]);
console.log(`drpy影响性能代码共计列表数循环次数:${new_vod_list.length},耗时:${(new Date).getTime()-tt1}毫秒`)
}
let vlist = new_vod_list.join("#");
vod_tab_list.push(vlist)
}
vod_play_url = vod_tab_list.join(vod_play_url)
}
}
vod.vod_play_url = vod_play_url
}
if (rule.图片替换 && rule.图片替换.includes("=>")) {
let replace_from = rule.图片替换.split("=>")[0];
let replace_to = rule.图片替换.split("=>")[1];
vod.vod_pic = vod.vod_pic.replace(replace_from, replace_to)
}
if (rule.图片来源 && vod.vod_pic && vod.vod_pic.startsWith("http")) {
vod.vod_pic = vod.vod_pic + rule.图片来源
}
if (!vod.vod_id || vod_id.includes("$") && vod.vod_id !== vod_id) {
vod.vod_id = vod_id
}
let t2 = (new Date).getTime();
console.log(`加载二级界面${MY_URL}耗时:${t2-t1}毫秒`);
try {
vod = vodDeal(vod)
} catch (e) {
console.log(`vodDeal发生错误:${e.message}`)
}
return JSON.stringify({
list: [vod]
})
}
function get_tab_index(vod) {
let obj = {};
vod.vod_play_from.split("$$$").forEach((it, index) => {
obj[it] = index
});
return obj
}
function vodDeal(vod) {
let vod_play_from = vod.vod_play_from.split("$$$");
let vod_play_url = vod.vod_play_url.split("$$$");
let tab_removed_list = vod_play_from;
let tab_ordered_list = vod_play_from;
let tab_renamed_list = vod_play_from;
let tab_list = vod_play_from;
let play_ordered_list = vod_play_url;
if (rule.tab_remove && rule.tab_remove.length > 0 || rule.tab_order && rule.tab_order.length > 0) {
let tab_index_dict = get_tab_index(vod);
if (rule.tab_remove && rule.tab_remove.length > 0) {
tab_removed_list = vod_play_from.filter(it => !rule.tab_remove.includes(it));
tab_list = tab_removed_list
}
if (rule.tab_order && rule.tab_order.length > 0) {
let tab_order = rule.tab_order;
tab_ordered_list = tab_removed_list.sort((a, b) => {
const getOrderIndex = (tabName, orderRules) => {
for (let i = 0; i < orderRules.length; i++) {
if (tabName.includes(orderRules[i])) {
return i
}
}
return 9999
};
const indexA = getOrderIndex(a, tab_order);
const indexB = getOrderIndex(b, tab_order);
return indexA - indexB
});
tab_list = tab_ordered_list
}
play_ordered_list = tab_list.map(it => vod_play_url[tab_index_dict[it]])
}
if (rule.tab_rename && typeof rule.tab_rename === "object" & Object.keys(rule.tab_rename).length > 0) {
tab_renamed_list = tab_list.map(it => rule.tab_rename[it] || it);
tab_list = tab_renamed_list
}
vod.vod_play_from = tab_list.join("$$$");
vod.vod_play_url = play_ordered_list.join("$$$");
return vod
}
function tellIsJx(url) {
try {
let is_vip = !/\.(m3u8|mp4|m4a)$/.test(url.split("?")[0]) && 是否正版(url);
return is_vip ? 1 : 0
} catch (e) {
return 1
}
}
function playParse(playObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
MY_URL = playObj.url;
var MY_FLAG = playObj.flag;
if (!/http/.test(MY_URL)) {
try {
MY_URL = base64Decode(MY_URL)
} catch (e) {}
}
MY_URL = decodeURIComponent(MY_URL);
var input = MY_URL;
var flag = MY_FLAG;
let common_play = {
parse: SPECIAL_URL.test(input) || /^(push:)/.test(input) ? 0 : 1,
url: input,
flag: flag,
jx: tellIsJx(input)
};
let lazy_play;
if (!rule.play_parse || !rule.lazy) {
lazy_play = common_play
} else if (rule.play_parse && rule.lazy && typeof rule.lazy === "string") {
try {
let lazy_code = rule.lazy.trim();
if (lazy_code.startsWith("js:")) {
lazy_code = lazy_code.replace("js:", "").trim()
}
print("开始执行js免嗅=>" + lazy_code);
eval(lazy_code);
lazy_play = typeof input === "object" ? input : {
parse: SPECIAL_URL.test(input) || /^(push:)/.test(input) ? 0 : 1,
jx: tellIsJx(input),
url: input
}
} catch (e) {
print(`js免嗅错误:${e.message}`);
lazy_play = common_play
}
} else {
lazy_play = common_play
}
if (Array.isArray(rule.play_json) && rule.play_json.length > 0) {
let web_url = lazy_play.url;
for (let pjson of rule.play_json) {
if (pjson.re && (pjson.re === "*" || web_url.match(new RegExp(pjson.re)))) {
if (pjson.json && typeof pjson.json === "object") {
let base_json = pjson.json;
lazy_play = Object.assign(lazy_play, base_json);
break
}
}
}
} else if (rule.play_json && !Array.isArray(rule.play_json)) {
let base_json = {
jx: 1,
parse: 1
};
lazy_play = Object.assign(lazy_play, base_json)
} else if (!rule.play_json) {
let base_json = {
jx: 0,
parse: 1
};
lazy_play = Object.assign(lazy_play, base_json)
}
console.log(JSON.stringify(lazy_play));
return JSON.stringify(lazy_play)
}
function proxyParse(proxyObj) {
var input = proxyObj.params;
if (proxyObj.proxy_rule) {
log("准备执行本地代理规则:\n" + proxyObj.proxy_rule);
try {
eval(proxyObj.proxy_rule);
if (input && input !== proxyObj.params && Array.isArray(input) && input.length >= 3) {
return input
} else {
return [404, "text/plain", "Not Found"]
}
} catch (e) {
return [500, "text/plain", "代理规则错误:" + e.message]
}
} else {
return [404, "text/plain", "Not Found"]
}
}
function isVideoParse(isVideoObj) {
var input = isVideoObj.url;
if (!isVideoObj.t) {
let re_matcher = new RegExp(isVideoObj.isVideo, "i");
return re_matcher.test(input)
} else {
try {
eval(isVideoObj.isVideo);
if (typeof input === "boolean") {
return input
} else {
return false
}
} catch (e) {
log(`执行嗅探规则发生错误:${e.message}`);
return false
}
}
}
function removeHeader(content, options = {}) {
const {
mode = "header-only", fileType
} = options;
const COMMENT_CONFIG = {
".js": {
start: "/*",
end: "*/",
regex: /^\s*\/\*([\s\S]*?)\*\/\s*/,
headerRegex: /@header\(([\s\S]*?)\)/,
topCommentsRegex: /^(\s*(\/\/[^\n]*\n|\/\*[\s\S]*?\*\/)\s*)+/
},
".py": {
start: '"""',
end: '"""',
regex: /^\s*"""([\s\S]*?)"""\s*/,
headerRegex: /@header\(([\s\S]*?)\)/,
topCommentsRegex: /^(\s*(#[^\n]*\n|'''[\s\S]*?'''|"""[\s\S]*?""")\s*)+/
}
};
if (!fileType) throw new Error("fileType option is required");
const ext = fileType.startsWith(".") ? fileType : `.${fileType}`;
const config = COMMENT_CONFIG[ext];
if (!config) throw new Error(`Unsupported file type: ${ext}`);
if (mode === "top-comments") {
const match = content.match(config.topCommentsRegex);
if (match) {
return content.substring(match[0].length).trim()
}
return content.trim()
}
const match = content.match(config.regex);
if (!match) return content.trim();
let [fullComment, innerContent] = match;
if (config.headerRegex.test(innerContent)) {
innerContent = innerContent.replace(config.headerRegex, "");
const cleanedInner = innerContent.split("\n").filter(line => line.trim().length > 0).join("\n");
if (!cleanedInner.trim()) {
return content.replace(fullComment, "").trim()
} else {
const newComment = `${config.start}${cleanedInner}${config.end}`;
return content.replace(fullComment, newComment).trim()
}
}
return content.trim()
}
function getOriginalJs(js_code) {
let current_match = /var rule|function|let |var |const|class Rule|async|this\./;
if (current_match.test(js_code)) {
return js_code
}
js_code = removeHeader(js_code, {
mode: "top-comments",
fileType: ".js"
});
let rsa_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqin/jUpqM6+fgYP/oMqj9zcdHMM0mEZXLeTyixIJWP53lzJV2N2E3OP6BBpUmq2O1a9aLnTIbADBaTulTNiOnVGoNG58umBnupnbmmF8iARbDp2mTzdMMeEgLdrfXS6Y3VvazKYALP8EhEQykQVarexR78vRq7ltY3quXx7cgI0ROfZz5Sw3UOLQJ+VoWmwIxu9AMEZLVzFDQN93hzuzs3tNyHK6xspBGB7zGbwCg+TKi0JeqPDrXxYUpAz1cQ/MO+Da0WgvkXnvrry8NQROHejdLVOAslgr6vYthH9bKbsGyNY3H+P12kcxo9RAcVveONnZbcMyxjtF5dWblaernAgMBAAECggEAGdEHlSEPFmAr5PKqKrtoi6tYDHXdyHKHC5tZy4YV+Pp+a6gxxAiUJejx1hRqBcWSPYeKne35BM9dgn5JofgjI5SKzVsuGL6bxl3ayAOu+xXRHWM9f0t8NHoM5fdd0zC3g88dX3fb01geY2QSVtcxSJpEOpNH3twgZe6naT2pgiq1S4okpkpldJPo5GYWGKMCHSLnKGyhwS76gF8bTPLoay9Jxk70uv6BDUMlA4ICENjmsYtd3oirWwLwYMEJbSFMlyJvB7hjOjR/4RpT4FPnlSsIpuRtkCYXD4jdhxGlvpXREw97UF2wwnEUnfgiZJ2FT/MWmvGGoaV/CfboLsLZuQKBgQDTNZdJrs8dbijynHZuuRwvXvwC03GDpEJO6c1tbZ1s9wjRyOZjBbQFRjDgFeWs9/T1aNBLUrgsQL9c9nzgUziXjr1Nmu52I0Mwxi13Km/q3mT+aQfdgNdu6ojsI5apQQHnN/9yMhF6sNHg63YOpH+b+1bGRCtr1XubuLlumKKscwKBgQDOtQ2lQjMtwsqJmyiyRLiUOChtvQ5XI7B2mhKCGi8kZ+WEAbNQcmThPesVzW+puER6D4Ar4hgsh9gCeuTaOzbRfZ+RLn3Aksu2WJEzfs6UrGvm6DU1INn0z/tPYRAwPX7sxoZZGxqML/z+/yQdf2DREoPdClcDa2Lmf1KpHdB+vQKBgBXFCVHz7a8n4pqXG/HvrIMJdEpKRwH9lUQS/zSPPtGzaLpOzchZFyQQBwuh1imM6Te+VPHeldMh3VeUpGxux39/m+160adlnRBS7O7CdgSsZZZ/dusS06HAFNraFDZf1/VgJTk9BeYygX+AZYu+0tReBKSs9BjKSVJUqPBIVUQXAoGBAJcZ7J6oVMcXxHxwqoAeEhtvLcaCU9BJK36XQ/5M67ceJ72mjJC6/plUbNukMAMNyyi62gO6I9exearecRpB/OGIhjNXm99Ar59dAM9228X8gGfryLFMkWcO/fNZzb6lxXmJ6b2LPY3KqpMwqRLTAU/zy+ax30eFoWdDHYa4X6e1AoGAfa8asVGOJ8GL9dlWufEeFkDEDKO9ww5GdnpN+wqLwePWqeJhWCHad7bge6SnlylJp5aZXl1+YaBTtOskC4Whq9TP2J+dNIgxsaF5EFZQJr8Xv+lY9lu0CruYOh9nTNF9x3nubxJgaSid/7yRPfAGnsJRiknB5bsrCvgsFQFjJVs=";
let decode_content = "";
function aes_decrypt(data) {
let key = CryptoJS.enc.Hex.parse("686A64686E780A0A0A0A0A0A0A0A0A0A");
let iv = CryptoJS.enc.Hex.parse("647A797964730A0A0A0A0A0A0A0A0A0A");
let encrypted = CryptoJS.AES.decrypt({
ciphertext: CryptoJS.enc.Base64.parse(data)
}, key, {
iv: iv,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
}).toString(CryptoJS.enc.Utf8);
return encrypted
}
let error_log = false;
function logger(text) {
if (error_log) {
log(text)
}
}
let decode_funcs = [text => {
try {
return ungzip(text)
} catch (e) {
logger("非gzip加密");
return ""
}
}, text => {
try {
return base64Decode(text)
} catch (e) {
logger("非b64加密");
return ""
}
}, text => {
try {
return aes_decrypt(text)
} catch (e) {
logger("非aes加密");
return ""
}
}, text => {
try {
return RSA.decode(text, rsa_private_key, null)
} catch (e) {
logger("非rsa加密");
return ""
}
}];
let func_index = 0;
while (!current_match.test(decode_content)) {
decode_content = decode_funcs[func_index](js_code);
func_index++;
if (func_index >= decode_funcs.length) {
break
}
}
return decode_content
}
function runMain(main_func_code, arg) {
let mainFunc = function() {
return ""
};
try {
eval(main_func_code + "\nmainFunc=main;");
return mainFunc(arg)
} catch (e) {
log(`执行main_funct发生了错误:${e.message}`);
return ""
}
}
function init(ext) {
console.log("init");
rule = {};
rule_fetch_params = {};
fetch_params = null;
try {
let muban = 模板.getMubans();
if (typeof ext == "object") {
rule = ext
} else if (typeof ext == "string") {
let is_file = ext.startsWith("file://");
if (ext.startsWith("http") || is_file) {
let query = getQuery(ext);
if (is_file) {
ext = ext.split("?")[0]
}
let js = request(ext, {
method: "GET"
});
if (js) {
js = getOriginalJs(js);
eval("(function(){" + js.replace("var rule", "rule") + "})()")
}
if (query.type === "url" && query.params) {
if (is_file && /^http/.test(query.params)) {
rule.params = query.params
} else {
rule.params = urljoin(ext, query.params)
}
} else if (query.params) {
rule.params = query.params
}
} else {
ext = getOriginalJs(ext);
eval("(function(){" + ext.replace("var rule", "rule") + "})()")
}
} else {
console.log(`规则加载失败,不支持的规则类型:${typeof ext}`);
return
}
rule.host = (rule.host || "").rstrip("/");
HOST = rule.host;
if (rule.hostJs) {
console.log(`检测到hostJs,准备执行...`);
try {
eval(rule.hostJs);
rule.host = HOST.rstrip("/")
} catch (e) {
console.log(`执行${rule.hostJs}获取host发生错误:${e.message}`)
}
}
if (rule["模板"] === "自动") {
try {
let host_headers = rule["headers"] || {};
let host_html = getCode(HOST, {
headers: host_headers
});
let match_muban = "";
let muban_keys = Object.keys(muban).filter(it => !/默认|短视2|采集1/.test(it));
for (let muban_key of muban_keys) {
try {
let host_data = JSON.parse(home({}, host_html, muban[muban_key].class_parse));
if (host_data.class && host_data.class.length > 0) {
match_muban = muban_key;
console.log(`自动匹配模板:【${muban_key}`);
break
}
} catch (e) {
console.log(`自动匹配模板:【${muban_key}】错误:${e.message}`)
}
}
if (match_muban) {
muban["自动"] = muban[match_muban];
if (rule["模板修改"] && rule["模板修改"].startsWith("js:")) {
eval(rule["模板修改"].replace("js:", "").trim())
}
} else {
delete rule["模板"]
}
} catch (e) {
delete rule["模板"]
}
}
if (rule.模板 && muban.hasOwnProperty(rule.模板)) {
print("继承模板:" + rule.模板);
rule = Object.assign(muban[rule.模板], rule)
}
let rule_cate_excludes = (rule.cate_exclude || "").split("|").filter(it => it.trim());
let rule_tab_excludes = (rule.tab_exclude || "").split("|").filter(it => it.trim());
rule_cate_excludes = rule_cate_excludes.concat(CATE_EXCLUDE.split("|").filter(it => it.trim()));
rule_tab_excludes = rule_tab_excludes.concat(TAB_EXCLUDE.split("|").filter(it => it.trim()));
rule.cate_exclude = rule_cate_excludes.join("|");
rule.tab_exclude = rule_tab_excludes.join("|");
rule.类型 = rule.类型 || "影视";
rule.url = rule.url || "";
rule.double = rule.double || false;
rule.homeUrl = rule.homeUrl || "";
rule.detailUrl = rule.detailUrl || "";
rule.searchUrl = rule.searchUrl || "";
rule.homeUrl = rule.host && rule.homeUrl ? urljoin(rule.host, rule.homeUrl) : rule.homeUrl || rule.host;
rule.homeUrl = cheerio.jinja2(rule.homeUrl, {
rule: rule
});
rule.detailUrl = rule.host && rule.detailUrl ? urljoin(rule.host, rule.detailUrl) : rule.detailUrl;
rule.二级访问前 = rule.二级访问前 || "";
if (rule.url.includes("[") && rule.url.includes("]")) {
let u1 = rule.url.split("[")[0];
let u2 = rule.url.split("[")[1].split("]")[0];
rule.url = rule.host && rule.url ? urljoin(rule.host, u1) + "[" + urljoin(rule.host, u2) + "]" : rule.url
} else {
rule.url = rule.host && rule.url ? urljoin(rule.host, rule.url) : rule.url
}
if (rule.searchUrl.includes("[") && rule.searchUrl.includes("]") && !rule.searchUrl.includes("#")) {
let u1 = rule.searchUrl.split("[")[0];
let u2 = rule.searchUrl.split("[")[1].split("]")[0];
rule.searchUrl = rule.host && rule.searchUrl ? urljoin(rule.host, u1) + "[" + urljoin(rule.host, u2) + "]" : rule.searchUrl
} else {
rule.searchUrl = rule.host && rule.searchUrl ? urljoin(rule.host, rule.searchUrl) : rule.searchUrl
}
rule.timeout = rule.timeout || 5e3;
rule.encoding = rule.编码 || rule.encoding || "utf-8";
rule.search_encoding = rule.搜索编码 || rule.search_encoding || "";
rule.图片来源 = rule.图片来源 || "";
rule.图片替换 = rule.图片替换 || "";
rule.play_json = rule.hasOwnProperty("play_json") ? rule.play_json : [];
rule.pagecount = rule.hasOwnProperty("pagecount") ? rule.pagecount : {};
rule.proxy_rule = rule.hasOwnProperty("proxy_rule") ? rule.proxy_rule : "";
if (!rule.hasOwnProperty("sniffer")) {
rule.sniffer = false
}
rule.sniffer = rule.hasOwnProperty("sniffer") ? rule.sniffer : "";
rule.sniffer = !!(rule.sniffer && rule.sniffer !== "0" && rule.sniffer !== "false");
rule.isVideo = rule.hasOwnProperty("isVideo") ? rule.isVideo : "";
if (rule.sniffer && !rule.isVideo) {
rule.isVideo = "http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)\\?.*|http((?!http).){12,}\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)|http((?!http).)*?video/tos*|http((?!http).)*?obj/tos*"
}
rule.tab_remove = rule.hasOwnProperty("tab_remove") ? rule.tab_remove : [];
rule.tab_order = rule.hasOwnProperty("tab_order") ? rule.tab_order : [];
rule.tab_rename = rule.hasOwnProperty("tab_rename") ? rule.tab_rename : {};
if (rule.headers && typeof rule.headers === "object") {
try {
let header_keys = Object.keys(rule.headers);
for (let k of header_keys) {
if (k.toLowerCase() === "user-agent") {
let v = rule.headers[k];
console.log(v);
if (["MOBILE_UA", "PC_UA", "UC_UA", "IOS_UA", "UA"].includes(v)) {
rule.headers[k] = eval(v)
}
} else if (k.toLowerCase() === "cookie") {
let v = rule.headers[k];
if (v && v.startsWith("http")) {
console.log(v);
try {
v = fetch(v);
console.log(v);
rule.headers[k] = v
} catch (e) {
console.log(`${v}获取cookie发生错误:${e.message}`)
}
}
}
}
} catch (e) {
console.log(`处理headers发生错误:${e.message}`)
}
} else {
rule.headers = {}
}
oheaders = deepCopy(rule.headers);
rule_fetch_params = {
headers: rule.headers,
timeout: rule.timeout,
encoding: rule.encoding
};
RKEY = typeof key !== "undefined" && key ? key : "drpy_" + (rule.title || rule.host);
pre();
init_test()
} catch (e) {
console.log(`init_test发生错误:${e.message}`)
}
}
let homeHtmlCache = undefined;
function home(filter, home_html, class_parse) {
console.log("home");
home_html = home_html || "";
class_parse = class_parse || "";
if (typeof rule.filter === "string" && rule.filter.trim().length > 0) {
try {
let filter_json = ungzip(rule.filter.trim());
rule.filter = JSON.parse(filter_json)
} catch (e) {
rule.filter = {}
}
}
let homeObj = {
filter: rule.filter || false,
MY_URL: rule.homeUrl,
class_name: rule.class_name || "",
class_url: rule.class_url || "",
class_parse: class_parse || rule.class_parse || "",
cate_exclude: rule.cate_exclude,
home_html: home_html
};
return homeParse(homeObj)
}
function homeVod(params) {
console.log("homeVod");
let homeVodObj = {
"推荐": rule.推荐,
double: rule.double,
homeUrl: rule.homeUrl,
detailUrl: rule.detailUrl
};
return homeVodParse(homeVodObj)
}
function category(tid, pg, filter, extend) {
let cateObj = {
url: rule.url,
"一级": rule.一级,
tid: tid,
pg: parseInt(pg),
filter: filter,
extend: extend
};
return categoryParse(cateObj)
}
function detail(vod_url) {
let orId = vod_url;
let fyclass = "";
log("orId:" + orId);
if (vod_url.indexOf("$") > -1) {
let tmp = vod_url.split("$");
fyclass = tmp[0];
vod_url = tmp[1]
}
let detailUrl = vod_url.split("@@")[0];
let url;
if (!detailUrl.startsWith("http") && !detailUrl.includes("/")) {
url = rule.detailUrl.replaceAll("fyid", detailUrl).replaceAll("fyclass", fyclass)
} else if (detailUrl.includes("/")) {
url = urljoin(rule.homeUrl, detailUrl)
} else {
url = detailUrl
}
let detailObj = {
orId: orId,
url: url,
"二级": rule.二级,
"二级访问前": rule.二级访问前,
detailUrl: detailUrl,
fyclass: fyclass,
tab_exclude: rule.tab_exclude
};
return detailParse(detailObj)
}
function play(flag, id, flags) {
let playObj = {
url: id,
flag: flag,
flags: flags
};
return playParse(playObj)
}
function search(wd, quick, pg) {
if (rule.search_encoding) {
if (rule.search_encoding.toLowerCase() !== "utf-8") {
wd = encodeStr(wd, rule.search_encoding)
}
} else if (rule.encoding && rule.encoding.toLowerCase() !== "utf-8") {
wd = encodeStr(wd, rule.encoding)
}
let searchObj = {
searchUrl: rule.searchUrl,
"搜索": rule.搜索,
wd: wd,
pg: pg || 1,
quick: quick
};
return searchParse(searchObj)
}
function proxy(params) {
if (rule.proxy_rule && rule.proxy_rule.trim()) {
rule.proxy_rule = rule.proxy_rule.trim()
}
if (rule.proxy_rule.startsWith("js:")) {
rule.proxy_rule = rule.proxy_rule.replace("js:", "")
}
let proxyObj = {
params: params,
proxy_rule: rule.proxy_rule
};
return proxyParse(proxyObj)
}
function sniffer() {
let enable_sniffer = rule.sniffer || false;
if (enable_sniffer) {
log("开始执行辅助嗅探代理规则...")
}
return enable_sniffer
}
function isVideo(url) {
let t = 0;
let is_video;
if (rule.isVideo && rule.isVideo.trim()) {
is_video = rule.isVideo.trim()
}
if (is_video.startsWith("js:")) {
is_video = is_video.replace("js:", "");
t = 1
}
let isVideoObj = {
url: url,
isVideo: is_video,
t: t
};
let result = isVideoParse(isVideoObj);
if (result) {
log("成功执行辅助嗅探规则并检测到视频地址:\n" + rule.isVideo)
}
return result
}
function getRule(key) {
return key ? rule[key] || "" : rule
}
function deepCopy(_obj) {
return JSON.parse(JSON.stringify(_obj))
}
function matchesAll(str, pattern, flatten) {
if (!pattern.global) {
pattern = new RegExp(pattern.source, "g" + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : ""))
}
var matches = [];
var match;
while ((match = pattern.exec(str)) !== null) {
matches.push(match)
}
return flatten ? matches.flat() : matches
}
function stringUtils() {
Object.defineProperties(String.prototype, {
replaceX: {
value: function(regex, replacement) {
let matches = matchesAll(this, regex, true);
if (matches && matches.length > 1) {
const hasCaptureGroup = /\$\d/.test(replacement);
if (hasCaptureGroup) {
return this.replace(regex, m => m.replace(regex, replacement))
} else {
return this.replace(regex, (m, p1) => m.replace(p1, replacement))
}
}
return this.replace(regex, replacement)
},
configurable: true,
enumerable: false,
writable: true
},
parseX: {
get: function() {
try {
return JSON.parse(this)
} catch (e) {
console.log(e.message);
return this.startsWith("[") ? [] : {}
}
},
configurable: true,
enumerable: false
}
})
}
function cut(text, start, end, method, All) {
let result = "";
let c = (t, s, e) => {
let result = "";
let rs = [];
let results = [];
try {
let lr = new RegExp(String.raw`${s}`.toString());
let rr = new RegExp(String.raw`${e}`.toString());
const segments = t.split(lr);
if (segments.length < 2) return "";
let cutSegments = segments.slice(1).map(segment => {
let splitSegment = segment.split(rr);
return splitSegment.length < 2 ? undefined : splitSegment[0] + e
}).filter(f => f);
if (All) {
return `[${cutSegments.join(",")}]`
} else {
return cutSegments[0]
}
} catch (e) {
console.log(`Error cutting text:${e.message}`)
}
return result
};
result = c(text, start, end);
stringUtils();
if (method && typeof method === "function") {
result = method(result)
}
return result
}
function DRPY() {
return {
runMain: runMain,
getRule: getRule,
init: init,
home: home,
homeVod: homeVod,
category: category,
detail: detail,
play: play,
search: search,
proxy: proxy,
sniffer: sniffer,
isVideo: isVideo,
fixAdM3u8Ai: fixAdM3u8Ai
}
}
export default {
runMain: runMain,
getRule: getRule,
init: init,
home: home,
homeVod: homeVod,
category: category,
detail: detail,
play: play,
search: search,
proxy: proxy,
sniffer: sniffer,
isVideo: isVideo,
fixAdM3u8Ai: fixAdM3u8Ai,
DRPY: DRPY
};
+2299
View File
@@ -0,0 +1,2299 @@
var rule = {
title: '优酷[官]',
host: 'https://www.%79%6f%75%6b%75.com',
homeUrl: '',
searchUrl: 'https://search.%79%6f%75%6b%75.com/api/search?pg=fypage&keyword=**',
searchable: 2,
quickSearch: 0,
filterable: 1,
multi: 1,
url: '/category/data?optionRefresh=1&pageNo=fypage&params=fyfilter',
filter_url: '{{fl}}',
filter: {
"电视剧": [{
"key": "main_area",
"name": "全部地区",
"value": [{
"n": "全部地区",
"v": ""
}, {
"n": "内地剧",
"v": "中国内地"
}, {
"n": "港剧",
"v": "中国香港"
}, {
"n": "台剧",
"v": "中国台湾"
}, {
"n": "韩剧",
"v": "韩国"
}, {
"n": "美剧",
"v": "美国"
}, {
"n": "英剧",
"v": "英国"
}, {
"n": "日剧",
"v": "日本"
}, {
"n": "泰剧",
"v": "泰国"
}]
}, {
"key": "tags",
"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": "罪案",
"v": "罪案"
}, {
"n": "家庭",
"v": "家庭"
}, {
"n": "历史",
"v": "历史"
}, {
"n": "年代",
"v": "年代"
}, {
"n": "农村",
"v": "农村"
}]
}, {
"key": "year",
"name": "全部年份",
"value": [{
"n": "全部年份",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014-2011",
"v": "2011-2014"
}, {
"n": "更早",
"v": "-2010"
}]
}, {
"key": "status",
"name": "全部规格",
"value": [{
"n": "全部规格",
"v": ""
}, {
"n": "全网独播",
"v": "1"
}, {
"n": "优酷自制",
"v": "2"
}, {
"n": "已完结",
"v": "3"
}, {
"n": "即将上线",
"v": "4"
}, {
"n": "短剧",
"v": "5"
}]
}, {
"key": "pay_type",
"name": "付费类型",
"value": [{
"n": "付费类型",
"v": ""
}, {
"n": "免费",
"v": "0"
}, {
"n": "VIP",
"v": "2"
}, {
"n": "付费",
"v": "1"
}]
}, {
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "热度最高",
"v": "7"
}, {
"n": "最新上线",
"v": "1"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最多播放",
"v": "2"
}]
}],
"电影": [{
"key": "main_area",
"name": "全部地区",
"value": [{
"n": "全部地区",
"v": ""
}, {
"n": "内地",
"v": "中国内地"
}, {
"n": "中国香港",
"v": "中国香港"
}, {
"n": "中国台湾",
"v": "中国台湾"
}, {
"n": "美国",
"v": "美国"
}, {
"n": "印度",
"v": "印度"
}, {
"n": "日韩",
"v": "韩国,日本"
}, {
"n": "泰国",
"v": "泰国"
}, {
"n": "欧洲",
"v": "欧洲"
}]
}, {
"key": "tags",
"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": "剧情",
"v": "剧情"
}, {
"n": "历史",
"v": "历史"
}, {
"n": "纪录片",
"v": "纪录片"
}, {
"n": "传记",
"v": "传记"
}, {
"n": "歌舞",
"v": "歌舞"
}, {
"n": "短片",
"v": "短片"
}, {
"n": "其他",
"v": "其他"
}]
}, {
"key": "source",
"name": "全部规格",
"value": [{
"n": "全部规格",
"v": ""
}, {
"n": "院线",
"v": "1"
}, {
"n": "网络电影",
"v": "0"
}, {
"n": "独播",
"v": "2"
}, {
"n": "高清修复",
"v": "3"
}, {
"n": "1080P",
"v": "4"
}]
}, {
"key": "year",
"name": "全部年份",
"value": [{
"n": "全部年份",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014-2010",
"v": "2010-2014"
}, {
"n": "2009-2000",
"v": "2000-2009"
}, {
"n": "90年代",
"v": "1990-1999"
}, {
"n": "80年代",
"v": "1980-1989"
}, {
"n": "70年代",
"v": "1970-1979"
}, {
"n": "更早",
"v": "-1969"
}]
}, {
"key": "pay_type",
"name": "付费类型",
"value": [{
"n": "付费类型",
"v": ""
}, {
"n": "免费",
"v": "0"
}, {
"n": "会员",
"v": "2"
}, {
"n": "点播",
"v": "1"
}]
}, {
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "热度最高",
"v": "7"
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最新上线",
"v": "1"
}, {
"n": "最好评",
"v": "3"
}]
}, {
"key": "tag_label_name",
"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": "豪华阵容",
"v": "豪华阵容"
}, {
"n": "李玉",
"v": "李玉"
}, {
"n": "无厘头喜剧",
"v": "无厘头喜剧"
}, {
"n": "超能力",
"v": "超能力"
}, {
"n": "欢喜搭档",
"v": "欢喜搭档"
}]
}],
"综艺": [{
"key": "main_area",
"name": "全部地区",
"value": [{
"n": "全部地区",
"v": ""
}, {
"n": "内地",
"v": "中国内地"
}, {
"n": "中国台湾",
"v": "中国台湾"
}, {
"n": "美国",
"v": "美国"
}, {
"n": "英国",
"v": "英国"
}]
}, {
"key": "tags",
"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": "美食",
"v": "美食"
}, {
"n": "旅游",
"v": "旅游"
}, {
"n": "益智",
"v": "益智"
}]
}, {
"key": "year",
"name": "全部年份",
"value": [{
"n": "全部年份",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014-2011",
"v": "2011-2014"
}, {
"n": "更早",
"v": "-2010"
}]
}, {
"key": "status",
"name": "全部规格",
"value": [{
"n": "全部规格",
"v": ""
}, {
"n": "优酷自制",
"v": "2"
}, {
"n": "优酷独播",
"v": "1"
}, {
"n": "电视综艺",
"v": "6"
}, {
"n": "已完结",
"v": "3"
}, {
"n": "即将上线",
"v": "4"
}]
}, {
"key": "pay_type",
"name": "付费类型",
"value": [{
"n": "付费类型",
"v": ""
}, {
"n": "免费",
"v": "0"
}, {
"n": "VIP",
"v": "2"
}, {
"n": "付费",
"v": "1"
}]
}, {
"key": "sort",
"name": "热度最高",
"value": [{
"n": "热度最高",
"v": ""
}, {
"n": "最新更新",
"v": "8"
}, {
"n": "最近开播",
"v": "9"
}, {
"n": "最多评论",
"v": "4"
}]
}, {
"key": "tag_label_name",
"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": "德云社",
"v": "德云社"
}, {
"n": "郑恺",
"v": "郑恺"
}, {
"n": "华少",
"v": "华少"
}, {
"n": "郭德纲",
"v": "郭德纲"
}, {
"n": "贾玲",
"v": "贾玲"
}]
}],
"动漫": [{
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最新上线",
"v": "1"
}]
}, {
"key": "main_area",
"name": "全部地区",
"value": [{
"n": "全部地区",
"v": ""
}, {
"n": "内地",
"v": "中国内地"
}, {
"n": "日本",
"v": "日本"
}, {
"n": "美国",
"v": "美国"
}, {
"n": "中国台湾",
"v": "中国台湾"
}, {
"n": "其他",
"v": "其他"
}]
}, {
"key": "tags",
"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": "都市",
"v": "都市"
}, {
"n": "小说改",
"v": "小说改编"
}, {
"n": "游戏改",
"v": "游戏改编"
}, {
"n": "漫画改",
"v": "漫画改编"
}, {
"n": "动态漫",
"v": "动态漫画"
}, {
"n": "特摄",
"v": "特摄"
}, {
"n": "布袋戏",
"v": "布袋戏"
}]
}, {
"key": "completed",
"name": "连载情况",
"value": [{
"n": "连载情况",
"v": ""
}, {
"n": "更新中",
"v": "0"
}, {
"n": "已完结",
"v": "1"
}]
}, {
"key": "pay_type",
"name": "付费类型",
"value": [{
"n": "付费类型",
"v": ""
}, {
"n": "免费",
"v": "0"
}, {
"n": "会员",
"v": "2"
}]
}, {
"key": "year",
"name": "全部年份",
"value": [{
"n": "全部年份",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "00年代",
"v": "2000-2010"
}, {
"n": "更早",
"v": "-1999"
}]
}, {
"key": "tag_label_name",
"name": "为你推荐",
"value": [{
"n": "为你推荐",
"v": ""
}, {
"n": "3D动画",
"v": "3D动画"
}, {
"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": "无厘头",
"v": "无厘头"
}, {
"n": "青山刚昌",
"v": "青山刚昌"
}, {
"n": "悬疑",
"v": "悬疑"
}]
}],
"少儿": [{
"key": "main_area",
"name": "全部地区",
"value": [{
"n": "全部地区",
"v": ""
}, {
"n": "中国",
"v": "中国,香港,台湾"
}, {
"n": "美国",
"v": "美国"
}, {
"n": "英国",
"v": "英国"
}, {
"n": "其他国家",
"v": "其他"
}]
}, {
"key": "show_label_type",
"name": "全部类型",
"value": [{
"n": "全部类型",
"v": ""
}, {
"n": "动画",
"v": "动画"
}, {
"n": "儿歌",
"v": "儿歌"
}, {
"n": "玩具",
"v": "玩具"
}, {
"n": "动画电影",
"v": "电影"
}, {
"n": "绘本故事",
"v": "绘本故事"
}, {
"n": "真人",
"v": "真人"
}, {
"n": "少儿综艺",
"v": "少儿综艺"
}, {
"n": "亲子",
"v": "亲子"
}, {
"n": "探索纪实",
"v": "探索纪实"
}, {
"n": "音频",
"v": "音频"
}]
}, {
"key": "child_tags",
"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": "童话",
"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": "课程辅导"
}]
}, {
"key": "age",
"name": "全部年龄",
"value": [{
"n": "全部年龄",
"v": ""
}, {
"n": "0-2岁",
"v": "0-2"
}, {
"n": "3-4岁",
"v": "3-4"
}, {
"n": "5-6岁",
"v": "5-6"
}, {
"n": "7岁以上",
"v": "7-"
}]
}, {
"key": "pay_type",
"name": "付费类型",
"value": [{
"n": "付费类型",
"v": ""
}, {
"n": "免费",
"v": "0"
}, {
"n": "付费",
"v": "1"
}, {
"n": "VIP",
"v": "2"
}]
}, {
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "最新上线",
"v": "1"
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最多评论",
"v": "4"
}, {
"n": "最多收藏",
"v": "5"
}]
}],
"纪录片": [{
"key": "tags",
"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": "旅游"
}]
}, {
"key": "company",
"name": "全部出品",
"value": [{
"n": "全部出品",
"v": ""
}, {
"n": "BBC",
"v": "bbc,british"
}, {
"n": "央视",
"v": "央视,中央电视台,cctv,中国广播电影电视节目交易中心"
}, {
"n": "国家地理",
"v": "国家地理"
}, {
"n": "Love Nature",
"v": "love nature"
}, {
"n": "LGI",
"v": "looking"
}, {
"n": "A&E",
"v": "ae"
}, {
"n": "OTF",
"v": "fence"
}]
}, {
"key": "year",
"name": "全部年份",
"value": [{
"n": "全部年份",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014-2011",
"v": "2011-2014"
}, {
"n": "更早",
"v": "-2010"
}]
}, {
"key": "pay_type",
"name": "付费类型",
"value": [{
"n": "付费类型",
"v": ""
}, {
"n": "免费",
"v": "0"
}, {
"n": "会员",
"v": "2"
}]
}, {
"key": "sort",
"name": "热度最高",
"value": [{
"n": "热度最高",
"v": ""
}, {
"n": "综合排序",
"v": "0"
}, {
"n": "最新上线",
"v": "1"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最多收藏",
"v": "5"
}]
}],
"文化": [{
"key": "tags",
"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": "有声书"
}]
}, {
"key": "people",
"name": "文化大咖",
"value": [{
"n": "文化大咖",
"v": ""
}, {
"n": "窦文涛",
"v": "窦文涛"
}, {
"n": "马未都",
"v": "马未都"
}, {
"n": "白岩松",
"v": "白岩松"
}, {
"n": "梅毅",
"v": "梅毅"
}, {
"n": "陈鲁豫",
"v": "陈鲁豫"
}, {
"n": "樊登",
"v": "樊登"
}, {
"n": "罗振宇",
"v": "罗振宇"
}, {
"n": "蒋方舟",
"v": "蒋方舟"
}, {
"n": "其他",
"v": "其他"
}]
}, {
"key": "year",
"name": "全部年份",
"value": [{
"n": "全部年份",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014-2011",
"v": "2011-2014"
}, {
"n": "更早",
"v": "-2010"
}]
}, {
"key": "pay_type",
"name": "付费类型",
"value": [{
"n": "付费类型",
"v": ""
}, {
"n": "免费",
"v": "0"
}, {
"n": "会员",
"v": "2"
}]
}, {
"key": "sort",
"name": "热度最高",
"value": [{
"n": "热度最高",
"v": ""
}, {
"n": "综合排序",
"v": "0"
}, {
"n": "最新上线",
"v": "1"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最多收藏",
"v": "5"
}]
}],
"亲子": [{
"key": "qinzi_genre",
"name": "全部类型",
"value": [{
"n": "全部类型",
"v": ""
}, {
"n": "孕产",
"v": "孕产"
}, {
"n": "育儿知识",
"v": "育儿知识,育儿达人,育儿专家,爸爸育儿,隔代育儿,育儿明星"
}, {
"n": "好物种草",
"v": "母婴用品,测评,母婴用品种草"
}, {
"n": "美食",
"v": "儿童美食,辅食,孕期饮食"
}, {
"n": "手工DIY",
"v": "手工diy"
}, {
"n": "教育观念",
"v": "教育观念"
}, {
"n": "亲子综艺",
"v": "亲子综艺"
}, {
"n": "亲子互动",
"v": "亲子旅游,亲子游戏,亲子阅读,玩具,早教,启蒙"
}, {
"n": "萌娃",
"v": "萌娃"
}, {
"n": "搞笑",
"v": "搞笑"
}, {
"n": "美妆",
"v": "美妆"
}]
}, {
"key": "pregnancy_stage",
"name": "全部阶段",
"value": [{
"n": "全部阶段",
"v": ""
}, {
"n": "备孕",
"v": "备孕"
}, {
"n": "孕早期",
"v": "孕早"
}, {
"n": "孕中期",
"v": "孕中"
}, {
"n": "孕晚期",
"v": "孕晚"
}]
}, {
"key": "show_label_baby_age",
"name": "全部分龄",
"value": [{
"n": "全部分龄",
"v": ""
}, {
"n": "0-1岁",
"v": "0-1"
}, {
"n": "1-3岁",
"v": "1-3"
}, {
"n": "3-6岁",
"v": "3-6"
}, {
"n": "6岁+",
"v": "6-"
}]
}, {
"key": "pay_type",
"name": "全部",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "免费",
"v": "0"
}, {
"n": "会员免费",
"v": "2"
}]
}, {
"key": "sort",
"name": "热度最高",
"value": [{
"n": "热度最高",
"v": ""
}, {
"n": "综合排序",
"v": "0"
}, {
"n": "最新上线",
"v": "1"
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最多评论",
"v": "3"
}, {
"n": "最多收藏",
"v": "5"
}]
}],
"教育": [{
"key": "tags",
"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": "家庭教育",
"v": "家庭教育"
}]
}, {
"key": "company",
"name": "全部出品",
"value": [{
"n": "全部出品",
"v": ""
}, {
"n": "TED",
"v": "ted"
}, {
"n": "耶鲁大学",
"v": "耶鲁大学"
}, {
"n": "哈佛大学",
"v": "哈佛大学"
}, {
"n": "斯坦福大学",
"v": "斯坦福大学"
}, {
"n": "麻省理工学院",
"v": "麻省理工学院"
}]
}, {
"key": "pay_type",
"name": "全部节目",
"value": [{
"n": "全部节目",
"v": ""
}, {
"n": "免费",
"v": "0"
}, {
"n": "付费",
"v": "1"
}, {
"n": "VIP",
"v": "2"
}]
}, {
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最多收藏",
"v": "5"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最新上线",
"v": "1"
}]
}],
"搞笑": [{
"key": "division",
"name": "全部专区",
"value": [{
"n": "全部专区",
"v": ""
}, {
"n": "1080P",
"v": "3"
}, {
"n": "独播",
"v": "6"
}, {
"n": "免费",
"v": "5"
}]
}, {
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最新上线",
"v": "1"
}]
}],
"生活": [{
"key": "division",
"name": "全部专区",
"value": [{
"n": "全部专区",
"v": ""
}, {
"n": "1080P",
"v": "3"
}, {
"n": "独播",
"v": "6"
}, {
"n": "VIP",
"v": "4"
}, {
"n": "免费",
"v": "5"
}]
}, {
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最新上线",
"v": "1"
}]
}],
"体育": [{
"key": "division",
"name": "全部专区",
"value": [{
"n": "全部专区",
"v": ""
}, {
"n": "1080P",
"v": "3"
}, {
"n": "独播",
"v": "6"
}, {
"n": "VIP",
"v": "4"
}, {
"n": "免费",
"v": "5"
}]
}, {
"key": "tags",
"name": "全部类型",
"value": [{
"n": "全部类型",
"v": ""
}, {
"n": "篮球",
"v": "篮球"
}, {
"n": "足球",
"v": "足球"
}, {
"n": "台球",
"v": "台球"
}, {
"n": "CBA",
"v": "CBA"
}, {
"n": "钓鱼",
"v": "钓鱼"
}]
}, {
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最新上线",
"v": "1"
}]
}],
"音乐": [{
"key": "division",
"name": "全部专区",
"value": [{
"n": "全部专区",
"v": ""
}, {
"n": "1080P",
"v": "3"
}, {
"n": "独播",
"v": "6"
}, {
"n": "免费",
"v": "5"
}]
}, {
"key": "main_area",
"name": "全部地区",
"value": [{
"n": "全部地区",
"v": ""
}, {
"n": "中国",
"v": "中国"
}, {
"n": "中国台湾",
"v": "中国台湾"
}, {
"n": "中国香港",
"v": "中国香港"
}, {
"n": "美国",
"v": "美国"
}, {
"n": "其他",
"v": "其他"
}]
}, {
"key": "music_show_type",
"name": "全部类型",
"value": [{
"n": "全部类型",
"v": ""
}, {
"n": "演唱会",
"v": "演唱会"
}, {
"n": "live现场",
"v": "live现场"
}, {
"n": "颁奖典礼",
"v": "颁奖典礼"
}, {
"n": "舞蹈",
"v": "舞蹈"
}, {
"n": "影视原声",
"v": "影视原声"
}, {
"n": "音乐达人",
"v": "音乐达人"
}, {
"n": "音乐教学",
"v": "音乐教学"
}, {
"n": "音乐纪录片",
"v": "音乐纪录片"
}, {
"n": "音乐mv",
"v": "音乐mv"
}, {
"n": "音乐自制",
"v": "音乐自制"
}]
}, {
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最新上线",
"v": "1"
}]
}],
"游戏": [{
"key": "division",
"name": "全部专区",
"value": [{
"n": "全部专区",
"v": ""
}, {
"n": "1080P",
"v": "3"
}, {
"n": "独播",
"v": "6"
}, {
"n": "VIP",
"v": "4"
}, {
"n": "免费",
"v": "5"
}]
}, {
"key": "game_brand",
"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": "英雄联盟"
}]
}, {
"key": "tags",
"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": "策略",
"v": "策略"
}, {
"n": "冒险",
"v": "冒险"
}, {
"n": "即时战略",
"v": "即时战略"
}, {
"n": "卡牌",
"v": "卡牌"
}, {
"n": "角色扮演",
"v": "角色>扮演"
}]
}, {
"key": "sort",
"name": "综合排序",
"value": [{
"n": "综合排序",
"v": ""
}, {
"n": "最多播放",
"v": "2"
}, {
"n": "最好评",
"v": "3"
}, {
"n": "最新上线",
"v": "1"
}]
}]
},
headers: {
'User-Agent': 'PC_UA',
'Cookie': 'cna=VvNvGX3e0ywCAavVEXlnA2bg; __ysuid=1626676228345Rl1; __ayft=1652434048647; __arycid=dm-1-00; __arcms=dm-1-00; __ayvstp=85; __arpvid=1667204023100cWWdgM-1667204023112; __ayscnt=10; __aypstp=60; isg=BBwcqxvvk3BxkWQGugbLpUSf7TrOlcC_U7GAj_YdfYfvQbzLHqYGT4Hgp6m5TvgX; tfstk=c3JOByYUH20ilVucLOhh0pCtE40lZfGc-PjLHLLfuX7SWNyAiQvkeMBsIw7PWDC..; l=eBQguS-PjdJFGJT-BOfwourza77OSIRA_uPzaNbMiOCPOb1B5UxfW6yHp4T6C3GVhsGJR3rp2umHBeYBqQd-nxvOF8qmSVDmn',
'Referer': 'https://www.youku.com',
},
timeout: 5000,
class_name: '电视剧&电影&综艺&动漫&少儿&纪录片&文化&亲子&教育&搞笑&生活&体育&音乐&游戏',
class_url: '电视剧&电影&综艺&动漫&少儿&纪录片&文化&亲子&教育&搞笑&生活&体育&音乐&游戏',
limit: 20,
play_parse: true,
lazy: $js.toString(() => {
try {
let api = "" + input.split("?")[0];
console.log(api);
let response = fetch(api, {
method: 'get',
headers: {
'User-Agent': 'okhttp/3.14.9',
'Content-Type': 'application/x-www-form-urlencoded'
}
});
let bata = JSON.parse(response);
if (bata.url.includes("http")) {
input = {
parse: 0,
url: bata.url,
jx: 0,
danmaku: "http://127.0.0.1:9978/proxy?do=danmu&site=js&url=http://dm.qxq6.com/zy/api.php?url=" + input.split("?")[0]
};
} else {
input = {
parse: 0,
url: input.split("?")[0],
jx: 1,
danmaku: "http://127.0.0.1:9978/proxy?do=danmu&site=js&url=http://dm.qxq6.com/zy/api.php?url=" + input.split("?")[0]
};
}
} catch {
input = {
parse: 0,
url: input.split("?")[0],
jx: 1,
danmaku: "http://127.0.0.1:9978/proxy?do=danmu&site=js&url=http://dm.qxq6.com/zy/api.php?url=" + input.split("?")[0]
};
}
}),
一级: $js.toString(() => {
let d = [];
MY_FL.type = MY_CATE;
let fl = stringify(MY_FL);
fl = encodeUrl(fl);
input = input.split("{")[0] + fl;
if (MY_PAGE > 1) {
let old_session = getItem("yk_session_" + MY_CATE, "{}");
if (MY_PAGE === 2) {
input = input.replace("optionRefresh=1", "session=" + encodeUrl(old_session))
} else {
input = input.replace("optionRefresh=1", "session=" + encodeUrl(old_session))
}
}
let html = fetch(input, fetch_params);
try {
html = JSON.parse(html);
let lists = html.data.filterData.listData;
let session = html.data.filterData.session;
session = stringify(session);
if (session !== getItem("yk_session_" + MY_CATE, "{}")) {
setItem("yk_session_" + MY_CATE, session)
}
lists.forEach(function(it) {
let vid;
if (it.videoLink.includes("id_")) {
vid = it.videoLink.split("id_")[1].split(".html")[0]
} else {
vid = "msearch:"
}
d.push({
title: it.title,
img: it.img,
desc: it.summary,
url: "https://search.youku.com/api/search?appScene=show_episode&showIds=" + vid,
content: it.subTitle
})
})
} catch (e) {
log("一级列表解析发生错误:" + e.message)
}
setResult(d);
}),
二级: $js.toString(() => {
var d = [];
VOD = {};
let html = request(input);
let json = JSON.parse(html);
if (/keyword/.test(input)) {
input = "https://search.youku.com/api/search?appScene=show_episode&showIds=" + json.pageComponentList[0].commonData.showId;
json = JSON.parse(fetch(MY_URL, fetch_params))
}
let video_lists = json.serisesList;
var name = json.sourceName;
if (/优酷/.test(name) && video_lists.length > 0) {
let ourl = "https://v.youku.com/v_show/id_" + video_lists[0].videoId + ".html";
let _img = video_lists[0].thumbUrl;
let html = fetch(ourl, {
headers: {
Referer: "https://v.youku.com/",
"User-Agent": PC_UA
}
});
let json = /__INITIAL_DATA__/.test(html) ? html.split("window.__INITIAL_DATA__ =")[1].split(";")[0] : "{}";
if (json === "{}") {
log("触发了优酷人机验证");
VOD.vod_remarks = ourl;
VOD.vod_pic = _img;
VOD.vod_name = video_lists[0].title.replace(/(\d+)/g, "");
VOD.vod_content = "触发了优酷人机验证,本次未获取详情,但不影响播放(" + ourl + ")"
} else {
try {
json = JSON.parse(json);
let data = json.data.data;
let data_extra = data.data.extra;
let img = data_extra.showImgV;
let model = json.data.model;
let m = model.detail.data.nodes[0].nodes[0].nodes[0].data;
let _type = m.showGenre;
let _desc = m.updateInfo || m.subtitle;
let JJ = m.desc;
let _title = m.introTitle;
VOD.vod_pic = img;
VOD.vod_name = _title;
VOD.vod_type = _type;
VOD.vod_remarks = _desc;
VOD.vod_content = JJ
} catch (e) {
log("海报渲染发生错误:" + e.message);
print(json);
VOD.vod_remarks = name
}
}
}
if (!/优酷/.test(name)) {
VOD.vod_content = "非自家播放源,暂无视频简介及海报";
VOD.vod_remarks = name
}
function adhead(url) {
return urlencode(url)
}
play_url = play_url.replace("&play_url=", "&type=json&play_url=");
video_lists.forEach(function(it) {
let url = "https://v.youku.com/v_show/id_" + it.videoId + ".html";
if (it.thumbUrl) {
d.push({
desc: it.showVideoStage ? it.showVideoStage.replace("期", "集") : it.displayName,
pic_url: it.thumbUrl,
title: it.title,
url: play_url + adhead(url)
})
} else if (name !== "优酷") {
d.push({
title: it.displayName ? it.displayName : it.title,
url: play_url + adhead(it.url)
})
}
});
VOD.vod_play_from = name;
VOD.vod_play_url = d.map(function(it) {
return it.title + "$" + it.url
})
.join("#");
}),
搜索: $js.toString(() => {
var d = [];
let html = request(input);
let json = JSON.parse(html);
json.pageComponentList.forEach(function(it) {
if (it.hasOwnProperty("commonData")) {
it = it.commonData;
d.push({
title: it.titleDTO.displayName,
img: it.posterDTO.vThumbUrl,
desc: it.stripeBottom,
content: it.updateNotice + " " + it.feature,
url: "https://search.youku.com/api/search?appScene=show_episode&showIds=" + it.showId + "&appCaller=h5"
})
}
});
setResult(d)
}),
}
+323
View File
@@ -0,0 +1,323 @@
// 全球追更 - peekpili JS 源版(目录模式,仅列表 + goSearch)
const TMDB_API_KEY = "b2c0c025b95d0cc1c3962ebcbad1e546"
//"这里填TMDB的24位tokenAPI Key (v3 auth):这一串就是你需要的,通常是 32 位十六进制字符串,例如:a1b2c3d4e5f67890123456789abcdef,而不是API Read Access Token (v4 auth):一大串以 eyJhbGciOi... 开头的 JWT";
const UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36";
const DATA_SOURCES = {
tmdbImage: "https://proxy.api.030101.xyz/https://image.tmdb.org/t/p/w500",
tmdbApis: [
"https://proxy.api.030101.xyz/https://api.themoviedb.org/3",
"https://proxy.api.030101.xyz/https://api.tmdb.org/3"
]
};
// 简单 logpeekpili 一般有自己的 log,你也可以直接用 print/log
const log = {
info: (msg) => { try { print("[INFO] " + msg); } catch (e) {} },
warn: (msg) => { try { print("[WARN] " + msg); } catch (e) {} },
error: (msg) => { try { print("[ERROR] " + msg); } catch (e) {} }
};
// ===================== HTTP 封装(用 req 代替 axios =====================
async function httpGet(url, params) {
let query = "";
if (params && Object.keys(params).length > 0) {
const qs = Object.keys(params)
.map(k => encodeURIComponent(k) + "=" + encodeURIComponent(params[k]))
.join("&");
query = url.indexOf("?") > -1 ? "&" + qs : "?" + qs;
}
const u = url + query;
const r = await req(u, {
headers: {
"User-Agent": UA
}
});
return JSON.parse(r.content);
}
// TMDB 多域名回退
async function fetchTmdb(endpoint, params) {
let lastError;
for (let i = 0; i < DATA_SOURCES.tmdbApis.length; i++) {
const baseUrl = DATA_SOURCES.tmdbApis[i];
try {
const url = baseUrl + endpoint;
const allParams = Object.assign({ api_key: TMDB_API_KEY }, params || {});
const json = await httpGet(url, allParams);
return json;
} catch (e) {
lastError = e;
log.warn("[TMDB] " + baseUrl + " 访问异常: " + e);
}
}
throw lastError || new Error("TMDB 全部域名访问失败");
}
// ===================== 简单日期处理 =====================
function formatDate(dateStr) {
if (!dateStr) return "";
return dateStr;
}
function getToday() {
const d = new Date();
const y = d.getFullYear();
const m = (d.getMonth() + 1).toString().padStart(2, "0");
const day = d.getDate().toString().padStart(2, "0");
return y + "-" + m + "-" + day;
}
// ===================== 平台与筛选配置 =====================
const PLATFORM_CONFIG = [
{ id: "tencent", name: "腾讯视频", network: "2007" },
{ id: "youku", name: "优酷", network: "1419" },
{ id: "iqiyi", name: "爱奇艺", network: "1330" },
{ id: "bilibili", name: "哔哩哔哩", network: "1605" },
{ id: "mgtv", name: "芒果TV", network: "1631" },
{ id: "netflix", name: "Netflix", network: "213" },
{ id: "hbo", name: "HBO Max", network: "49" },
{ id: "disney", name: "Disney+", network: "2739" },
{ id: "appletv", name: "Apple TV+", network: "2552" },
{ id: "amazon", name: "Amazon Prime", network: "1024" },
{ id: "hulu", name: "Hulu", network: "453" },
{ id: "paramount",name: "Paramount+", network: "4330" }
];
const SUB_FILTERS = {
"sort": {
"key": "sort",
"name": "🔥 动态追踪",
"value": [
{ "n": "📅 追更模式", "v": "next_episode" },
{ "n": "📆 今日播出", "v": "daily_airing" },
{ "n": "🆕 最新上线", "v": "first_air_date.desc" },
{ "n": "⭐ 综合热度", "v": "popularity.desc" }
]
},
"type": {
"key": "type",
"name": "📺 内容类型",
"value": [
{ "n": "🎥 电视剧集", "v": "tv" },
{ "n": "🎬 电影作品", "v": "movie" },
{ "n": "🌸 动漫动画", "v": "anime" },
{ "n": "🎤 综艺节目", "v": "variety" }
]
}
};
function generateClassAndFilters() {
const classList = PLATFORM_CONFIG.map(p => ({ type_id: p.id, type_name: p.name }));
const filters = {};
PLATFORM_CONFIG.forEach(p => {
filters[p.id] = [SUB_FILTERS.sort, SUB_FILTERS.type];
});
return { class: classList, filters };
}
// ===================== 简单缓存(内存) =====================
const cache = {};
const CACHE_TTL = 10 * 60 * 1000;
const MAX_CACHE_SIZE = 800;
function getCachedData(key) {
const data = cache[key];
if (!data) return null;
if (Date.now() - data.time > CACHE_TTL) {
delete cache[key];
return null;
}
return data.value;
}
function setCachedData(key, value) {
const keys = Object.keys(cache);
if (keys.length >= MAX_CACHE_SIZE) {
delete cache[keys[0]];
}
cache[key] = { value: value, time: Date.now() };
}
// ===================== JS 源标准接口 =====================
async function init(cfg) {}
// 首页:返回分类 + 筛选配置
async function home(filter) {
const { class: classList, filters } = generateClassAndFilters();
return JSON.stringify({
class: classList,
filters: filters
});
}
// 分类列表:支持筛选(sort/type)
async function category(tid, pg, filter, extend) {
const page = parseInt(pg || "1");
const platform = PLATFORM_CONFIG.find(p => p.id === tid);
if (!platform) {
return JSON.stringify({
page: page,
pagecount: 1,
limit: 20,
total: 0,
list: []
});
}
let sort = "popularity.desc";
let type = "tv";
try {
// 优先用 extendpeekpili 常用)
if (extend) {
if (extend.sort) sort = extend.sort;
if (extend.type) type = extend.type;
} else if (filter) {
// 兼容某些环境用 filter 传
if (filter.sort) sort = filter.sort;
if (filter.type) type = filter.type;
}
} catch (e) {}
const today = getToday();
let endpoint = type === "movie" ? "/discover/movie" : "/discover/tv";
let queryParams = {
with_networks: platform.network,
language: "zh-CN",
page: page,
sort_by: (sort === "daily_airing" || sort === "next_episode") ? "popularity.desc" : sort
};
if (type === "anime") {
queryParams.with_genres = "16";
}
if (type === "variety") {
queryParams.with_genres = "10764|10767";
}
if (sort === "daily_airing") {
queryParams["air_date.gte"] = today;
queryParams["air_date.lte"] = today;
}
let items = [];
try {
const res = await fetchTmdb(endpoint, queryParams);
items = res && res.results ? res.results : [];
} catch (e) {
log.error("基础列表请求失败: " + e);
return JSON.stringify({
page: page,
pagecount: 1,
limit: 20,
total: 0,
list: []
});
}
const processedItems = [];
const BATCH_SIZE = 5;
for (let i = 0; i < items.length; i += BATCH_SIZE) {
const batch = items.slice(i, i + BATCH_SIZE);
for (let j = 0; j < batch.length; j++) {
const item = batch[j];
const cacheKey = "info_" + type + "_" + item.id + "_" + sort;
const cached = getCachedData(cacheKey);
if (cached) {
processedItems.push(cached);
continue;
}
let finalTitle = item.name || item.title || "";
let remark = "⭐" + (item.vote_average ? item.vote_average.toFixed(1) : "0.0");
let sortDate = item.first_air_date || item.release_date || "1900-01-01";
const hasNoChinese = !/[\u4e00-\u9fa5]/.test(finalTitle);
try {
const detailEndpoint = "/" + (type === "movie" ? "movie" : "tv") + "/" + item.id;
const detail = await fetchTmdb(detailEndpoint, {
language: "zh-CN",
append_to_response: "alternative_titles,external_ids"
});
const showEpisodeTag =
type !== "movie" &&
(sort === "next_episode" || sort === "daily_airing" || sort === "first_air_date.desc");
if (showEpisodeTag) {
const targetEp = (detail && (detail.next_episode_to_air || detail.last_episode_to_air)) || null;
if (targetEp) {
sortDate = targetEp.air_date || sortDate;
const s = (targetEp.season_number || 0).toString().padStart(2, "0");
const eNum = (targetEp.episode_number || 0).toString().padStart(2, "0");
const icon = detail.next_episode_to_air ? "🕒" : "✅";
remark = icon + (formatDate(sortDate).slice(5)) + " S" + s + "E" + eNum;
}
} else {
const releaseYear = (detail && (detail.release_date || detail.first_air_date) || "").substr(0, 4);
if (releaseYear) {
remark += " | " + releaseYear;
}
}
if (hasNoChinese && detail && detail.alternative_titles) {
const alt = detail.alternative_titles.titles || detail.alternative_titles.results || [];
for (let k = 0; k < alt.length; k++) {
const t = alt[k];
if (t && t.iso_3166_1 === "CN" && t.title) {
finalTitle = t.title;
break;
}
}
}
} catch (e2) {
log.warn("详情请求失败 [ID: " + item.id + "]: " + e2);
}
const vod = {
vod_id: item.id.toString(),
vod_name: finalTitle,
vod_pic: item.poster_path ? (DATA_SOURCES.tmdbImage + item.poster_path) : "",
vod_remarks: remark,
goSearch: true,
_date: sortDate
};
setCachedData(cacheKey, vod);
processedItems.push(vod);
}
}
return JSON.stringify({
page: page,
pagecount: 100,
limit: 20,
total: 2000,
list: processedItems
});
}
// 目录模式:detail/search/play 走简化实现
async function detail(id) {
return JSON.stringify({ list: [] });
}
async function search(wd, quick, pg) {
return JSON.stringify({ list: [] });
}
async function play(flag, id, flags) {
return JSON.stringify({
parse: 1,
url: id
});
}
export default {
init,
home,
category,
detail,
search,
play
};
+1100
View File
@@ -0,0 +1,1100 @@
var rule = {
title: '动漫岛',
// host:'http://www.dmd85.com',
// host:'http://www.88dmw.com',
host: 'http://www.dmand5.com',
// url:'/vod-list-id-fyclass-pg-fypage-order--by-{by}-class-{class}-year-{year}-letter--area--lang-.html',
url: '/vod-list-id-fyclass-pg-fypage-order-fyfilter-area--lang-.html',
filterable: 1, //是否启用分类筛选,
filter_url: '-by-{{fl.by}}-class-{{fl.class}}-year-{{fl.year}}-letter-{{fl.letter}}',
filter: {
"1": [{
"key": "class",
"name": "剧情",
"value": [{
"n": "全部",
"v": ""
}, {
"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": "14"
}, {
"n": "推理",
"v": "13"
}, {
"n": "魔法",
"v": "12"
}, {
"n": "神魔",
"v": "11"
}, {
"n": "治愈",
"v": "10"
}, {
"n": "竞技",
"v": "59"
}, {
"n": "悬疑",
"v": "60"
}, {
"n": "战争",
"v": "62"
}, {
"n": "萝莉",
"v": "63"
}, {
"n": "魔幻",
"v": "64"
}, {
"n": "战斗",
"v": "65"
}, {
"n": "歌舞",
"v": "98"
}, {
"n": "历史",
"v": "99"
}, {
"n": "励志",
"v": "108"
}, {
"n": "偶像",
"v": "118"
}, {
"n": "职场",
"v": "121"
}]
}, {
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}, {
"n": "2003",
"v": "2003"
}, {
"n": "2002",
"v": "2002"
}, {
"n": "2001",
"v": "2001"
}, {
"n": "2000",
"v": "2000"
}]
}, {
"key": "letter",
"name": "字母",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "A"
}, {
"n": "B",
"v": "B"
}, {
"n": "C",
"v": "C"
}, {
"n": "D",
"v": "D"
}, {
"n": "E",
"v": "E"
}, {
"n": "F",
"v": "F"
}, {
"n": "G",
"v": "G"
}, {
"n": "H",
"v": "H"
}, {
"n": "I",
"v": "I"
}, {
"n": "J",
"v": "J"
}, {
"n": "K",
"v": "K"
}, {
"n": "L",
"v": "L"
}, {
"n": "M",
"v": "M"
}, {
"n": "N",
"v": "N"
}, {
"n": "O",
"v": "O"
}, {
"n": "P",
"v": "P"
}, {
"n": "Q",
"v": "Q"
}, {
"n": "R",
"v": "R"
}, {
"n": "S",
"v": "S"
}, {
"n": "T",
"v": "T"
}, {
"n": "U",
"v": "U"
}, {
"n": "V",
"v": "V"
}, {
"n": "W",
"v": "W"
}, {
"n": "X",
"v": "X"
}, {
"n": "Y",
"v": "Y"
}, {
"n": "Z",
"v": "Z"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "更新",
"v": "time"
}, {
"n": "得分",
"v": "score"
}, {
"n": "总排行",
"v": "hits"
}]
}],
"3": [{
"key": "class",
"name": "剧情",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "冒险",
"v": "36"
}, {
"n": "热血",
"v": "37"
}, {
"n": "奇幻",
"v": "38"
}, {
"n": "恋爱",
"v": "39"
}, {
"n": "恋爱",
"v": "40"
}, {
"n": "恋爱",
"v": "40"
}, {
"n": "搞笑",
"v": "42"
}, {
"n": "治愈",
"v": "43"
}, {
"n": "神魔",
"v": "44"
}, {
"n": "魔法",
"v": "45"
}, {
"n": "百合",
"v": "46"
}, {
"n": "推理",
"v": "47"
}, {
"n": "科幻",
"v": "48"
}, {
"n": "竞技",
"v": "49"
}, {
"n": "悬疑",
"v": "66"
}, {
"n": "战争",
"v": "68"
}, {
"n": "萝莉",
"v": "69"
}, {
"n": "魔幻",
"v": "70"
}, {
"n": "战斗",
"v": "71"
}, {
"n": "青春",
"v": "72"
}, {
"n": "历史",
"v": "100"
}, {
"n": "歌舞",
"v": "101"
}, {
"n": "恐怖",
"v": "104"
}, {
"n": "职场",
"v": "107"
}, {
"n": "励志",
"v": "109"
}, {
"n": "偶像",
"v": "119"
}]
}, {
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}, {
"n": "2003",
"v": "2003"
}, {
"n": "2002",
"v": "2002"
}, {
"n": "2001",
"v": "2001"
}, {
"n": "2000",
"v": "2000"
}]
}, {
"key": "letter",
"name": "字母",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "A"
}, {
"n": "B",
"v": "B"
}, {
"n": "C",
"v": "C"
}, {
"n": "D",
"v": "D"
}, {
"n": "E",
"v": "E"
}, {
"n": "F",
"v": "F"
}, {
"n": "G",
"v": "G"
}, {
"n": "H",
"v": "H"
}, {
"n": "I",
"v": "I"
}, {
"n": "J",
"v": "J"
}, {
"n": "K",
"v": "K"
}, {
"n": "L",
"v": "L"
}, {
"n": "M",
"v": "M"
}, {
"n": "N",
"v": "N"
}, {
"n": "O",
"v": "O"
}, {
"n": "P",
"v": "P"
}, {
"n": "Q",
"v": "Q"
}, {
"n": "R",
"v": "R"
}, {
"n": "S",
"v": "S"
}, {
"n": "T",
"v": "T"
}, {
"n": "U",
"v": "U"
}, {
"n": "V",
"v": "V"
}, {
"n": "W",
"v": "W"
}, {
"n": "X",
"v": "X"
}, {
"n": "Y",
"v": "Y"
}, {
"n": "Z",
"v": "Z"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "更新",
"v": "time"
}, {
"n": "得分",
"v": "score"
}, {
"n": "总排行",
"v": "hits"
}]
}],
"4": [{
"key": "class",
"name": "剧情",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "冒险",
"v": "50"
}, {
"n": "热血",
"v": "51"
}, {
"n": "武侠",
"v": "52"
}, {
"n": "奇幻",
"v": "53"
}, {
"n": "玄幻",
"v": "54"
}, {
"n": "竞技",
"v": "55"
}, {
"n": "魔幻",
"v": "56"
}, {
"n": "科幻",
"v": "57"
}, {
"n": "恋爱",
"v": "58"
}, {
"n": "历史",
"v": "73"
}, {
"n": "战斗",
"v": "74"
}, {
"n": "搞笑",
"v": "75"
}, {
"n": "神魔",
"v": "76"
}, {
"n": "战争",
"v": "97"
}, {
"n": "古风",
"v": "111"
}, {
"n": "少女",
"v": "112"
}, {
"n": "萝莉",
"v": "113"
}, {
"n": "治愈",
"v": "114"
}, {
"n": "日常",
"v": "115"
}, {
"n": "歌舞",
"v": "116"
}, {
"n": "偶像",
"v": "120"
}, {
"n": "职场",
"v": "123"
}, {
"n": "仙侠",
"v": "125"
}]
}, {
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}, {
"n": "2003",
"v": "2003"
}, {
"n": "2002",
"v": "2002"
}, {
"n": "2001",
"v": "2001"
}, {
"n": "2000",
"v": "2000"
}]
}, {
"key": "letter",
"name": "字母",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "A"
}, {
"n": "B",
"v": "B"
}, {
"n": "C",
"v": "C"
}, {
"n": "D",
"v": "D"
}, {
"n": "E",
"v": "E"
}, {
"n": "F",
"v": "F"
}, {
"n": "G",
"v": "G"
}, {
"n": "H",
"v": "H"
}, {
"n": "I",
"v": "I"
}, {
"n": "J",
"v": "J"
}, {
"n": "K",
"v": "K"
}, {
"n": "L",
"v": "L"
}, {
"n": "M",
"v": "M"
}, {
"n": "N",
"v": "N"
}, {
"n": "O",
"v": "O"
}, {
"n": "P",
"v": "P"
}, {
"n": "Q",
"v": "Q"
}, {
"n": "R",
"v": "R"
}, {
"n": "S",
"v": "S"
}, {
"n": "T",
"v": "T"
}, {
"n": "U",
"v": "U"
}, {
"n": "V",
"v": "V"
}, {
"n": "W",
"v": "W"
}, {
"n": "X",
"v": "X"
}, {
"n": "Y",
"v": "Y"
}, {
"n": "Z",
"v": "Z"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "更新",
"v": "time"
}, {
"n": "得分",
"v": "score"
}, {
"n": "总排行",
"v": "hits"
}]
}],
"16": [{
"key": "class",
"name": "剧情",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "冒险",
"v": "77"
}, {
"n": "热血",
"v": "78"
}, {
"n": "奇幻",
"v": "79"
}, {
"n": "恋爱",
"v": "80"
}, {
"n": "校园",
"v": "81"
}, {
"n": "后宫",
"v": "82"
}, {
"n": "搞笑",
"v": "83"
}, {
"n": "青春",
"v": "84"
}, {
"n": "百合",
"v": "85"
}, {
"n": "治愈",
"v": "86"
}, {
"n": "神魔",
"v": "87"
}, {
"n": "魔法",
"v": "88"
}, {
"n": "推理",
"v": "89"
}, {
"n": "科幻",
"v": "90"
}, {
"n": "竞技",
"v": "91"
}, {
"n": "悬疑",
"v": "92"
}, {
"n": "战争",
"v": "93"
}, {
"n": "萝莉",
"v": "94"
}, {
"n": "魔幻",
"v": "95"
}, {
"n": "战斗",
"v": "96"
}, {
"n": "历史",
"v": "102"
}, {
"n": "歌舞",
"v": "103"
}, {
"n": "恐怖",
"v": "105"
}, {
"n": "职场",
"v": "106"
}, {
"n": "励志",
"v": "110"
}, {
"n": "偶像",
"v": "117"
}, {
"n": "职场",
"v": "124"
}]
}, {
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}, {
"n": "2003",
"v": "2003"
}, {
"n": "2002",
"v": "2002"
}, {
"n": "2001",
"v": "2001"
}, {
"n": "2000",
"v": "2000"
}]
}, {
"key": "letter",
"name": "字母",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "A",
"v": "A"
}, {
"n": "B",
"v": "B"
}, {
"n": "C",
"v": "C"
}, {
"n": "D",
"v": "D"
}, {
"n": "E",
"v": "E"
}, {
"n": "F",
"v": "F"
}, {
"n": "G",
"v": "G"
}, {
"n": "H",
"v": "H"
}, {
"n": "I",
"v": "I"
}, {
"n": "J",
"v": "J"
}, {
"n": "K",
"v": "K"
}, {
"n": "L",
"v": "L"
}, {
"n": "M",
"v": "M"
}, {
"n": "N",
"v": "N"
}, {
"n": "O",
"v": "O"
}, {
"n": "P",
"v": "P"
}, {
"n": "Q",
"v": "Q"
}, {
"n": "R",
"v": "R"
}, {
"n": "S",
"v": "S"
}, {
"n": "T",
"v": "T"
}, {
"n": "U",
"v": "U"
}, {
"n": "V",
"v": "V"
}, {
"n": "W",
"v": "W"
}, {
"n": "X",
"v": "X"
}, {
"n": "Y",
"v": "Y"
}, {
"n": "Z",
"v": "Z"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "更新",
"v": "time"
}, {
"n": "得分",
"v": "score"
}, {
"n": "总排行",
"v": "hits"
}]
}]
},
searchUrl: '/search-pg-fypage-wd-**.html',
searchable: 2, //是否启用全局搜索,
quickSearch: 0, //是否启用快速搜索,
headers: {
'User-Agent': 'PC_UA',
},
class_parse: '.secNacUl li;a&&Text;a&&href;.*/(\\d+)-1.html',
play_parse: true,
lazy: '',
limit: 6,
推荐: '.c1_l_wap_contact li;*;img&&src;.time:eq(0)&&Text;*',
一级: '.list3_cn_box .cn_box2;a&&title;.list_pic&&src;.list_20 li:eq(1) span&&Text;a&&href',
二级: {
"title": "h1&&Text;.o_r_contact&&li:eq(0)&&Text",
"img": ".o_big_img_bg_b img&&src",
"desc": ".o_r_contact&&li:eq(6)&&Text;.o_r_contact&&li:eq(5)&&Text;.o_r_contact&&li:eq(3)&&Text;.o_r_contact&&li:eq(2)&&Text;.o_r_contact&&li:eq(1)&&Text",
"content": ".des_box&&Text",
"tabs": ".from-tabs&&label",
"lists": ".mn_list_li_movie:eq(#id) li"
},
搜索: '*',
}
+1127
View File
@@ -0,0 +1,1127 @@
muban.vfed.二级.title = 'h1&&Text;.fed-col-md3--span:eq(0)&&Text';
muban.vfed.二级.desc = '.fed-col-md3:eq(3)&&Text;;;.fed-col-md6:eq(0)&&Text;.fed-col-md6--span:eq(1)&&Text';
var rule = {
title: '去看吧',
模板: 'vfed',
host: 'https://www.k9dm.com',
// url: '/index.php/vod/show/id/fyclass/page/fypage.html',
url: '/index.php/vod/show/id/fyclassfyfilter.html',
filterable: 1, //是否启用分类筛选,
filter_url: '{{fl.area}}{{fl.by}}{{fl.class}}/page/fypage{{fl.year}}',
filter: {
"33": [{
"key": "class",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "经典",
"v": "/class/经典"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "催泪",
"v": "/class/催泪"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "猎奇",
"v": "/class/猎奇"
}, {
"n": "励志",
"v": "/class/励志"
}, {
"n": "战斗",
"v": "/class/战斗"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "机战",
"v": "/class/机战"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "校园",
"v": "/class/校园"
}, {
"n": "运动",
"v": "/class/运动"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "历史",
"v": "/class/历史"
}, {
"n": "伪娘",
"v": "/class/伪娘"
}, {
"n": "美少女",
"v": "/class/美少女"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "亲子",
"v": "/class/亲子"
}, {
"n": "青春",
"v": "/class/青春"
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "竞技",
"v": "/class/竞技"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}, {
"n": "2007",
"v": "/year/2007"
}, {
"n": "2006",
"v": "/year/2006"
}, {
"n": "2005",
"v": "/year/2005"
}, {
"n": "2004",
"v": "/year/2004"
}, {
"n": "2003",
"v": "/year/2003"
}, {
"n": "2002",
"v": "/year/2002"
}, {
"n": "2001",
"v": "/year/2001"
}, {
"n": "2000",
"v": "/year/2000"
}, {
"n": "1999",
"v": "/year/1999"
}, {
"n": "1998",
"v": "/year/1998"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}],
"21": [{
"key": "class",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "经典",
"v": "/class/经典"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "催泪",
"v": "/class/催泪"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "猎奇",
"v": "/class/猎奇"
}, {
"n": "励志",
"v": "/class/励志"
}, {
"n": "战斗",
"v": "/class/战斗"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "机战",
"v": "/class/机战"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "校园",
"v": "/class/校园"
}, {
"n": "运动",
"v": "/class/运动"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "历史",
"v": "/class/历史"
}, {
"n": "伪娘",
"v": "/class/伪娘"
}, {
"n": "美少女",
"v": "/class/美少女"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "亲子",
"v": "/class/亲子"
}, {
"n": "青春",
"v": "/class/青春"
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "竞技",
"v": "/class/竞技"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "大陆",
"v": "/area/大陆"
}, {
"n": "美国",
"v": "/area/美国"
}, {
"n": "韩国",
"v": "/area/韩国"
}, {
"n": "日本",
"v": "/area/日本"
}, {
"n": "泰国",
"v": "/area/泰国"
}, {
"n": "新加坡",
"v": "/area/新加坡"
}, {
"n": "马来西亚",
"v": "/area/马来西亚"
}, {
"n": "印度",
"v": "/area/印度"
}, {
"n": "英国",
"v": "/area/英国"
}, {
"n": "法国",
"v": "/area/法国"
}, {
"n": "加拿大",
"v": "/area/加拿大"
}, {
"n": "西班牙",
"v": "/area/西班牙"
}, {
"n": "俄罗斯",
"v": "/area/俄罗斯"
}, {
"n": "其它",
"v": "/area/其它"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}, {
"n": "2007",
"v": "/year/2007"
}, {
"n": "2006",
"v": "/year/2006"
}, {
"n": "2005",
"v": "/year/2005"
}, {
"n": "2004",
"v": "/year/2004"
}, {
"n": "2003",
"v": "/year/2003"
}, {
"n": "2002",
"v": "/year/2002"
}, {
"n": "2001",
"v": "/year/2001"
}, {
"n": "2000",
"v": "/year/2000"
}, {
"n": "1999",
"v": "/year/1999"
}, {
"n": "1998",
"v": "/year/1998"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}],
"50": [{
"key": "class",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "经典",
"v": "/class/经典"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "催泪",
"v": "/class/催泪"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "猎奇",
"v": "/class/猎奇"
}, {
"n": "励志",
"v": "/class/励志"
}, {
"n": "战斗",
"v": "/class/战斗"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "机战",
"v": "/class/机战"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "校园",
"v": "/class/校园"
}, {
"n": "运动",
"v": "/class/运动"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "历史",
"v": "/class/历史"
}, {
"n": "伪娘",
"v": "/class/伪娘"
}, {
"n": "美少女",
"v": "/class/美少女"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "亲子",
"v": "/class/亲子"
}, {
"n": "青春",
"v": "/class/青春"
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "竞技",
"v": "/class/竞技"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "大陆",
"v": "/area/大陆"
}, {
"n": "美国",
"v": "/area/美国"
}, {
"n": "韩国",
"v": "/area/韩国"
}, {
"n": "日本",
"v": "/area/日本"
}, {
"n": "泰国",
"v": "/area/泰国"
}, {
"n": "新加坡",
"v": "/area/新加坡"
}, {
"n": "马来西亚",
"v": "/area/马来西亚"
}, {
"n": "印度",
"v": "/area/印度"
}, {
"n": "英国",
"v": "/area/英国"
}, {
"n": "法国",
"v": "/area/法国"
}, {
"n": "加拿大",
"v": "/area/加拿大"
}, {
"n": "西班牙",
"v": "/area/西班牙"
}, {
"n": "俄罗斯",
"v": "/area/俄罗斯"
}, {
"n": "其它",
"v": "/area/其它"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}, {
"n": "2007",
"v": "/year/2007"
}, {
"n": "2006",
"v": "/year/2006"
}, {
"n": "2005",
"v": "/year/2005"
}, {
"n": "2004",
"v": "/year/2004"
}, {
"n": "2003",
"v": "/year/2003"
}, {
"n": "2002",
"v": "/year/2002"
}, {
"n": "2001",
"v": "/year/2001"
}, {
"n": "2000",
"v": "/year/2000"
}, {
"n": "1999",
"v": "/year/1999"
}, {
"n": "1998",
"v": "/year/1998"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}],
"24": [{
"key": "class",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "经典",
"v": "/class/经典"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "催泪",
"v": "/class/催泪"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "猎奇",
"v": "/class/猎奇"
}, {
"n": "励志",
"v": "/class/励志"
}, {
"n": "战斗",
"v": "/class/战斗"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "机战",
"v": "/class/机战"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "校园",
"v": "/class/校园"
}, {
"n": "运动",
"v": "/class/运动"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "历史",
"v": "/class/历史"
}, {
"n": "伪娘",
"v": "/class/伪娘"
}, {
"n": "美少女",
"v": "/class/美少女"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "亲子",
"v": "/class/亲子"
}, {
"n": "青春",
"v": "/class/青春"
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "竞技",
"v": "/class/竞技"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "大陆",
"v": "/area/大陆"
}, {
"n": "美国",
"v": "/area/美国"
}, {
"n": "韩国",
"v": "/area/韩国"
}, {
"n": "日本",
"v": "/area/日本"
}, {
"n": "泰国",
"v": "/area/泰国"
}, {
"n": "新加坡",
"v": "/area/新加坡"
}, {
"n": "马来西亚",
"v": "/area/马来西亚"
}, {
"n": "印度",
"v": "/area/印度"
}, {
"n": "英国",
"v": "/area/英国"
}, {
"n": "法国",
"v": "/area/法国"
}, {
"n": "加拿大",
"v": "/area/加拿大"
}, {
"n": "西班牙",
"v": "/area/西班牙"
}, {
"n": "俄罗斯",
"v": "/area/俄罗斯"
}, {
"n": "其它",
"v": "/area/其它"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}, {
"n": "2007",
"v": "/year/2007"
}, {
"n": "2006",
"v": "/year/2006"
}, {
"n": "2005",
"v": "/year/2005"
}, {
"n": "2004",
"v": "/year/2004"
}, {
"n": "2003",
"v": "/year/2003"
}, {
"n": "2002",
"v": "/year/2002"
}, {
"n": "2001",
"v": "/year/2001"
}, {
"n": "2000",
"v": "/year/2000"
}, {
"n": "1999",
"v": "/year/1999"
}, {
"n": "1998",
"v": "/year/1998"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}],
"22": [{
"key": "class",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "经典",
"v": "/class/经典"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "催泪",
"v": "/class/催泪"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "猎奇",
"v": "/class/猎奇"
}, {
"n": "励志",
"v": "/class/励志"
}, {
"n": "战斗",
"v": "/class/战斗"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "机战",
"v": "/class/机战"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "校园",
"v": "/class/校园"
}, {
"n": "运动",
"v": "/class/运动"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "历史",
"v": "/class/历史"
}, {
"n": "伪娘",
"v": "/class/伪娘"
}, {
"n": "美少女",
"v": "/class/美少女"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "亲子",
"v": "/class/亲子"
}, {
"n": "青春",
"v": "/class/青春"
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "竞技",
"v": "/class/竞技"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "日本",
"v": "/area/日本"
}, {
"n": "欧美",
"v": "/area/欧美"
}, {
"n": "其他",
"v": "/area/其他"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}, {
"n": "2007",
"v": "/year/2007"
}, {
"n": "2006",
"v": "/year/2006"
}, {
"n": "2005",
"v": "/year/2005"
}, {
"n": "2004",
"v": "/year/2004"
}, {
"n": "2003",
"v": "/year/2003"
}, {
"n": "2002",
"v": "/year/2002"
}, {
"n": "2001",
"v": "/year/2001"
}, {
"n": "2000",
"v": "/year/2000"
}, {
"n": "1999",
"v": "/year/1999"
}, {
"n": "1998",
"v": "/year/1998"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}]
},
class_parse: '.fed-pops-list:eq(0)&&li:gt(0):lt(6);a&&Text;a&&href;.*/(.*?).html',
}
+119
View File
@@ -0,0 +1,119 @@
/**
* 央视频 1080P
* 作者:deepseek
* 版本:1.0
* 最后更新:2026-1-2 02:46:31
* 发布页 https://m.yangshipin.cn/
* @config
* debug: true
* blockList: *.[ico|png|jpeg|jpg|gif|webp]*
*/
/**
* 初始化配置
*/
async function init(cfg) {
return {};
}
/**
* 首页分类
*/
async function homeContent(filter) {
return {
class: [
{ type_id: "1", type_name: "央视" },
{ type_id: "2", type_name: "卫视" }
]
};
}
/**
* 首页推荐视频
*/
async function homeVideoContent() {
return {
list: []
};
}
/**
* 分类内容
*/
async function categoryContent(tid, pg, filter, extend) {
const res = await Java.req('https://h5access.yangshipin.cn/web/tv_web_share?raw=1&pid=600002485');
const jsonData = JSON.parse(res.body);
const pidInfo = jsonData?.data?.pidInfo || [];
const isCentralTV = (name) => name.startsWith('CCTV') || name.startsWith('CGTN');
const vods = pidInfo
.filter(item => {
if (item.vipInfo?.isVip !== false) return false;
if (!item.pid || !item.channelName) return false;
const isCentral = isCentralTV(item.channelName);
return tid === '1' ? isCentral : !isCentral;
})
.map(item => {
const isCentral = isCentralTV(item.channelName);
const vodPic = item.audioPosterUrl;
return {
vod_id: item.pid,
vod_name: item.channelName,
vod_pic: vodPic,
action: item.pid,
style: { type: "rect", ratio: isCentral ? 1.66 : 1 }
};
})
.filter(item => item.vod_pic);
return {
code: 1,
msg: "数据列表",
list: vods,
page: 1,
pagecount: 1,
limit: vods.length,
total: vods.length
};
}
/**
* 详情页
*/
async function detailContent(ids) {
return {
list: []
};
}
async function action(pid) {
Java.wvPlayerSetAllowInteraction(false); // 是否允许操作, true为允许.会禁用音量手势
Java.wvPlayerSetScale(0); //画面比例: 0=默认, 1=16:9, 2=4:3, 3=填充, 4=原始, 5=裁剪
// Java.wvPlayerSetVolume(90); // 初始音量
Java.wvPlayer({
url: 'https://yangshipin.cn/tv/home?pid=' + pid,
headers: {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36'
}
});
}
/**
* 搜索
*/
async function searchContent(key, quick, pg) {
return {
list: []
};
}
/**
* 播放器
*/
async function playerContent(flag, id, vipFlags) {
return;
}
+1164
View File
@@ -0,0 +1,1164 @@
var rule = {
title: '奇米动漫',
host: 'http://www.qimiqimi.net',
url: '/show/fyclassfyfilter.html',
filterable: 1, //是否启用分类筛选,
filter_url: '{{fl.area}}{{fl.by}}{{fl.class}}{{fl.letter}}/page/fypage{{fl.year}}',
filter: {
"xinfan": [{
"key": "class",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "校园",
"v": "/class/校园"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "神魔",
"v": "/class/神魔"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "竞技",
"v": "/class/竞技"
}, {
"n": "悬疑",
"v": "/class/悬疑"
}, {
"n": "青春",
"v": "/class/青春"
}, {
"n": "战争",
"v": "/class/战争"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "魔幻",
"v": "/class/魔幻"
}, {
"n": "战斗",
"v": "/class/战斗"
}, {
"n": "日常",
"v": "/class/日常"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "日本",
"v": "/area/日本/"
}, {
"n": "大陆",
"v": "/area/中国/"
}, {
"n": "欧美",
"v": "/area/欧美/"
}, {
"n": "韩国",
"v": "/area/韩国/"
}, {
"n": "港台",
"v": "/area/港台/"
}]
}, {
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}, {
"n": "2007",
"v": "/year/2007"
}, {
"n": "2006",
"v": "/year/2006"
}, {
"n": "2005",
"v": "/year/2005"
}, {
"n": "2004",
"v": "/year/2004"
}, {
"n": "2003",
"v": "/year/2003"
}, {
"n": "2002",
"v": "/year/2002"
}, {
"n": "2001",
"v": "/year/2001"
}, {
"n": "2000",
"v": "/year/2000"
}]
}, {
"key": "letter",
"name": "字母",
"value": [{
"n": "字母",
"v": ""
}, {
"n": "A",
"v": "/letter/A"
}, {
"n": "B",
"v": "/letter/B"
}, {
"n": "C",
"v": "/letter/C"
}, {
"n": "D",
"v": "/letter/D"
}, {
"n": "E",
"v": "/letter/E"
}, {
"n": "F",
"v": "/letter/F"
}, {
"n": "G",
"v": "/letter/G"
}, {
"n": "H",
"v": "/letter/H"
}, {
"n": "I",
"v": "/letter/I"
}, {
"n": "J",
"v": "/letter/J"
}, {
"n": "K",
"v": "/letter/K"
}, {
"n": "L",
"v": "/letter/L"
}, {
"n": "M",
"v": "/letter/M"
}, {
"n": "N",
"v": "/letter/N"
}, {
"n": "O",
"v": "/letter/O"
}, {
"n": "P",
"v": "/letter/P"
}, {
"n": "Q",
"v": "/letter/Q"
}, {
"n": "R",
"v": "/letter/R"
}, {
"n": "S",
"v": "/letter/S"
}, {
"n": "T",
"v": "/letter/T"
}, {
"n": "U",
"v": "/letter/U"
}, {
"n": "V",
"v": "/letter/V"
}, {
"n": "W",
"v": "/letter/W"
}, {
"n": "X",
"v": "/letter/X"
}, {
"n": "Y",
"v": "/letter/Y"
}, {
"n": "Z",
"v": "/letter/Z"
}, {
"n": "0-9",
"v": "/letter/0-9"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}],
"riman": [{
"key": "class",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "校园",
"v": "/class/校园"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "神魔",
"v": "/class/神魔"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "竞技",
"v": "/class/竞技"
}, {
"n": "悬疑",
"v": "/class/悬疑"
}, {
"n": "青春",
"v": "/class/青春"
}, {
"n": "战争",
"v": "/class/战争"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "魔幻",
"v": "/class/魔幻"
}, {
"n": "战斗",
"v": "/class/战斗"
}, {
"n": "日常",
"v": "/class/日常"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "日本",
"v": "/area/日本/"
}, {
"n": "大陆",
"v": "/area/中国/"
}, {
"n": "欧美",
"v": "/area/欧美/"
}, {
"n": "韩国",
"v": "/area/韩国/"
}, {
"n": "港台",
"v": "/area/港台/"
}]
}, {
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}, {
"n": "2007",
"v": "/year/2007"
}, {
"n": "2006",
"v": "/year/2006"
}, {
"n": "2005",
"v": "/year/2005"
}, {
"n": "2004",
"v": "/year/2004"
}, {
"n": "2003",
"v": "/year/2003"
}, {
"n": "2002",
"v": "/year/2002"
}, {
"n": "2001",
"v": "/year/2001"
}, {
"n": "2000",
"v": "/year/2000"
}]
}, {
"key": "letter",
"name": "字母",
"value": [{
"n": "字母",
"v": ""
}, {
"n": "A",
"v": "/letter/A"
}, {
"n": "B",
"v": "/letter/B"
}, {
"n": "C",
"v": "/letter/C"
}, {
"n": "D",
"v": "/letter/D"
}, {
"n": "E",
"v": "/letter/E"
}, {
"n": "F",
"v": "/letter/F"
}, {
"n": "G",
"v": "/letter/G"
}, {
"n": "H",
"v": "/letter/H"
}, {
"n": "I",
"v": "/letter/I"
}, {
"n": "J",
"v": "/letter/J"
}, {
"n": "K",
"v": "/letter/K"
}, {
"n": "L",
"v": "/letter/L"
}, {
"n": "M",
"v": "/letter/M"
}, {
"n": "N",
"v": "/letter/N"
}, {
"n": "O",
"v": "/letter/O"
}, {
"n": "P",
"v": "/letter/P"
}, {
"n": "Q",
"v": "/letter/Q"
}, {
"n": "R",
"v": "/letter/R"
}, {
"n": "S",
"v": "/letter/S"
}, {
"n": "T",
"v": "/letter/T"
}, {
"n": "U",
"v": "/letter/U"
}, {
"n": "V",
"v": "/letter/V"
}, {
"n": "W",
"v": "/letter/W"
}, {
"n": "X",
"v": "/letter/X"
}, {
"n": "Y",
"v": "/letter/Y"
}, {
"n": "Z",
"v": "/letter/Z"
}, {
"n": "0-9",
"v": "/letter/0-9"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}],
"guoman": [{
"key": "class",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "校园",
"v": "/class/校园"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "神魔",
"v": "/class/神魔"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "竞技",
"v": "/class/竞技"
}, {
"n": "悬疑",
"v": "/class/悬疑"
}, {
"n": "青春",
"v": "/class/青春"
}, {
"n": "战争",
"v": "/class/战争"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "魔幻",
"v": "/class/魔幻"
}, {
"n": "战斗",
"v": "/class/战斗"
}, {
"n": "日常",
"v": "/class/日常"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "日本",
"v": "/area/日本/"
}, {
"n": "大陆",
"v": "/area/中国/"
}, {
"n": "欧美",
"v": "/area/欧美/"
}, {
"n": "韩国",
"v": "/area/韩国/"
}, {
"n": "港台",
"v": "/area/港台/"
}]
}, {
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}, {
"n": "2007",
"v": "/year/2007"
}, {
"n": "2006",
"v": "/year/2006"
}, {
"n": "2005",
"v": "/year/2005"
}, {
"n": "2004",
"v": "/year/2004"
}, {
"n": "2003",
"v": "/year/2003"
}, {
"n": "2002",
"v": "/year/2002"
}, {
"n": "2001",
"v": "/year/2001"
}, {
"n": "2000",
"v": "/year/2000"
}]
}, {
"key": "letter",
"name": "字母",
"value": [{
"n": "字母",
"v": ""
}, {
"n": "A",
"v": "/letter/A"
}, {
"n": "B",
"v": "/letter/B"
}, {
"n": "C",
"v": "/letter/C"
}, {
"n": "D",
"v": "/letter/D"
}, {
"n": "E",
"v": "/letter/E"
}, {
"n": "F",
"v": "/letter/F"
}, {
"n": "G",
"v": "/letter/G"
}, {
"n": "H",
"v": "/letter/H"
}, {
"n": "I",
"v": "/letter/I"
}, {
"n": "J",
"v": "/letter/J"
}, {
"n": "K",
"v": "/letter/K"
}, {
"n": "L",
"v": "/letter/L"
}, {
"n": "M",
"v": "/letter/M"
}, {
"n": "N",
"v": "/letter/N"
}, {
"n": "O",
"v": "/letter/O"
}, {
"n": "P",
"v": "/letter/P"
}, {
"n": "Q",
"v": "/letter/Q"
}, {
"n": "R",
"v": "/letter/R"
}, {
"n": "S",
"v": "/letter/S"
}, {
"n": "T",
"v": "/letter/T"
}, {
"n": "U",
"v": "/letter/U"
}, {
"n": "V",
"v": "/letter/V"
}, {
"n": "W",
"v": "/letter/W"
}, {
"n": "X",
"v": "/letter/X"
}, {
"n": "Y",
"v": "/letter/Y"
}, {
"n": "Z",
"v": "/letter/Z"
}, {
"n": "0-9",
"v": "/letter/0-9"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}],
"jcdm": [{
"key": "class",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "校园",
"v": "/class/校园"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "神魔",
"v": "/class/神魔"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "竞技",
"v": "/class/竞技"
}, {
"n": "悬疑",
"v": "/class/悬疑"
}, {
"n": "青春",
"v": "/class/青春"
}, {
"n": "战争",
"v": "/class/战争"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "魔幻",
"v": "/class/魔幻"
}, {
"n": "战斗",
"v": "/class/战斗"
}, {
"n": "日常",
"v": "/class/日常"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "日本",
"v": "/area/日本/"
}, {
"n": "大陆",
"v": "/area/中国/"
}, {
"n": "欧美",
"v": "/area/欧美/"
}, {
"n": "韩国",
"v": "/area/韩国/"
}, {
"n": "港台",
"v": "/area/港台/"
}]
}, {
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}, {
"n": "2007",
"v": "/year/2007"
}, {
"n": "2006",
"v": "/year/2006"
}, {
"n": "2005",
"v": "/year/2005"
}, {
"n": "2004",
"v": "/year/2004"
}, {
"n": "2003",
"v": "/year/2003"
}, {
"n": "2002",
"v": "/year/2002"
}, {
"n": "2001",
"v": "/year/2001"
}, {
"n": "2000",
"v": "/year/2000"
}]
}, {
"key": "letter",
"name": "字母",
"value": [{
"n": "字母",
"v": ""
}, {
"n": "A",
"v": "/letter/A"
}, {
"n": "B",
"v": "/letter/B"
}, {
"n": "C",
"v": "/letter/C"
}, {
"n": "D",
"v": "/letter/D"
}, {
"n": "E",
"v": "/letter/E"
}, {
"n": "F",
"v": "/letter/F"
}, {
"n": "G",
"v": "/letter/G"
}, {
"n": "H",
"v": "/letter/H"
}, {
"n": "I",
"v": "/letter/I"
}, {
"n": "J",
"v": "/letter/J"
}, {
"n": "K",
"v": "/letter/K"
}, {
"n": "L",
"v": "/letter/L"
}, {
"n": "M",
"v": "/letter/M"
}, {
"n": "N",
"v": "/letter/N"
}, {
"n": "O",
"v": "/letter/O"
}, {
"n": "P",
"v": "/letter/P"
}, {
"n": "Q",
"v": "/letter/Q"
}, {
"n": "R",
"v": "/letter/R"
}, {
"n": "S",
"v": "/letter/S"
}, {
"n": "T",
"v": "/letter/T"
}, {
"n": "U",
"v": "/letter/U"
}, {
"n": "V",
"v": "/letter/V"
}, {
"n": "W",
"v": "/letter/W"
}, {
"n": "X",
"v": "/letter/X"
}, {
"n": "Y",
"v": "/letter/Y"
}, {
"n": "Z",
"v": "/letter/Z"
}, {
"n": "0-9",
"v": "/letter/0-9"
}]
}, {
"key": "by",
"name": "排序",
"value": [{
"n": "时间",
"v": "/by/time"
}, {
"n": "人气",
"v": "/by/hits"
}, {
"n": "评分",
"v": "/by/score"
}]
}]
},
searchable: 2, //是否启用全局搜索,
headers: { //网站的请求头,完整支持所有的,常带ua和cookies
'User-Agent': 'PC_UA',
},
class_parse: '#nav li;a&&Text;a&&href;.*/(\\w+).html',
cate_exclude: '番组专题|最近更新',
play_parse: true,
lazy: `js:
var html = JSON.parse(request(input).match(/r player_.*?=(.*?)</)[1]);
var url = html.url;
if (html.encrypt == '1') {
url = unescape(url)
} else if (html.encrypt == '2') {
url = unescape(base64Decode(url))
}
if (/\\.m3u8|\\.mp4/.test(url)) {
input = {
jx: 0,
url: url,
parse: 0
}
} else {
input
}
`,
limit: 6,
推荐: '*;*;*;.text&&Text;*',
一级: '.img-list li;a&&title;img&&src;i&&Text;a&&href',
二级: {
"title": "h1&&Text;dl.fn-left:eq(3)&&Text",
"img": ".detail-pic&&img&&src",
"desc": "dl.fn-left:eq(2)&&Text;;;.nyzhuy--dt&&Text;.fn-right:eq(0)--dt&&Text",
"content": ".tjuqing&&Text",
"tabs": ".down-title h2",
"lists": ".video_list:eq(#id) a"
},
searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50',
detailUrl: '/detail/fyid.html', //非必填,二级详情拼接链接
搜索: 'json:list;name;pic;;id',
}
+29
View File
@@ -0,0 +1,29 @@
var rule = {
title: '好看动漫',
host: 'https://www.youjiula.com/',
url: 'https://www.youjiula.com/youjiu/fyclass-fypage.html',
searchUrl: 'https://www.youjiula.com/search.php?page=fypage&searchword=**&searchtype=',
searchable: 2, //是否启用全局搜索,
quickSearch: 0, //是否启用快速搜索,
filterable: 0, //是否启用分类筛选,
headers: {
'User-Agent': 'UC_UA', // "Cookie": ""
}, // class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html',
play_parse: true,
lazy: '',
limit: 6,
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
double: true, // 推荐内容是否双层定位
一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
二级: {
"title": ".stui-content__detail .title&&Text;.stui-content__detail p:eq(-2)&&Text",
"img": ".stui-content__thumb .lazyload&&data-original",
"desc": ".stui-content__detail p:eq(0)&&Text;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text",
"content": "#desc&&Text",
"tabs": ".stui-pannel-box h3",
"lists": ".stui-content__playlist:eq(#id) li"
},
搜索: 'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
}
+162
View File
@@ -0,0 +1,162 @@
// 本资源来源于互联网公开渠道,仅可用于个人学习爬虫技术。
// 严禁将其用于任何商业用途,下载后请于 24 小时内删除,搜索结果均来自源站,本人不承担任何责任。
let host = 'https://film.symx.club';
const headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36',
'Accept': 'application/json, text/plain, */*',
'accept-language': 'zh-CN,zh;q=0.9',
'cache-control': 'no-cache',
'pragma': 'no-cache',
'priority': 'u=1, i',
'sec-ch-ua': '"Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin',
'x-platform': 'web'
};
async function init(cfg) {
const ext = cfg.ext;
if (typeof ext === 'string' && ext.startsWith('http')) {
host = ext.trim().replace(/\/$/, '');
}
}
async function home(filter) {
const resp = await req(`${host}/api/category/top`, {
headers: { ...headers, 'referer': `${host}/` }
});
const json = JSON.parse(resp.content);
const classes = [];
for (const i of json.data) {
classes.push({
'type_id': i.id.toString(),
'type_name': i.name
});
}
return JSON.stringify({ class: classes });
}
async function homeVod() {
const resp = await req(`${host}/api/film/category`, {
headers: { ...headers, 'referer': `${host}/` }
});
const json = JSON.parse(resp.content);
const videos = [];
for (const i of json.data) {
const filmList = i.filmList || [];
for (const j of filmList) {
videos.push({
'vod_id': j.id.toString(),
'vod_name': j.name,
'vod_pic': j.cover,
'vod_remarks': j.doubanScore || ''
});
}
}
return JSON.stringify({ list: videos });
}
async function category(tid, pg, filter, extend) {
const url = `${host}/api/film/category/list?area=&categoryId=${tid}&language=&pageNum=${pg}&pageSize=15&sort=updateTime&year=`;
const resp = await req(url, {
headers: { ...headers, 'referer': `${host}/` }
});
const json = JSON.parse(resp.content);
const videos = [];
for (const i of json.data.list) {
videos.push({
'vod_id': i.id.toString(),
'vod_name': i.name,
'vod_pic': i.cover,
'vod_remarks': i.updateStatus
});
}
return JSON.stringify({
list: videos,
page: parseInt(pg)
});
}
async function search(wd, quick, pg=1) {
const url = `${host}/api/film/search?keyword=${encodeURIComponent(wd)}&pageNum=${pg}&pageSize=10`;
const resp = await req(url, {
headers: { ...headers, 'referer': `${host}/` }
});
const json = JSON.parse(resp.content);
const videos = [];
for (const i of json.data.list) {
videos.push({
'vod_id': i.id.toString(),
'vod_name': i.name,
'vod_pic': i.cover,
'vod_remarks': i.updateStatus,
'vod_year': i.year,
'vod_area': i.area,
'vod_director': i.director
});
}
return JSON.stringify({
list: videos,
page: parseInt(pg)
});
}
async function detail(id) {
const resp = await req(`${host}/api/film/detail?id=${id}`, {
headers: { ...headers, 'referer': `${host}/` }
});
const json = JSON.parse(resp.content);
const data = json.data;
const shows = [];
const play_urls = [];
for (const i of data.playLineList) {
shows.push(i.playerName);
const urls = i.lines.map(j => `${j.name}$${j.id}`);
play_urls.push(urls.join('#'));
}
const video = {
'vod_id': data.id.toString(),
'vod_name': data.name,
'vod_pic': data.cover,
'vod_year': data.year,
'vod_area': data.other,
'vod_actor': data.actor,
'vod_director': data.director,
'vod_content': data.blurb,
'vod_score': data.doubanScore,
'vod_play_from': shows.join('$$$'),
'vod_play_url': play_urls.join('$$$'),
'type_name': data.vod_class || ''
};
return JSON.stringify({ list: [video] });
}
async function play(flag, id, flags) {
const resp = await req(`${host}/api/line/play/parse?lineId=${id}`, {
headers: { ...headers, 'referer': `${host}/` }
});
const json = JSON.parse(resp.content);
return JSON.stringify({
jx: 0,
parse: 0,
url: json.data,
header: { 'User-Agent': headers['User-Agent'] }
});
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
search: search,
detail: detail,
play: play
};
}
+211
View File
@@ -0,0 +1,211 @@
// 本资源来源于互联网公开渠道,仅可用于个人学习爬虫技术。
// 严禁将其用于任何商业用途,下载后请于 24 小时内删除,搜索结果均来自源站,本人不承担任何责任。
import {Crypto, _} from 'assets://js/lib/cat.js';
let host = 'https://bubuyingshi.com';
let device_id = '';
const pkg = 'com.sunshine.tv';
const ver = '4';
const device_id_cache_key = 'com.sunshine.tv_3qys_B7k7Dt56Rn';
async function init(cfg) {
const ext = cfg.ext;
if (typeof cfg.ext === 'string' && cfg.ext.startsWith('http')) {
host = cfg.ext.trim().replace(/\/$/, '');
}
}
async function home(filter) {
const hd = await getHeaders();
const resp = await req(`${host}/api.php/app/index/home`, { headers: hd });
const json = JSON.parse(resp.content);
const classes = _.map(json.data.categories, (i) => ({
'type_id': i.type_name,
'type_name': i.type_name
}));
const videos = [];
for (const cat of json.data.categories) {
videos.push(...arr2vods(cat.videos));
}
return JSON.stringify({ class: classes, list: videos });
}
async function homeVod() {
return JSON.stringify({ list: [] });
}
async function category(tid, pg, filter, extend) {
const hd = await getHeaders();
const url = `${host}/api.php/app/filter/vod?type_name=${encodeURIComponent(tid)}&page=${pg}&sort=hits`;
const resp = await req(url, { headers: hd });
const json = JSON.parse(resp.content);
return JSON.stringify({
list: arr2vods(json.data),
pagecount: json.pageCount,
page: parseInt(pg)
});
}
async function search(wd, quick, pg=1) {
const hd = await getHeaders();
const url = `${host}/api.php/app/search/index?wd=${encodeURIComponent(wd)}&page=${pg}&limit=15`;
const resp = await req(url, { headers: hd });
const json = JSON.parse(resp.content);
return JSON.stringify({
list: arr2vods(json.data),
pagecount: json.pageCount,
page: parseInt(pg)
});
}
async function detail(id) {
const hd = await getHeaders();
const resp = await req(`${host}/api.php/app/vod/get_detail?vod_id=${id}`, { headers: hd });
const json = JSON.parse(resp.content);
const data = json.data[0];
const vodplayer = json.vodplayer;
const shows = [];
const play_urls = [];
const raw_shows = data.vod_play_from.split('$$$');
const raw_urls_list = data.vod_play_url.split('$$$');
for (let i = 0; i < raw_shows.length; i++) {
const show_code = raw_shows[i];
const urls_str = raw_urls_list[i];
let need_parse = 0;
let is_show = 0;
let name = show_code;
const player_info = _.find(vodplayer, (p) => p.from === show_code);
if (player_info) {
is_show = 1;
need_parse = player_info.decode_status;
if (show_code.toLowerCase() !== player_info.show.toLowerCase()) {
name = `${player_info.show} (${show_code})`;
}
}
if (is_show === 1) {
const urls = [];
for (const url_item of urls_str.split('#')) {
if (url_item.includes('$')) {
const [episode, url] = url_item.split('$');
urls.push(`${episode}$${show_code}@${need_parse}@${url}`);
}
}
if (urls.length > 0) {
play_urls.push(urls.join('#'));
shows.push(name);
}
}
}
const video = {
'vod_id': data.vod_id.toString(),
'vod_name': data.vod_name,
'vod_pic': data.vod_pic,
'vod_remarks': data.vod_remarks,
'vod_year': data.vod_year,
'vod_area': data.vod_area,
'vod_actor': data.vod_actor,
'vod_director': data.vod_director,
'vod_content': data.vod_content,
'vod_play_from': shows.join('$$$'),
'vod_play_url': play_urls.join('$$$'),
'type_name': data.vod_class
};
return JSON.stringify({ list: [video] });
}
async function play(flag, vid, flags) {
const parts = vid.split('@');
const play_from = parts[0];
const need_parse = parts[1];
const raw_url = parts[2];
let url = '';
let jx = 0;
if (need_parse === '1') {
try {
const hd = await getHeaders();
const apiUrl = `${host}/api.php/app/decode/url/?url=${encodeURIComponent(raw_url)}&vodFrom=${play_from}`;
const resp = await req(apiUrl, { headers: hd, timeout: 30000 });
const json = JSON.parse(resp.content);
if (json.data && json.data.startsWith('http')) {
url = json.data;
}
} catch (e) {
console.error('Play decode error:', e);
}
}
if (!url) {
url = raw_url;
if (/(www\.iqiyi|v\.qq|v\.youku|www\.mgtv|www\.bilibili)\.com/.test(raw_url)) {
jx = 1;
}
}
return JSON.stringify({ jx: jx, parse: 0, url: url, header: {'User-Agent': 'com.sunshine.tv/1.2.0 (Linux;Android 15) AndroidXMedia3/1.4.1'}});
}
async function getHeaders() {
const timestamp = Math.floor(Date.now() / 1000).toString();
const nonce = randomStr(3, '0123456789');
if (!device_id) {
device_id = await local.get('cache', device_id_cache_key);
if (!device_id || device_id.length !== 16) {
device_id = randomStr(16);
await local.set('cache', device_id_cache_key, device_id);
}
}
const sign_str = `finger=SF-C3B2B41F6EFFFF9869176CF68F6790E8F07506FC88632C94B4F5F0430D5498CA&id=${pkg}&nonce=${nonce}&sk=SK-thanks&time=${timestamp}&v=${ver}`;
const sign = sha256(sign_str);
return {
'User-Agent': 'okhttp/4.12.0',
'Accept': 'application/json',
'x-aid': pkg,
'x-ave': ver,
'x-time': timestamp,
'x-nonc': nonce,
'x-sign': sign,
'x-device-id': device_id,
'x-device-brand': 'vivo',
'x-device-model': 'V2309A',
'x-update-id': '0245861b-2ebf-5524-389d-f983830651ec'
};
}
function arr2vods(arr) {
return _.map(arr, (i) => {
let type_name = i.type_name || '';
if (i.vod_class) {
type_name = type_name + (type_name ? ',' : '') + i.vod_class;
}
return {
'vod_id': i.vod_id.toString(),
'vod_name': i.vod_name,
'vod_pic': i.vod_pic,
'vod_remarks': i.vod_remarks,
'type_name': type_name,
'vod_year': i.vod_year
};
});
}
function randomStr(len, chars = '0123456789abcdef') {
let str = '';
for (let i = 0; i < len; i++) {
str += chars[_.random(0, chars.length - 1)];
}
return str;
}
function sha256(text) {
return Crypto.SHA256(text).toString().toUpperCase();
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
search: search,
detail: detail,
play: play
};
}
+278
View File
@@ -0,0 +1,278 @@
var rule = {
title: '异世界动漫',
host: 'https://www.dmmiku.com/',
homeUrl: '/index.php/vod/show/id/22.html',
// url:'/index.php/vod/show/class/fyclass/id/20/page/fypage.html',
url: '/index.php/vod/show/fyclassfyfilter.html',
filterable: 1,
filter_url: '{{fl.type}}/id/20/page/fypage{{fl.year}}',
filter: {
"area/日本": [{
"key": "type",
"name": "类型",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "OVA",
"v": "/class/OVA"
}, {
"n": "剧场版",
"v": "/class/剧场版"
}, {
"n": "无修",
"v": "/class/BD无修"
}, {
"n": "萝莉",
"v": "/class/萝莉"
}, {
"n": "学園",
"v": "/class/学園"
}, {
"n": "后宫",
"v": "/class/后宫"
}, {
"n": "恋爱",
"v": "/class/恋爱"
}, {
"n": "热血",
"v": "/class/热血"
}, {
"n": "神魔",
"v": "/class/神魔"
}, {
"n": "奇幻",
"v": "/class/奇幻"
}, {
"n": "治愈",
"v": "/class/治愈"
}, {
"n": "搞笑",
"v": "/class/搞笑"
}, {
"n": "百合",
"v": "/class/百合"
}, {
"n": "冒险",
"v": "/class/冒险"
}, {
"n": "魔法",
"v": "/class/魔法"
}, {
"n": "机战",
"v": "/class/机战"
}, {
"n": "战争",
"v": "/class/战争"
}, {
"n": "犯罪",
"v": "/class/犯罪"
}, {
"n": "悬疑",
"v": "/class/悬疑"
}, {
"n": "推理",
"v": "/class/推理"
}, {
"n": "科幻",
"v": "/class/科幻"
}, {
"n": "竞技",
"v": "/class/竞技"
}, {
"n": "运动",
"v": "/class/运动"
}, {
"n": "耽美",
"v": "/class/耽美"
}, {
"n": "其他",
"v": "/class/其他"
}]
}, {
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}]
}],
"area/中國": [{
"key": "year",
"name": "年份",
"value": [{
"n": "全部",
"v": ""
}, {
"n": "2025",
"v": "/year/2025"
}, {
"n": "2024",
"v": "/year/2024"
}, {
"n": "2023",
"v": "/year/2023"
}, {
"n": "2022",
"v": "/year/2022"
}, {
"n": "2021",
"v": "/year/2021"
}, {
"n": "2020",
"v": "/year/2020"
}, {
"n": "2019",
"v": "/year/2019"
}, {
"n": "2018",
"v": "/year/2018"
}, {
"n": "2017",
"v": "/year/2017"
}, {
"n": "2016",
"v": "/year/2016"
}, {
"n": "2015",
"v": "/year/2015"
}, {
"n": "2014",
"v": "/year/2014"
}, {
"n": "2013",
"v": "/year/2013"
}, {
"n": "2012",
"v": "/year/2012"
}, {
"n": "2011",
"v": "/year/2011"
}, {
"n": "2010",
"v": "/year/2010"
}, {
"n": "2009",
"v": "/year/2009"
}, {
"n": "2008",
"v": "/year/2008"
}]
}]
},
searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
searchable: 2,
quickSearch: 0,
headers: {
'User-Agent': 'MOBILE_UA'
},
timeout: 5000, //网站的全局请求超时,默认是3000毫秒
class_name: '日漫&国漫',
class_url: 'area/日本&area/中國',
play_parse: true,
lazy: `js:
var html = JSON.parse(request(input).match(/r player_.*?=(.*?)</)[1]);
var url = html.url;
var from = html.from;
if (html.encrypt == '1') {
url = unescape(url)
} else if (html.encrypt == '2') {
url = unescape(base64Decode(url))
}
if (/m3u8|mp4/.test(url)) {
input = url
} else {
var MacPlayerConfig={};
eval(fetch(HOST + "/static/js/playerconfig.js").replace('var Mac','Mac'));
var jx = MacPlayerConfig.player_list[from].parse;
if (jx == '') {
jx = MacPlayerConfig.parse
};
if (jx.startsWith("/")) {
jx = "https:" + jx;
}
input={
jx:0,
url:jx+url,
parse:1,
header: JSON.stringify({
'referer': HOST
})
}
}
`,
limit: 6,
// 图片来源:'@Referer=https://api.douban.com/@User-Agent=Mozilla/5.0%20(Windows%20NT%2010.0;%20Win64;%20x64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/113.0.0.0%20Safari/537.36',
推荐: '*',
一级: '.vodlist_wi&&li;.lazyload&&title;.lazyload&&data-original;.pic_text&&Text;a&&href',
二级: {
"title": "h2&&Text;li.data--span:eq(0)&&Text",
"img": ".lazyload&&data-original",
"desc": "li.data--span:eq(1)&&Text;;;li.data--span:eq(2)&&Text;li.data--span:eq(3)&&Text",
"content": ".full_text&&span&&Text",
"tabs": `js:
TABS = [];
let tabs = pdfa(html, '#NumTab&&a');
tabs.forEach((it) => {
TABS.push(pdfh(it, 'a&&alt'))
});
`,
// "lists": ".content_playlist:not(.list_scroll):eq(#id) a"
"lists": "div.playlist_full:eq(#id) li"
},
搜索: 'li.searchlist_item;*;*;*;*',
}
+1392
View File
@@ -0,0 +1,1392 @@
var rule = {
title: '奇珍异兽[官]',
host: 'https://www.iqiyi.com',
homeUrl: '',
// detailUrl:'https://pcw-api.iqiyi.com/albums/album/avlistinfo?aid=fyid&size=2000&page=1',
detailUrl: 'https://pcw-api.iqiyi.com/video/video/videoinfowithuser/fyid?agent_type=1&authcookie=&subkey=fyid&subscribe=1',
searchUrl: 'https://search.video.iqiyi.com/o?if=html5&key=**&pageNum=fypage&pos=1&pageSize=24&site=iqiyi',
searchable: 2,
multi: 1,
filterable: 1,
filter: {
'1': [{
'key': 'mode',
'name': '综合排序',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '热播榜',
'v': 11
}, {
'n': '好评榜',
'v': 8
}, {
'n': '新上线',
'v': 4
}]
}, {
'key': 'year',
'name': '全部年份',
'value': [{
'n': '全部',
'v': ''
}, {
"n": "2025",
"v": 2025
}, {
"n": "2024",
"v": 2024
}, {
'n': '2023',
'v': 2023
}, {
'n': '2022',
'v': 2022
}, {
'n': '2021',
'v': 2021
}, {
'n': '2020',
'v': 2020
}, {
'n': '2019',
'v': 2019
}, {
'n': '2018',
'v': 2018
}, {
'n': '2017',
'v': 2017
}, {
'n': '2016-2011',
'v': '2011_2016'
}, {
'n': '2010-2000',
'v': '2000_2010'
}, {
'n': '90年代',
'v': '1990_1999'
}, {
'n': '80年代',
'v': '1980_1989'
}, {
'n': '更早',
'v': '1964_1979'
}]
}, {
'key': 'is_purchase',
'name': '全部资费',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '免费',
'v': 0
}, {
'n': '会员',
'v': 1
}, {
'n': '付费',
'v': 2
}]
}, {
'key': 'three_category_id',
'name': '地区',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '华语',
'v': 1
}, {
'n': '香港地区',
'v': 28997
}, {
'n': '美国',
'v': 2
}, {
'n': '欧洲',
'v': 3
}, {
'n': '韩国',
'v': 4
}, {
'n': '日本',
'v': 308
}, {
'n': '泰国',
'v': 1115
}, {
'n': '印度',
'v': 28999
}, {
'n': '其它',
'v': 5
}]
}, {
'key': '18001',
'name': '类型',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '喜剧',
'v': 8
}, {
'n': '爱情',
'v': 6
}, {
'n': '动作',
'v': 11
}, {
'n': '枪战',
'v': 131
}, {
'n': '犯罪',
'v': 291
}, {
'n': '惊悚',
'v': 128
}, {
'n': '恐怖',
'v': 10
}, {
'n': '悬疑',
'v': 289
}, {
'n': '动画',
'v': 12
}, {
'n': '家庭',
'v': 27356
}, {
'n': '奇幻',
'v': 1284
}, {
'n': '魔幻',
'v': 129
}, {
'n': '科幻',
'v': 9
}, {
'n': '战争',
'v': 7
}, {
'n': '青春',
'v': 130
}]
}, {
'key': '27396',
'name': '规格',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '巨制',
'v': 27397
}, {
'n': '院线',
'v': 27815
}, {
'n': '独播',
'v': 30149
}, {
'n': '网络电影',
'v': 27401
}]
}],
'2': [{
'key': 'mode',
'name': '综合排序',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '热播榜',
'v': 11
}, {
'n': '好评榜',
'v': 8
}, {
'n': '新上线',
'v': 4
}]
}, {
'key': 'year',
'name': '全部年份',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '2023',
'v': 2023
}, {
'n': '2022',
'v': 2022
}, {
'n': '2021',
'v': 2021
}, {
'n': '2020',
'v': 2020
}, {
'n': '2019',
'v': 2019
}, {
'n': '2018',
'v': 2018
}, {
'n': '2017',
'v': 2017
}, {
'n': '2016-2011',
'v': '2011_2016'
}, {
'n': '2010-2000',
'v': '2000_2010'
}, {
'n': '90年代',
'v': '1990_1999'
}, {
'n': '80年代',
'v': '1980_1989'
}, {
'n': '更早',
'v': '1964_1979'
}]
}, {
'key': 'is_purchase',
'name': '全部资费',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '免费',
'v': 0
}, {
'n': '会员',
'v': 1
}, {
'n': '付费',
'v': 2
}]
}, {
'key': 'three_category_id',
'name': '地区',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '内地',
'v': 15
}, {
'n': '港剧',
'v': 16
}, {
'n': '韩剧',
'v': 17
}, {
'n': '美剧',
'v': 18
}, {
'n': '日剧',
'v': 309
}, {
'n': '泰剧',
'v': 1114
}, {
'n': '台湾地区',
'v': 1117
}, {
'n': '英剧',
'v': 28916
}, {
'n': '其它',
'v': 19
}]
}, {
'key': '18003',
'name': '类型',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '自制',
'v': 11992
}, {
'n': '古装',
'v': 24
}, {
'n': '言情',
'v': 20
}, {
'n': '武侠',
'v': 23
}, {
'n': '偶像',
'v': 30
}, {
'n': '家庭',
'v': 1654
}, {
'n': '青春',
'v': 1653
}, {
'n': '都市',
'v': 24064
}, {
'n': '喜剧',
'v': 135
}, {
'n': '战争',
'v': 27916
}, {
'n': '军旅',
'v': 1655
}, {
'n': '谍战',
'v': 290
}, {
'n': '悬疑',
'v': 32
}, {
'n': '罪案',
'v': 149
}, {
'n': '穿越',
'v': 148
}, {
'n': '宫廷',
'v': 139
}, {
'n': '历史',
'v': 21
}, {
'n': '神话',
'v': 145
}, {
'n': '科幻',
'v': 34
}, {
'n': '年代',
'v': 27
}, {
'n': '农村',
'v': 29
}, {
'n': '商战',
'v': 140
}, {
'n': '剧情',
'v': 24063
}, {
'n': '奇幻',
'v': 27881
}, {
'n': '网剧',
'v': 24065
}, {
'n': '竖短片',
'v': 32839
}]
}],
'3': [{
'key': 'mode',
'name': '综合排序',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '热播榜',
'v': 11
}, {
'n': '好评榜',
'v': 8
}, {
'n': '新上线',
'v': 4
}]
}, {
'key': 'year',
'name': '全部年份',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '2023',
'v': 2023
}, {
'n': '2022',
'v': 2022
}, {
'n': '2021',
'v': 2021
}, {
'n': '2020',
'v': 2020
}, {
'n': '2019',
'v': 2019
}, {
'n': '2018',
'v': 2018
}, {
'n': '2017',
'v': 2017
}, {
'n': '2016-2011',
'v': '2011_2016'
}, {
'n': '2010-2000',
'v': '2000_2010'
}, {
'n': '90年代',
'v': '1990_1999'
}, {
'n': '80年代',
'v': '1980_1989'
}, {
'n': '更早',
'v': '1964_1979'
}]
}, {
'key': 'is_purchase',
'name': '全部资费',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '免费',
'v': 0
}, {
'n': '会员',
'v': 1
}, {
'n': '付费',
'v': 2
}]
}, {
'key': 'three_category_id',
'name': '地区',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '国内',
'v': 20323
}, {
'n': '国外',
'v': 20324
}]
}, {
'key': '18004',
'name': '类型',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '人文',
'v': 70
}, {
'n': '美食',
'v': 33908
}, {
'n': '医疗',
'v': 33924
}, {
'n': '自然',
'v': 33933
}, {
'n': '萌宠',
'v': 33945
}, {
'n': '财经',
'v': 33953
}, {
'n': '罪案',
'v': 33960
}, {
'n': '竞技',
'v': 33967
}, {
'n': '灾难',
'v': 33974
}, {
'n': '军事',
'v': 72
}, {
'n': '历史',
'v': 74
}, {
'n': '探险',
'v': 73
}, {
'n': '社会',
'v': 71
}, {
'n': '科技',
'v': 28119
}, {
'n': '旅游',
'v': 310
}]
}, {
'key': '28467',
'name': '出品方',
'value': [{
'n': '全部',
'v': ''
}, {
'n': 'BBC',
'v': 28468
}, {
'n': '美国历史频道',
'v': 28470
}, {
'n': '探索频道',
'v': 28471
}, {
'n': '央视记录',
'v': 28472
}, {
'n': '北京纪实频道',
'v': 28473
}, {
'n': '上海纪实频道',
'v': 28474
}, {
'n': '朗思文化',
'v': 28476
}, {
'n': 'CNEX',
'v': 28477
}, {
'n': '五星传奇',
'v': 28478
}, {
'n': 'IMG',
'v': 28479
}, {
'n': 'NHK',
'v': 28480
}, {
'n': '爱奇艺出品',
'v': 31283
}, {
'n': 'Netflix',
'v': 31286
}]
}, {
'key': '29076',
'name': '片种',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '纪录电影',
'v': 29077
}, {
'n': '系列纪录片',
'v': 29078
}, {
'n': '网络纪录片',
'v': 29082
}, {
'n': '纪实栏目',
'v': 29083
}]
}, {
'key': '31294',
'name': '时长',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '微纪录',
'v': 29079
}, {
'n': '长纪录',
'v': 29080
}, {
'n': '短纪录',
'v': 29081
}]
}],
'4': [{
'key': 'mode',
'name': '综合排序',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '热播榜',
'v': 11
}, {
'n': '好评榜',
'v': 8
}, {
'n': '新上线',
'v': 4
}]
}, {
'key': 'year',
'name': '全部年份',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '2023',
'v': 2023
}, {
'n': '2022',
'v': 2022
}, {
'n': '2021',
'v': 2021
}, {
'n': '2020',
'v': 2020
}, {
'n': '2019',
'v': 2019
}, {
'n': '2018',
'v': 2018
}, {
'n': '2017',
'v': 2017
}, {
'n': '2016-2011',
'v': '2011_2016'
}, {
'n': '2010-2000',
'v': '2000_2010'
}, {
'n': '90年代',
'v': '1990_1999'
}, {
'n': '80年代',
'v': '1980_1989'
}, {
'n': '更早',
'v': '1964_1979'
}]
}, {
'key': 'is_purchase',
'name': '全部资费',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '免费',
'v': 0
}, {
'n': '会员',
'v': 1
}, {
'n': '付费',
'v': 2
}]
}, {
'key': 'three_category_id',
'name': '地区',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '中国大陆',
'v': 37
}, {
'n': '日本',
'v': 38
}, {
'n': '韩国',
'v': 1106
}, {
'n': '欧美',
'v': 30218
}, {
'n': '其它',
'v': 40
}]
}, {
'key': '30219',
'name': '版本',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '动画',
'v': 30220
}, {
'n': '特摄',
'v': 30223
}, {
'n': '布袋戏',
'v': 30224
}, {
'n': '特别篇',
'v': 32782
}, {
'n': '动态漫画',
'v': 32783
}, {
'n': '动画电影',
'v': 32784
}, {
'n': '竖版视频',
'v': 32785
}, {
'n': '轻动画',
'v': 33482
}, {
'n': '短剧',
'v': 33483
}]
}, {
'key': '30225',
'name': '风格',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '搞笑',
'v': 30230
}, {
'n': '热血',
'v': 30232
}, {
'n': '催泪',
'v': 30233
}, {
'n': '治愈',
'v': 30234
}, {
'n': '励志',
'v': 30237
}, {
'n': '机战',
'v': 30241
}, {
'n': '恋爱',
'v': 30243
}, {
'n': '科幻',
'v': 30245
}, {
'n': '奇幻',
'v': 30247
}, {
'n': '推理',
'v': 30248
}, {
'n': '校园',
'v': 30249
}, {
'n': '日常',
'v': 30252
}, {
'n': '历史',
'v': 30254
}, {
'n': '美食',
'v': 30255
}, {
'n': '职场',
'v': 30256
}, {
'n': '偶像',
'v': 30258
}, {
'n': '泡面',
'v': 30265
}, {
'n': '冒险',
'v': 30267
}, {
'n': '竞技',
'v': 30268
}, {
'n': '合家欢',
'v': 30270
}, {
'n': '武侠',
'v': 32792
}, {
'n': '玄幻',
'v': 32793
}]
}, {
'key': '32795',
'name': '新类型',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '轻小说改编',
'v': 32796
}, {
'n': '漫画改编',
'v': 32797
}, {
'n': '游戏改编',
'v': 32798
}, {
'n': '原创',
'v': 32799
}]
}],
'6': [{
'key': 'mode',
'name': '综合排序',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '热播榜',
'v': 11
}, {
'n': '好评榜',
'v': 8
}, {
'n': '新上线',
'v': 4
}]
}, {
'key': 'year',
'name': '全部年份',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '2023',
'v': 2023
}, {
'n': '2022',
'v': 2022
}, {
'n': '2021',
'v': 2021
}, {
'n': '2020',
'v': 2020
}, {
'n': '2019',
'v': 2019
}, {
'n': '2018',
'v': 2018
}, {
'n': '2017',
'v': 2017
}, {
'n': '2016-2011',
'v': '2011_2016'
}, {
'n': '2010-2000',
'v': '2000_2010'
}, {
'n': '90年代',
'v': '1990_1999'
}, {
'n': '80年代',
'v': '1980_1989'
}, {
'n': '更早',
'v': '1964_1979'
}]
}, {
'key': 'is_purchase',
'name': '全部资费',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '免费',
'v': 0
}, {
'n': '会员',
'v': 1
}, {
'n': '付费',
'v': 2
}]
}, {
'key': 'three_category_id',
'name': '地区',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '内地',
'v': 151
}, {
'n': '港台',
'v': 152
}, {
'n': '韩国',
'v': 33306
}, {
'n': '欧美',
'v': 154
}, {
'n': '其它',
'v': 1113
}]
}, {
'key': '18014',
'name': '类型',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '播报',
'v': 155
}, {
'n': '访谈',
'v': 156
}, {
'n': '游戏',
'v': 158
}, {
'n': '晚会',
'v': 292
}, {
'n': '曲艺',
'v': 293
}, {
'n': '脱口秀',
'v': 2118
}, {
'n': '真人秀',
'v': 2224
}, {
'n': '竞技',
'v': 30278
}, {
'n': '爱奇艺出品',
'v': 30279
}, {
'n': '竞演',
'v': 33860
}]
}, {
'key': '33162',
'name': '题材',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '音乐',
'v': 33163
}, {
'n': '舞蹈',
'v': 33172
}, {
'n': '文化',
'v': 33173
}, {
'n': '美食',
'v': 33182
}, {
'n': '伦理',
'v': 33184
}, {
'n': '相亲',
'v': 33193
}, {
'n': '纪实',
'v': 33195
}, {
'n': '生活',
'v': 33196
}, {
'n': '亲子',
'v': 33197
}, {
'n': '少儿',
'v': 33198
}, {
'n': '财经',
'v': 33199
}, {
'n': '健康',
'v': 33200
}, {
'n': '时尚',
'v': 33203
}, {
'n': '旅游',
'v': 33205
}, {
'n': '教育',
'v': 33206
}, {
'n': '其它',
'v': 33220
}, {
'n': '爱情',
'v': 33316
}, {
'n': '搞笑',
'v': 33317
}, {
'n': '益智',
'v': 33318
}, {
'n': '职场',
'v': 33319
}, {
'n': '语言',
'v': 33530
}, {
'n': '辩论',
'v': 33531
}, {
'n': '演讲',
'v': 33843
}]
}],
'5': [{
'key': 'mode',
'name': '综合排序',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '热播榜',
'v': 11
}, {
'n': '好评榜',
'v': 8
}, {
'n': '新上线',
'v': 4
}]
}, {
'key': 'year',
'name': '全部年份',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '2023',
'v': 2023
}, {
'n': '2022',
'v': 2022
}, {
'n': '2021',
'v': 2021
}, {
'n': '2020',
'v': 2020
}, {
'n': '2019',
'v': 2019
}, {
'n': '2018',
'v': 2018
}, {
'n': '2017',
'v': 2017
}, {
'n': '2016-2011',
'v': '2011_2016'
}, {
'n': '2010-2000',
'v': '2000_2010'
}, {
'n': '90年代',
'v': '1990_1999'
}, {
'n': '80年代',
'v': '1980_1989'
}, {
'n': '更早',
'v': '1964_1979'
}]
}, {
'key': 'is_purchase',
'name': '全部资费',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '免费',
'v': 0
}, {
'n': '会员',
'v': 1
}, {
'n': '付费',
'v': 2
}]
}, {
'key': 'three_category_id',
'name': '地区',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '内地',
'v': 221
}, {
'n': '港台',
'v': 220
}, {
'n': '欧美',
'v': 219
}, {
'n': '日韩',
'v': 218
}, {
'n': '拉美',
'v': 217
}, {
'n': '亚洲地区',
'v': 216
}, {
'n': '非洲',
'v': 215
}]
}, {
'key': '18009',
'name': '语种',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '普通话',
'v': 91
}, {
'n': '粤语',
'v': 92
}, {
'n': '闽南语',
'v': 93
}, {
'n': '英语',
'v': 94
}, {
'n': '日语',
'v': 95
}, {
'n': '韩语',
'v': 96
}, {
'n': '其它',
'v': 97
}]
}, {
'key': '23554',
'name': '音乐类型',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '单曲MV',
'v': 23556
}, {
'n': '单曲现场',
'v': 23557
}, {
'n': '演唱会',
'v': 23558
}, {
'n': '新闻',
'v': 23559
}, {
'n': '访谈',
'v': 23560
}, {
'n': '音乐记录',
'v': 23561
}, {
'n': '音乐周边',
'v': 23562
}, {
'n': '音乐节目',
'v': 23563
}, {
'n': '影视原声',
'v': 23564
}, {
'n': '音乐短片',
'v': 23565
}, {
'n': '其他',
'v': 23566
}]
}],
'16': [{
'key': 'mode',
'name': '综合排序',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '热播榜',
'v': 11
}, {
'n': '好评榜',
'v': 8
}, {
'n': '新上线',
'v': 4
}]
}, {
'key': 'year',
'name': '全部年份',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '2023',
'v': 2023
}, {
'n': '2022',
'v': 2022
}, {
'n': '2021',
'v': 2021
}, {
'n': '2020',
'v': 2020
}, {
'n': '2019',
'v': 2019
}, {
'n': '2018',
'v': 2018
}, {
'n': '2017',
'v': 2017
}, {
'n': '2016-2011',
'v': '2011_2016'
}, {
'n': '2010-2000',
'v': '2000_2010'
}, {
'n': '90年代',
'v': '1990_1999'
}, {
'n': '80年代',
'v': '1980_1989'
}, {
'n': '更早',
'v': '1964_1979'
}]
}, {
'key': 'is_purchase',
'name': '全部资费',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '免费',
'v': 0
}, {
'n': '会员',
'v': 1
}, {
'n': '付费',
'v': 2
}]
}, {
'key': '18061',
'name': '类型',
'value': [{
'n': '全部',
'v': ''
}, {
'n': '喜剧',
'v': 1296
}, {
'n': '爱情',
'v': 1297
}, {
'n': '动作',
'v': 1298
}, {
'n': '奇幻',
'v': 1299
}, {
'n': '惊悚',
'v': 1300
}, {
'n': '悬疑',
'v': 1301
}, {
'n': '青春',
'v': 1302
}]
}]
},
// url:'https://pcw-api.iqiyi.com/search/recommend/list?channel_id=fyclass&data_type=1&is_purchase=&mode=24&page_id=fypage&ret_num=48&three_category_id=',
url: 'https://pcw-api.iqiyi.com/search/recommend/list?channel_id=fyclass&data_type=1&page_id=fypage&ret_num=48',
filter_url: 'is_purchase={{fl.is_purchase}}&mode={{fl.mode}}&three_category_id={{fl.three_category_id}}&market_release_date_level={{fl.year}}',
// url:'https://pcw-api.iqiyi.com/search/video/videolists?channel_id=fyclass&pageNum=fypage&pageSize=24&data_type=1&site=iqiyi',
headers: {
'User-Agent': 'MOBILE_UA'
},
timeout: 5000,
class_name: '电影&电视剧&纪录片&动漫&综艺&音乐&网络电影',
class_url: '1&2&3&4&6&5&16',
limit: 20,
play_parse: true,
lazy: $js.toString(() => {
try {
let api = "" + input.split("?")[0];
console.log(api);
let response = fetch(api, {
method: 'get',
headers: {
'User-Agent': 'okhttp/3.14.9',
'Content-Type': 'application/x-www-form-urlencoded'
}
});
let bata = JSON.parse(response);
if (bata.url.includes("qiyi")) {
input = {
parse: 0,
url: bata.url,
jx: 0,
danmaku: "http://127.0.0.1:9978/proxy?do=danmu&site=js&url=http://dm.qxq6.com/zy/api.php?url=" + input.split("?")[0]
};
} else {
input = {
parse: 0,
url: input.split("?")[0],
jx: 1,
danmaku: "http://127.0.0.1:9978/proxy?do=danmu&site=js&url=http://dm.qxq6.com/zy/api.php?url=" + input.split("?")[0]
};
}
} catch {
input = {
parse: 0,
url: input.split("?")[0],
jx: 1,
danmaku: "http://127.0.0.1:9978/proxy?do=danmu&site=js&url=http://dm.qxq6.com/zy/api.php?url=" + input.split("?")[0]
};
}
}),
// play_parse:true,
// 手动调用解析请求json的url,此lazy不方便
// lazy:'js:input="https://cache.json.icu/home/api?type=ys&uid=292796&key=fnoryABDEFJNPQV269&url="+input.split("?")[0];log(input);let html=JSON.parse(request(input));log(html);input=html.url||input',
// 推荐:'.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
// 一级:'json:.data.list;.name;.imageUrl;.latestOrder;.albumId',
推荐: '',
// 推荐:'js:let d=[];fetch_params.headers["user-agent"]=PC_UA;pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;let html=fetch(HOST,fetch_params);let lists=pdfa(html,".qy-mod-li");lists.forEach(function(it){try{let title=pdfh(it,"p.sub&&title");let desc=pdfh(it,".qy-mod-label&&Text");let pic_url=pd(it,"img&&src");d.push({title:title,desc:desc,img:pic_url})}catch(e){}});res=setResult(d);',
一级: 'js:let d=[];if(MY_CATE==="16"){input=input.replace("channel_id=16","channel_id=1").split("three_category_id")[0];input+="three_category_id=27401"}else if(MY_CATE==="5"){input=input.replace("data_type=1","data_type=2")}let html=request(input);let json=JSON.parse(html);if(json.code==="A00003"){fetch_params.headers["user-agent"]=PC_UA;json=JSON.parse(fetch(input,fetch_params))}json.data.list.forEach(function(data){if(data.channelId===1){desc=data.hasOwnProperty("score")?data.score+"分\\t":""}else if(data.channelId===2||data.channelId===4){if(data.latestOrder===data.videoCount){desc=(data.hasOwnProperty("score")?data.score+"分\\t":"")+data.latestOrder+"集全"}else{if(data.videoCount){desc=(data.hasOwnProperty("score")?data.score+"分\\t":"")+data.latestOrder+"/"+data.videoCount+"集"}else{desc="更新至 "+data.latestOrder+"集"}}}else if(data.channelId===6){desc=data.period+"期"}else if(data.channelId===5){desc=data.focus}else{if(data.latestOrder){desc="更新至 第"+data.latestOrder+"期"}else if(data.period){desc=data.period}else{desc=data.focus}}url=MY_CATE+"$"+data.albumId;d.push({url:url,title:data.name,desc:desc,pic_url:data.imageUrl.replace(".jpg","_390_520.jpg?caplist=jpg,webp")})});setResult(d);',
// 一级:'js:let d=[];if(MY_CATE==="16"){input=input.replace("channel_id=16","channel_id=1").split("three_category_id")[0];input+="three_category_id=27401"}else if(MY_CATE==="5"){input=input.replace("data_type=1","data_type=2")}let html=fetch(input,fetch_params);let json=JSON.parse(html);if(json.code==="A00003"){fetch_params.headers["user-agent"]=PC_UA;json=JSON.parse(fetch(input,fetch_params))}json.data.list.forEach(function(data){if(data.channelId===1){desc=data.hasOwnProperty("score")?data.score+"分\\t":""}else if(data.channelId===2||data.channelId===4){if(data.latestOrder===data.videoCount){desc=(data.hasOwnProperty("score")?data.score+"分\\t":"")+data.latestOrder+"集全"}else{if(data.videoCount){desc=(data.hasOwnProperty("score")?data.score+"分\\t":"")+data.latestOrder+"/"+data.videoCount+"集"}else{desc="更新至 "+data.latestOrder+"集"}}}else if(data.channelId===6){desc=data.period+"期"}else if(data.channelId===5){desc=data.focus}else{if(data.latestOrder){desc="更新至 第"+data.latestOrder+"期"}else if(data.period){desc=data.period}else{desc=data.focus}}url=MY_CATE+"$"+data.albumId;d.push({url:url,title:data.name,desc:desc,pic_url:data.imageUrl.replace(".jpg","_390_520.jpg?caplist=jpg,webp")})});setResult(d);',
// 一级:'json:.data.list;.name;.imageUrl;.playUrl;.latestOrder',
// 二级:{is_json:1,"title":"data.title;data.moviecategory[0]+data.moviecategory[1]","img":"data.cdncover","desc":"data.area[0];data.director[0]","content":"data.description","tabs":"data.playlink_sites;data.playlinksdetail.#idv.quality","lists":"data.playlinksdetail.#idv.default_url"},
// 二级:{is_json:1,"title":"data.name+data.subtitle;data.latestOrder","img":"data.imageUrl","desc":"data.categories;data.areas","content":"data.description","tabs":"data.name","lists":"data.playlinksdetail.#idv.default_url"},
二级: '',
二级: 'js:let d=[];let html=request(input);let json=JSON.parse(html).data;VOD={vod_id:"",vod_url:input,vod_name:"",type_name:"",vod_actor:"",vod_year:"",vod_director:"",vod_area:"",vod_content:"",vod_remarks:"",vod_pic:""};VOD.vod_name=json.name;try{if(json.latestOrder){VOD.vod_remarks="类型: "+(json.categories[0].name||"")+"\\t"+(json.categories[1].name||"")+"\\t"+(json.categories[2].name||"")+"\\t"+"评分:"+(json.score||"")+"\\n更新至:第"+json.latestOrder+"集(期)/共"+json.videoCount+"集(期)"}else{VOD.vod_remarks="类型: "+(json.categories[0].name||"")+"\\t"+(json.categories[1].name||"")+"\\t"+(json.categories[2].name||"")+"\\t"+"评分:"+(json.score||"")+json.period}}catch(e){VOD.vod_remarks=json.subtitle}VOD.vod_area=(json.focus||"")+"\\n资费:"+(json.payMark===1?"VIP":"免费")+"\\n地区:"+(json.areas||"");let vsize="579_772";try{vsize=json.imageSize[12]}catch(e){}VOD.vod_pic=json.imageUrl.replace(".jpg","_"+vsize+".jpg?caplist=jpg,webp");VOD.type_name=json.categories.map(function(it){return it.name}).join(",");if(json.people.main_charactor){let vod_actors=[];json.people.main_charactor.forEach(function(it){vod_actors.push(it.name)});VOD.vod_actor=vod_actors.join(",")}VOD.vod_content=json.description;let playlists=[];if(json.channelId===1||json.channelId===5){playlists=[{playUrl:json.playUrl,imageUrl:json.imageUrl,shortTitle:json.shortTitle,focus:json.focus,period:json.period}]}else{if(json.channelId===6){let qs=json.period.split("-")[0];let listUrl="https://pcw-api.iqiyi.com/album/source/svlistinfo?cid=6&sourceid="+json.albumId+"&timelist="+qs;let playData=JSON.parse(request(listUrl)).data[qs];playData.forEach(function(it){playlists.push({playUrl:it.playUrl,imageUrl:it.imageUrl,shortTitle:it.shortTitle,focus:it.focus,period:it.period})})}else{let listUrl="https://pcw-api.iqiyi.com/albums/album/avlistinfo?aid="+json.albumId+"&size=200&page=1";let data=JSON.parse(request(listUrl)).data;let total=data.total;playlists=data.epsodelist;if(total>200){for(let i=2;i<total/200+1;i++){let listUrl="https://pcw-api.iqiyi.com/albums/album/avlistinfo?aid="+json.albumId+"&size=200&page="+i;let data=JSON.parse(request(listUrl)).data;playlists=playlists.concat(data.epsodelist)}}}}playlists.forEach(function(it){d.push({title:it.shortTitle||"第"+it.order+"集",desc:it.subtitle||it.focus||it.period,img:it.imageUrl.replace(".jpg","_480_270.jpg?caplist=jpg,webp"),url:it.playUrl})});VOD.vod_play_from="qiyi";VOD.vod_play_url=d.map(function(it){return it.title+"$"+it.url}).join("#");',
// 二级:'js:let d=[];let html=request(input);let json=JSON.parse(html).data;vod={vod_id:"",vod_url:input,vod_name:"",type_name:"",vod_actor:"",vod_year:"",vod_director:"",vod_area:"",vod_content:"",vod_remarks:"",vod_pic:""};vod.vod_name=json.name;try{if(json.latestOrder){vod.vod_remarks="类型: "+(json.categories[0].name||"")+"\\t"+(json.categories[1].name||"")+"\\t"+(json.categories[2].name||"")+"\\t"+"评分:"+(json.score||"")+"\\n更新至:第"+json.latestOrder+"集(期)/共"+json.videoCount+"集(期)"}else{vod.vod_remarks="类型: "+(json.categories[0].name||"")+"\\t"+(json.categories[1].name||"")+"\\t"+(json.categories[2].name||"")+"\\t"+"评分:"+(json.score||"")+json.period}}catch(e){vod.vod_remarks=json.subtitle}vod.vod_area=(json.focus||"")+"\\n资费:"+(json.payMark===1?"VIP":"免费")+"\\n地区:"+(json.areas||"");let vsize="579_772";try{vsize=json.imageSize[12]}catch(e){}vod.vod_pic=json.imageUrl.replace(".jpg","_"+vsize+".jpg?caplist=jpg,webp");vod.type_name=json.categories.map(function(it){return it.name}).join(",");if(json.people.main_charactor){vod_actors=[];json.people.main_charactor.forEach(function(it){vod_actors.push(it.name)});vod.vod_actor=vod_actors.join(",")}vod.vod_content=json.description;let playlists=[];if(json.channelId===1||json.channelId===5){playlists=[{playUrl:json.playUrl,imageUrl:json.imageUrl,shortTitle:json.shortTitle,focus:json.focus,period:json.period}]}else{if(json.channelId===6){let qs=json.period.split("-")[0];let listUrl="https://pcw-api.iqiyi.com/album/source/svlistinfo?cid=6&sourceid="+json.albumId+"&timelist="+qs;let playData=JSON.parse(request(listUrl)).data[qs];playData.forEach(function(it){playlists.push({playUrl:it.playUrl,imageUrl:it.imageUrl,shortTitle:it.shortTitle,focus:it.focus,period:it.period})})}else{let listUrl="https://pcw-api.iqiyi.com/albums/album/avlistinfo?aid="+json.albumId+"&size=200&page=1";let data=JSON.parse(request(listUrl)).data;let total=data.total;playlists=data.epsodelist;if(total>200){for(let i=2;i<total/200+1;i++){let listUrl="https://pcw-api.iqiyi.com/albums/album/avlistinfo?aid="+json.albumId+"&size=200&page="+i;let data=JSON.parse(request(listUrl)).data;playlists=playlists.concat(data.epsodelist)}}}}playlists.forEach(function(it){d.push({title:it.shortTitle||"第"+it.order+"集",desc:it.subtitle||it.focus||it.period,img:it.imageUrl.replace(".jpg","_480_270.jpg?caplist=jpg,webp"),url:it.playUrl})});vod.vod_play_from="qiyi";vod.vod_play_url=d.map(function(it){return it.title+"$"+it.url}).join("#");',
搜索: 'json:.data.docinfos;.albumDocInfo.albumTitle;.albumDocInfo.albumVImage;.albumDocInfo.channel;.albumDocInfo.albumId;.albumDocInfo.tvFocus',
}
+106
View File
@@ -0,0 +1,106 @@
//全局函数,AES解密
globalThis.AESJieMi = function (data, url) {
data = data.replace(/^\uFEFF/,'');
let key = /main/.test(url)? '/main00000000000' : '/'+url.split('/')[3].slice(0,15);
key = CryptoJS.enc.Utf8.parse(key);
const decrypted = CryptoJS.AES.decrypt(data, key, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
});
return decrypted.toString(CryptoJS.enc.Utf8)
};
//drpy2主体rule对象
var rule = {
title: '牛牛app',
host: 'https://ccc.chaojichaojichanga.com:35620',
hostJs: '',
headers: {'User-Agent': MOBILE_UA},
编码: 'utf-8',
timeout: 5000,
homeUrl: '/main',
url: '/list?fyfilter',
filter_url: 'wd=&order={{fl.by}}&type_id=fyclass&class={{fl.class}}&area={{fl.area}}&year={{fl.year}}&state={{fl.state}}&page=fypage',
searchUrl: '/list?order=&wd=**&page=fypage',
detailUrl: '/detail?vod_id=fyid',
limit: 9,
double: false,
class_name: '短剧&电视剧&电影&动漫&综艺&福利&麻豆&吃瓜&午夜&热舞&直播',
class_url: '5&2&1&4&3&6&7&8&9&10&11',
filter_def: {},
推荐: $js.toString(() => {
let khtml = fetch(input);
let kjson = JSON.parse(AESJieMi(khtml, input));
VODS = [];
kjson.data.forEach((item) => {
if (Array.isArray(item.list) && item.list.length !== 0) { VODS = VODS.concat(item.list) }
})
}),
一级: $js.toString(() => {
let khtml = fetch(input);
let kjson = JSON.parse(AESJieMi(khtml, input));
VODS = kjson.data
}),
搜索: '*',
二级: $js.toString(() => {
let khtml = fetch(input);
let kjson = JSON.parse(AESJieMi(khtml, input));
let kvod = kjson.data;
let ktabs = kvod.sources.map((it) => { return '' + it.player_id });
let kurls = kvod.sources.map((item) => {
let kurl = item.episodes.map((it) => { return `${it.name}$${it.url}@${item.player_id}` });
return kurl.join('#')
});
VOD = {
vod_id: kvod.vod_id,
vod_name: kvod.vod_name,
vod_pic: kvod.vod_pic,
type_name: kvod.vod_class,
vod_remarks: kvod.vod_remarks,
vod_year: kvod.vod_year,
vod_area: kvod.vod_area,
vod_lang: kvod.vod_lang,
vod_director: kvod.vod_director,
vod_actor: kvod.vod_actor,
vod_content: kvod.vod_content,
vod_play_from: ktabs.join('$$$'),
vod_play_url: kurls.join('$$$')
}
}),
tab_remove: ['xm3u8'],
play_parse: true,
lazy: $js.toString(() => {
let kurl = input.split('@')[0];
let ktab = input.split('@')[1];
if (/\.m3u8/.test(kurl)) {
input = { jx: 0, parse: 0, url: kurl, header: rule.headers }
} else if (/hm3u8/.test(ktab)) {
kurl = `http://82.156.24.206:12345/jx/jx.php?url=${kurl}`;
kurl = JSON.parse(fetch(kurl)).url;
input = { jx: 0, parse: 0, url: kurl }
} else if (/qyzy/.test(ktab)) {
kurl = `http://ccs.js.hh.gzbaoxian.com/jx/qy.php?url=${kurl}`;
kurl = JSON.parse(fetch(kurl)).url;
input = { jx: 0, parse: 0, url: kurl }
} else if (/hmjc/.test(ktab)) {
kurl = `http://101.42.92.211:5560/jx/dj.php?url=${kurl}`;
kurl = JSON.parse(fetch(kurl)).url;
input = { jx: 0, parse: 0, url: kurl, header: { 'User-Agent': MOBILE_UA, 'Referer': 'https://m3u8.com' } }
} else if (/djzy/.test(ktab)) {
kurl = `http://ccs.js.hh.gzbaoxian.com/jx/dj.php?url=${kurl}`;
kurl = JSON.parse(fetch(kurl)).url;
input = { jx: 0, parse: 0, url: kurl, header: rule.headers }
} else if (/zbjx/.test(ktab)) {
kurl = `http://27.25.159.14:6699/api/mgapp.php?url=${kurl}`;
kurl = JSON.parse(fetch(kurl)).url;
input = { jx: 0, parse: 0, url: kurl, header: { 'User-Agent': MOBILE_UA, 'Referer': 'https://m3u8.com'} }
} else {
input = { jx: 0, parse: 1, url: kurl }
}
}),
filter: 'H4sIAAAAAAAAA+2ZW08aQRTH3/kUzT7zMIM39KsYH2jDU60PapsYQ7KKoiLlYivWSr2UKmi9gJqWS9Avw8zCt+jCzDlnSKshqamk2Td+/7Oze/57Of+MLvosbk28mPQtWq/DC9aE9Wo6NDdn+a2Z0Juwi2KjIKOrLr8LTb91hclFa6Yjrxbb0WJHdsGK+LWKBxNATV6cNO8OdU0D1tY/NWsbUFOA5zxeE9U6nFMB1Jz4ldM40zUNuC6dkHYB1inAWrzYbOSgpgBr2ZzbOdQU4PXWy+RPA9YKGepTA/pbPneyGfCnAGtLaWlnoabA6NP5WKc+O4DXq52JxrazsQaXRI5MRfz4OEOz4ZDxNHMlkaj1+zRjq+7xcHUFePW7pNhrwKUVQK19cEo1Deh251jmzsGtAqzdbNM6DVBrbZappoHWlcx1pZ5eTnZl5Qp6UYD+UiVZvQN/Cnru3UI4NGvcu+pts97o894FWGBEa92fhj5M+rCpD5E+ZOoB0gOmzknnps5IZ4bOx1F3fxp6kPSgqY+RPmbqo6SPmjr55aZfTn656ZeTX2765eSXm345+eWmX05+uemXkV9m+mXkl5l+Gfllpl9Gfpnpl5FfZvpl5JeZfhn5ZaZfRn6Z6ZeRX2b6ZeSXkV8+Pg5+uz8NPUh6sPf9frlAb7dMbola6re3W+ZsmYUZoAG/u5ztRC+o1gH8Xq9WxHoMvlcF7rV9U36fFfgneSNS31p5rCnAWjImUtdQU4ATI9oQlWWYGAr+p9wYpBz2MszLMC/DvAz7iwybmw/Nh+kFd+I/pL3U5wsu927dPGtWMMOQ8fP6eS0uE079A3xhyIMQpENPFqSPDGI4InfQrNWcgg1HIOMRexWRB4ca0MVKWaTytJqYBu5Ns5rGgdsFLwS8EPBCwAsBLwQeCYHhpwuB6EXrCOe7Auwuve+c405EAXZ3n3b3GNCdgufaMYnYVnv3FEd9F2jHtOmeCTwooD7L4n4H++wCrksWnTTcfQ1YOzwSe/jUFPS1Y/q+L+N4rxX0tbP7027Ki0kvJr2Y9GLS8mLywZgcebKYfPQPhKn3rQaMOw3YXTohLr9Adwpo3cN/rGzbsdZXcKyhnwht75yJ08+wTgGO8+SmOInCOFfQT6TJUsYYvQqwl868zEMvCmj/l5G3++BdAZ7TrrfyS3BOBQM/lgfgjea9/7d9ji58kV8V75tpPx4AAA=='
}
+222
View File
@@ -0,0 +1,222 @@
const host = 'https://api.dbokutv.com';
const headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Referer": "https://www.duboku.tv/"
};
// --- 自实现 Base64 工具函数 (解决 crypto is not defined 问题) ---
function base64Encode(text) {
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
let b64 = '';
for (let i = 0; i < text.length; i += 3) {
let n = (text.charCodeAt(i) << 16) | (text.charCodeAt(i + 1) << 8) | text.charCodeAt(i + 2);
b64 += chars.charAt((n >> 18) & 63) + chars.charAt((n >> 12) & 63) + chars.charAt((n >> 6) & 63) + chars.charAt(n & 63);
}
let mod = text.length % 3;
return (mod ? b64.slice(0, mod - 3) + "===".substring(mod) : b64);
}
function base64Decode(str) {
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
str = str.replace(/=/g, '');
let bin = '';
for (let i = 0; i < str.length; i += 4) {
let n = (chars.indexOf(str.charAt(i)) << 18) | (chars.indexOf(str.charAt(i + 1)) << 12) |
(chars.indexOf(str.charAt(i + 2)) << 6) | chars.indexOf(str.charAt(i + 3));
bin += String.fromCharCode((n >> 16) & 255, (n >> 8) & 255, n & 255);
}
return bin.replace(/\0/g, '');
}
// --- 独播库核心解密逻辑 ---
function decodeData(data) {
if (!data || typeof data !== 'string') return '';
let strippedStr = data.replace(/['"]/g, '').trim();
if (!strippedStr) return '';
// 独播库特有:每10个字符翻转一次
let segmentLength = 10;
let processedBase64 = '';
for (let i = 0; i < strippedStr.length; i += segmentLength) {
let segment = strippedStr.substring(i, i + segmentLength);
processedBase64 += segment.split('').reverse().join('');
}
// 替换点号为等号并解码
processedBase64 = processedBase64.replace(/\./g, '=');
try {
return base64Decode(processedBase64);
} catch (e) {
return "";
}
}
function getSignedUrl(path) {
const timestamp = Math.floor(Date.now() / 1000).toString();
const randomNumber = Math.floor(Math.random() * 800000001);
const valueA = (randomNumber + 100000000).toString();
const valueB = (900000000 - randomNumber).toString();
const combined = valueA + valueB;
// 交织字符串 (Interleave)
let interleaved = '';
let minLen = Math.min(combined.length, timestamp.length);
for (let i = 0; i < minLen; i++) {
interleaved += combined[i] + timestamp[i];
}
interleaved += combined.substring(minLen) + timestamp.substring(minLen);
// 使用自实现函数生成 SSID 并替换等号
const ssid = base64Encode(interleaved).replace(/=/g, '.');
function randomStr(len) {
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
let res = '';
for (let i = 0; i < len; i++) res += chars.charAt(Math.floor(Math.random() * chars.length));
return res;
}
const sign = randomStr(60);
const token = randomStr(38);
const connector = path.includes('?') ? '&' : '?';
return `${host}${path}${connector}sign=${sign}&token=${token}&ssid=${ssid}`;
}
// --- Spider 接口实现 ---
async function init(cfg) {}
async function home(filter) {
// 对应 Python 版 homeContent
const classes = [
{ type_id: '2', type_name: '连续剧' },
{ type_id: '1', type_name: '电影' },
{ type_id: '3', type_name: '综艺' },
{ type_id: '4', type_name: '动漫' }
];
return JSON.stringify({ class: classes });
}
async function homeVod() {
// 对应 Python 版 homeVideoContent
const url = getSignedUrl('/home');
const r = await req(url, { headers });
const json = JSON.parse(r.content);
let videos = [];
json.forEach(group => {
(group.VodList || []).forEach(j => {
videos.push({
vod_id: decodeData(j.DId || j.DuId),
vod_name: j.Name,
vod_pic: decodeData(j.TnId),
vod_remarks: j.Tag
});
});
});
return JSON.stringify({ list: videos });
}
async function category(tid, pg, filter, extend = {}) {
// 对应 Python 版 categoryContent,注意 8 个连字符
let page = pg || 1;
let pageStr = page.toString() === '1' ? '' : page.toString();
let urlPath = `/vodshow/${tid}--------${pageStr}---`;
const url = getSignedUrl(urlPath);
const r = await req(url, { headers });
const json = JSON.parse(r.content);
let videos = (json.VodList || []).map(i => ({
vod_id: decodeData(i.DId || i.DuId),
vod_name: i.Name,
vod_pic: decodeData(i.TnId),
vod_remarks: i.Tag
}));
// 页码解析
let pageCount = page;
try {
(json.PaginationList || []).forEach(j => {
if (j.Type === 'StartEnd') {
let parts = decodeData(j.PId || j.PuId).split('-');
if (parts.length > 8) pageCount = parseInt(parts[8]);
} else if (j.Type === 'ShortPage') {
pageCount = parseInt(j.Name.split('/')[1]);
}
});
} catch (e) {}
return JSON.stringify({
page: parseInt(page),
pagecount: pageCount || parseInt(page),
list: videos
});
}
async function detail(id) {
// 对应 Python 版 detailContent
const url = getSignedUrl(id);
const r = await req(url, { headers });
const data = JSON.parse(r.content);
const playUrls = (data.Playlist || []).map(i => {
return `${i.EpisodeName}$${decodeData(i.VId)}`;
}).join('#');
return JSON.stringify({
list: [{
vod_id: id,
vod_name: data.Name,
vod_pic: decodeData(data.TnId),
vod_remarks: `评分:${data.Rating}`,
vod_year: data.ReleaseYear,
vod_area: data.Region,
vod_actor: Array.isArray(data.Actor) ? data.Actor.join(',') : data.Actor,
vod_director: data.Director,
vod_content: data.Description,
vod_play_from: '独播库',
vod_play_url: playUrls,
type_name: `${data.Genre || ''},${data.Scenario || ''}`
}]
});
}
async function search(wd, quick, pg = 1) {
// 对应 Python 版 searchContent
const url = getSignedUrl('/vodsearch') + `&wd=${encodeURIComponent(wd)}`;
const r = await req(url, { headers });
const json = JSON.parse(r.content);
const list = (json || []).map(i => ({
vod_id: decodeData(i.DId || i.DuId),
vod_name: i.Name,
vod_pic: decodeData(i.TnId),
vod_remarks: i.Tag
}));
return JSON.stringify({ page: pg, list: list });
}
async function play(flag, id, flags) {
// 对应 Python 版 playerContent
const url = getSignedUrl(id);
const r = await req(url, { headers });
const res = JSON.parse(r.content);
return JSON.stringify({
parse: 0,
url: decodeData(res.HId),
header: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
'Origin': 'https://w.duboku.io',
'Referer': 'https://w.duboku.io/'
}
});
}
export default { init, home, homeVod, category, detail, search, play };
+935
View File
@@ -0,0 +1,935 @@
globalThis.vod1 = function(ids) {
let html1 = request('https://pbaccess.video.qq.com/trpc.videosearch.mobile_search.MultiTerminalSearch/MbSearch?vplatform=2', {
body: {
"version": "25042201",
"clientType": 1,
"filterValue": "",
"uuid": "B1E50847-D25F-4C4B-BBA0-36F0093487F6",
"retry": 0,
"query": ids,
"pagenum": 0,
"isPrefetch": true,
"pagesize": 30,
"queryFrom": 0,
"searchDatakey": "",
"transInfo": "",
"isneedQc": true,
"preQid": "",
"adClientInfo": "",
"extraInfo": {
"isNewMarkLabel": "1",
"multi_terminal_pc": "1",
"themeType": "1",
"sugRelatedIds": "{}",
"appVersion": ""
}
},
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.139 Safari/537.36',
'Content-Type': 'application/json',
'origin': 'https://v.qq.com',
'referer': 'https://v.qq.com/'
},
'method': 'POST'
}, true);
return html1;
}
var rule = {
title: '腾云驾雾[官]',
host: 'https://v.%71%71.com',
// homeUrl: '/x/bu/pagesheet/list?_all=1&append=1&channel=choice&listpage=1&offset=0&pagesize=21&iarea=-1&sort=18',
homeUrl: '/x/bu/pagesheet/list?_all=1&append=1&channel=cartoon&listpage=1&offset=0&pagesize=21&iarea=-1&sort=18',
detailUrl: 'https://node.video.%71%71.com/x/api/float_vinfo2?cid=fyid',
searchUrl: '/x/search/?q=**&stag=fypage',
searchUrl: 'https://pbaccess.video.%71%71.com/trpc.videosearch.smartboxServer.HttpRountRecall/Smartbox?query=**&appID=3172&appKey=lGhFIPeD3HsO9xEp&pageNum=(fypage-1)&pageSize=10',
searchUrl: '**',
searchable: 2,
filterable: 1,
multi: 1,
// url:'/channel/fyclass?listpage=fypage&channel=fyclass&sort=18&_all=1',
url: '/x/bu/pagesheet/list?_all=1&append=1&channel=fyclass&listpage=1&offset=((fypage-1)*21)&pagesize=21&iarea=-1',
// filter_url: 'sort={{fl.sort or 18}}&year={{fl.year}}&pay={{fl.pay}}',
// filter_url: 'sort={{fl.sort or 75}}&year={{fl.year}}&pay={{fl.pay}}',
filter_url: 'sort={{fl.sort or 75}}&iyear={{fl.iyear}}&year={{fl.year}}&itype={{fl.type}}&ifeature={{fl.feature}}&iarea={{fl.area}}&itrailer={{fl.itrailer}}&gender={{fl.sex}}',
// filter: 'H4sIAAAAAAAAA+2UzUrDQBCA32XOEZLUJrGvIj0saaDBNisxBkIJCG3Fi4oepIg3EQoieqiH+vM23Zq+hRuaZLZ4ce9z2/lmd2d2+NgR+H0e+gF0DkdwFGTQgRMeJ2BAxIaSwvrqVnxcyzhlg9PttqjED2c/45cSy8DyIDcavr57q/lBw8XTd/E6qbnT8M3zTFyc72RtC/Jumd+2c8wy7KZ4nxSL5Z9uxHS+Gc+r83sWVp1eVttl4Dluk1h93YubWZVwduplAYuxoFguVp+P/y5om/Z+/YxyqfAW8pbKbeS2yi3kO/ebyE2Fy1nXXBm7DDzknspd5K7KHeSOytvI2+XAugYkKWlD2mhrM+RpSB8OmaNvTsriMEgycofc0XbHZ3HCeUTukDv67vTDQY/MIXO0zelxn5M4JI6mOPkvgswSEpgPAAA=',
filter: {
"choice": [{
"key": "sort",
"name": "排序",
"value": [{
"n": "最热",
"v": "75"
}, {
"n": "最新",
"v": "83"
}, {
"n": "好评",
"v": "81"
}]
}, {
"key": "iyear",
"name": "年代",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}]
}],
"tv": [{
"key": "sort",
"name": "排序",
"value": [{
"n": "最热",
"v": "75"
}, {
"n": "最新",
"v": "79"
}, {
"n": "好评",
"v": "16"
}]
}, {
"key": "feature",
"name": "类型",
"value": [{
"n": "全部",
"v": "-1"
}, {
"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": "13"
}, {
"n": "青春",
"v": "14"
}, {
"n": "猎奇",
"v": "15"
}, {
"n": "科幻",
"v": "16"
}, {
"n": "竞技",
"v": "17"
}, {
"n": "玄幻",
"v": "18"
}]
}, {
"key": "iyear",
"name": "年代",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}]
}],
"movie": [{
"key": "sort",
"name": "排序",
"value": [{
"n": "最热",
"v": "75"
}, {
"n": "最新",
"v": "83"
}, {
"n": "好评",
"v": "81"
}]
}, {
"key": "type",
"name": "类型",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "犯罪",
"v": "4"
}, {
"n": "励志",
"v": "2"
}, {
"n": "喜剧",
"v": "100004"
}, {
"n": "热血",
"v": "100061"
}, {
"n": "悬疑",
"v": "100009"
}, {
"n": "爱情",
"v": "100005"
}, {
"n": "科幻",
"v": "100012"
}, {
"n": "恐怖",
"v": "100010"
}, {
"n": "动画",
"v": "100015"
}, {
"n": "战争",
"v": "100006"
}, {
"n": "家庭",
"v": "100017"
}, {
"n": "剧情",
"v": "100022"
}, {
"n": "奇幻",
"v": "100016"
}, {
"n": "武侠",
"v": "100011"
}, {
"n": "历史",
"v": "100021"
}, {
"n": "老片",
"v": "100013"
}, {
"n": "西部",
"v": "3"
}, {
"n": "记录片",
"v": "100020"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}]
}],
"variety": [{
"key": "sort",
"name": "排序",
"value": [{
"n": "最热",
"v": "75"
}, {
"n": "最新",
"v": "23"
}]
}, {
"key": "iyear",
"name": "年代",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}]
}],
"cartoon": [{
"key": "sort",
"name": "排序",
"value": [{
"n": "最热",
"v": "75"
}, {
"n": "最新",
"v": "83"
}, {
"n": "好评",
"v": "81"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "内地",
"v": "1"
}, {
"n": "日本",
"v": "2"
}, {
"n": "欧美",
"v": "3"
}, {
"n": "其他",
"v": "4"
}]
}, {
"key": "type",
"name": "类型",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "玄幻",
"v": "9"
}, {
"n": "科幻",
"v": "4"
}, {
"n": "武侠",
"v": "13"
}, {
"n": "冒险",
"v": "3"
}, {
"n": "战斗",
"v": "5"
}, {
"n": "搞笑",
"v": "1"
}, {
"n": "恋爱",
"v": "7"
}, {
"n": "魔幻",
"v": "6"
}, {
"n": "竞技",
"v": "20"
}, {
"n": "悬疑",
"v": "17"
}, {
"n": "日常",
"v": "15"
}, {
"n": "校园",
"v": "16"
}, {
"n": "真人",
"v": "18"
}, {
"n": "推理",
"v": "14"
}, {
"n": "历史",
"v": "19"
}, {
"n": "经典",
"v": "3"
}, {
"n": "其他",
"v": "12"
}]
}, {
"key": "iyear",
"name": "年代",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}]
}],
"child": [{
"key": "sort",
"name": "排序",
"value": [{
"n": "最热",
"v": "75"
}, {
"n": "最新",
"v": "76"
}, {
"n": "好评",
"v": "20"
}]
}, {
"key": "sex",
"name": "性别",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "女孩",
"v": "1"
}, {
"n": "男孩",
"v": "2"
}]
}, {
"key": "area",
"name": "地区",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "内地",
"v": "3"
}, {
"n": "日本",
"v": "2"
}, {
"n": "其他",
"v": "1"
}]
}, {
"key": "iyear",
"name": "年龄段",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "0-3岁",
"v": "1"
}, {
"n": "4-6岁",
"v": "2"
}, {
"n": "7-9岁",
"v": "3"
}, {
"n": "10岁以上",
"v": "4"
}, {
"n": "全年龄段",
"v": "7"
}]
}],
"doco": [{
"key": "sort",
"name": "排序",
"value": [{
"n": "最热",
"v": "75"
}, {
"n": "最新",
"v": "74"
}]
}, {
"key": "itrailer",
"name": "出品方",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "BBC",
"v": "1"
}, {
"n": "国家地理",
"v": "4"
}, {
"n": "HBO",
"v": "3175"
}, {
"n": "NHK",
"v": "2"
}, {
"n": "历史频道",
"v": "7"
}, {
"n": "ITV",
"v": "3530"
}, {
"n": "探索频道",
"v": "3174"
}, {
"n": "ZDF",
"v": "3176"
}, {
"n": "腾讯自制",
"v": "15"
}, {
"n": "合作机构",
"v": "6"
}, {
"n": "其他",
"v": "5"
}]
}, {
"key": "type",
"name": "类型",
"value": [{
"n": "全部",
"v": "-1"
}, {
"n": "自然",
"v": "4"
}, {
"n": "美食",
"v": "10"
}, {
"n": "社会",
"v": "3"
}, {
"n": "人文",
"v": "6"
}, {
"n": "历史",
"v": "1"
}, {
"n": "军事",
"v": "2"
}, {
"n": "科技",
"v": "8"
}, {
"n": "财经",
"v": "14"
}, {
"n": "探险",
"v": "15"
}, {
"n": "罪案",
"v": "7"
}, {
"n": "竞技",
"v": "12"
}, {
"n": "旅游",
"v": "11"
}]
}]
},
headers: {
'User-Agent': 'PC_UA'
},
timeout: 5000,
// class_parse:'.site_channel a;a&&Text;a&&href;channel/(.*)',
cate_exclude: '会员|游戏|全部',
// class_name: '精选&电视剧&电影&综艺&动漫&少儿&纪录片',
// class_url: 'choice&tv&movie&variety&cartoon&child&doco',
class_name: '电影&电视剧&综艺&动漫&少儿&纪录片',
class_url: 'movie&tv&variety&cartoon&child&doco',
limit: 20,
// play_parse:true,
// 手动调用解析请求json的url,此lazy不方便
play_parse: true,
lazy: $js.toString(() => {
try {
let api = "http://140.210.9.53:8100/api/?key=9a23b051c3c3d857ab0b2eecf6e552c5&url=" + input.split("?")[0];
console.log(api);
let response = fetch(api, {
method: 'get',
headers: {
'User-Agent': 'okhttp/3.14.9',
'Content-Type': 'application/x-www-form-urlencoded'
}
});
let bata = JSON.parse(response);
log(bata)
if (bata.url.includes("qq")) {
input = {
header: {
'User-Agent': ""
},
parse: 0,
url: bata.url,
jx: 0,
danmaku: '' + input.split("?")[0]
};
} else {
input = {
header: {
'User-Agent': ""
},
parse: 0,
url: input.split("?")[0],
jx: 1,
danmaku: '' + input.split("?")[0]
};
}
} catch {
input = {
header: {
'User-Agent': ""
},
parse: 0,
url: input.split("?")[0],
jx: 1,
danmaku: '' + input.split("?")[0]
};
}
}),
推荐: '.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
一级: '.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
二级: $js.toString(() => {
VOD = {};
let d = [];
let video_list = [];
let video_lists = [];
let list = [];
let QZOutputJson;
let html = fetch(input, fetch_params);
let sourceId = /get_playsource/.test(input) ? input.match(/id=(\d*?)&/)[1] : input.split("cid=")[1];
let cid = sourceId;
let detailUrl = "https://v.%71%71.com/detail/m/" + cid + ".html";
log("详情页:" + detailUrl);
pdfh = jsp.pdfh;
pd = jsp.pd;
try {
let json = JSON.parse(html);
VOD = {
vod_url: input,
vod_name: json.c.title,
type_name: json.typ.join(","),
vod_actor: json.nam.join(","),
vod_year: json.c.year,
vod_content: json.c.description,
vod_remarks: json.rec,
vod_pic: urljoin2(input, json.c.pic)
}
} catch (e) {
log("解析片名海报等基础信息发生错误:" + e.message)
}
if (/get_playsource/.test(input)) {
eval(html);
let indexList = QZOutputJson.PlaylistItem.indexList;
indexList.forEach(function(it) {
let dataUrl = "https://s.video.qq.com/get_playsource?id=" + sourceId + "&plat=2&type=4&data_type=3&range=" + it + "&video_type=10&plname=qq&otype=json";
eval(fetch(dataUrl, fetch_params));
let vdata = QZOutputJson.PlaylistItem.videoPlayList;
vdata.forEach(function(item) {
d.push({
title: item.title,
pic_url: item.pic,
desc: item.episode_number + "\t\t\t播放量:" + item.thirdLine,
url: item.playUrl
})
});
video_lists = video_lists.concat(vdata)
})
} else {
let json = JSON.parse(html);
video_lists = json.c.video_ids;
let url = "https://v.qq.com/x/cover/" + sourceId + ".html";
if (video_lists.length === 1) {
let vid = video_lists[0];
url = "https://v.qq.com/x/cover/" + cid + "/" + vid + ".html";
d.push({
title: "在线播放",
url: url
})
} else if (video_lists.length > 1) {
for (let i = 0; i < video_lists.length; i += 30) {
video_list.push(video_lists.slice(i, i + 30))
}
video_list.forEach(function(it, idex) {
let o_url = "https://union.video.qq.com/fcgi-bin/data?otype=json&tid=1804&appid=20001238&appkey=6c03bbe9658448a4&union_platform=1&idlist=" + it.join(",");
let o_html = fetch(o_url, fetch_params);
eval(o_html);
QZOutputJson.results.forEach(function(it1) {
it1 = it1.fields;
let url = "https://v.qq.com/x/cover/" + cid + "/" + it1.vid + ".html";
d.push({
title: it1.title,
pic_url: it1.pic160x90.replace("/160", ""),
desc: it1.video_checkup_time,
url: url,
type: it1.category_map && it1.category_map.length > 1 ? it1.category_map[1] : ""
})
})
})
}
}
let yg = d.filter(function(it) {
return it.type && it.type !== "正片"
});
let zp = d.filter(function(it) {
return !(it.type && it.type !== "正片")
});
VOD.vod_play_from = yg.length < 1 ? "qq" : "qq$$$qq 预告及花絮";
VOD.vod_play_url = yg.length < 1 ? d.map(function(it) {
return it.title + "$" + it.url
}).join("#") : [zp, yg].map(function(it) {
return it.map(function(its) {
return its.title + "$" + its.url
}).join("#")
}).join("$$$");
}),
搜索: $js.toString(() => {
let d = [];
pdfa = jsp.pdfa;
pdfh = jsp.pdfh;
pd = jsp.pd;
let html = request(input);
let baseList = pdfa(html, "body&&.result_item_v");
log(baseList.length);
baseList.forEach(function(it) {
let longText = pdfh(it, ".result_title&&a&&Text");
let shortText = pdfh(it, ".type&&Text");
let fromTag = pdfh(it, ".result_source&&Text");
let score = pdfh(it, ".figure_info&&Text");
let content = pdfh(it, ".desc_text&&Text");
// let url = pdfh(it, ".result_title&&a&&href");
let url = pdfh(it, "div&&r-data");
// log(longText);
// log(shortText);
// log('url:'+url);
let img = pd(it, ".figure_pic&&src");
url = "https://node.video.qq.com/x/api/float_vinfo2?cid=" + url.match(/.*\/(.*?)\.html/)[1];
log(shortText + "|" + url);
if (fromTag.match(/腾讯/)) {
d.push({
title: longText.split(shortText)[0],
img: img,
url: url,
content: content,
desc: shortText + " " + score
})
}
});
setResult(d);
}),
搜索: $js.toString(() => {
let d = [];
let html = request(input);
let json = JSON.parse(html);
if (json.data.smartboxItemList.length > 0) {
let cid = json.data.smartboxItemList[0].basicDoc.id;
let url = 'https://node.video.qq.com/x/api/float_vinfo2?cid=' + cid;
let html1 = request(url);
let data = JSON.parse(html1);
d.push({
title: data.c.title,
img: data.c.pic,
url: url,
content: data.c.description,
desc: data.rec
});
}
setResult(d);
}),
搜索: $js.toString(() => {
let d = [];
let mame = (input.split("/")[3]);
let html = vod1(input.split("/")[3]);
let json = JSON.parse(html);
let list = json.data.normalList.itemList;
console.log(json);
log(list[0].videoInfo.title);
list.forEach(function(it) {
try {
if (it.doc.id.length > 11) {
d.push({
title: it.videoInfo.title,
img: it.videoInfo.imgUrl,
url: it.doc.id,
// content: "",
//desc: "data.rec"
});
}
} catch {
}
});
let list2 = json.data.areaBoxList[0].itemList;
list2.forEach(function(it) {
try {
if (it.doc.id.length > 11 && it.videoInfo.title.match(mame)) {
d.push({
title: it.videoInfo.title,
img: it.videoInfo.imgUrl,
url: it.doc.id,
// content: "",
//desc: "data.rec"
});
}
} catch {
}
});
setResult(d);
})
}
+843
View File
@@ -0,0 +1,843 @@
var rule = {
title: '百忙无果[官]',
host: 'https://pianku.api.%6d%67%74%76.com',
homeUrl: '',
// searchUrl: 'https://mobileso.bz.%6d%67%74%76.com/pc/search/v1?q=**&pn=fypage&pc=10',
// 新版接口搜索变成v2并且加了验证,蛋疼
// searchUrl: 'https://mobileso.bz.mgtv.com/pc/search/v2?allowedRC=1&src=mgtv&did=cf03b959-6945-4cb6-bcb3-88762459354d&timestamp=2024-06-21T15%3A52%3A55Z&signVersion=1&signNonce=8dae67a1fafc4bda984ec8deb47666ad&q=**&pn=fypage&pc=10&corr=1&_support=10000000&signature=4e27fddcd2a1a66d6c1764ed6b74bab7',
// 用手机的吧,搞不定这个
searchUrl: 'https://mobileso.bz.%6d%67%74%76.com/msite/search/v2?q=**&pn=fypage&pc=10',
detailUrl: 'https://pcweb.api.mgtv.com/episode/list?page=1&size=50&video_id=fyid',
searchable: 2,
quickSearch: 0,
filterable: 1,
multi: 1,
// 分类链接fypage参数支持1个()表达式
// https://www.mgtv.com/lib/3?lastp=list_index&kind=a1&year=all&chargeInfo=a1&sort=c2
url: '/rider/list/pcweb/v3?platform=pcweb&channelId=fyclass&pn=fypage&pc=80&hudong=1&_support=10000000&kind=a1&area=a1',
filter_url: 'year={{fl.year or "all"}}&sort={{fl.sort or "all"}}&chargeInfo={{fl.chargeInfo or "all"}}',
headers: {
'User-Agent': 'PC_UA'
},
timeout: 5000,
class_name: '电视剧&电影&综艺&动漫&纪录片&教育&少儿',
class_url: '2&3&1&50&51&115&10',
filter: {
"1": [{
"key": "chargeInfo",
"name": "付费类型",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "免费",
"v": "b1"
}, {
"n": "vip",
"v": "b2"
}, {
"n": "VIP用券",
"v": "b3"
}, {
"n": "付费点播",
"v": "b4"
}]
}, {
"key": "sort",
"name": "排序",
"value": [{
"n": "最新",
"v": "c1"
}, {
"n": "最热",
"v": "c2"
}, {
"n": "知乎高分",
"v": "c4"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}]
}],
"2": [{
"key": "chargeInfo",
"name": "付费类型",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "免费",
"v": "b1"
}, {
"n": "vip",
"v": "b2"
}, {
"n": "VIP用券",
"v": "b3"
}, {
"n": "付费点播",
"v": "b4"
}]
}, {
"key": "sort",
"name": "排序",
"value": [{
"n": "最新",
"v": "c1"
}, {
"n": "最热",
"v": "c2"
}, {
"n": "知乎高分",
"v": "c4"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}]
}],
"3": [{
"key": "chargeInfo",
"name": "付费类型",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "免费",
"v": "b1"
}, {
"n": "vip",
"v": "b2"
}, {
"n": "VIP用券",
"v": "b3"
}, {
"n": "付费点播",
"v": "b4"
}]
}, {
"key": "sort",
"name": "排序",
"value": [{
"n": "最新",
"v": "c1"
}, {
"n": "最热",
"v": "c2"
}, {
"n": "知乎高分",
"v": "c4"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}]
}],
"50": [{
"key": "chargeInfo",
"name": "付费类型",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "免费",
"v": "b1"
}, {
"n": "vip",
"v": "b2"
}, {
"n": "VIP用券",
"v": "b3"
}, {
"n": "付费点播",
"v": "b4"
}]
}, {
"key": "sort",
"name": "排序",
"value": [{
"n": "最新",
"v": "c1"
}, {
"n": "最热",
"v": "c2"
}, {
"n": "知乎高分",
"v": "c4"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}]
}],
"51": [{
"key": "chargeInfo",
"name": "付费类型",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "免费",
"v": "b1"
}, {
"n": "vip",
"v": "b2"
}, {
"n": "VIP用券",
"v": "b3"
}, {
"n": "付费点播",
"v": "b4"
}]
}, {
"key": "sort",
"name": "排序",
"value": [{
"n": "最新",
"v": "c1"
}, {
"n": "最热",
"v": "c2"
}, {
"n": "知乎高分",
"v": "c4"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}]
}],
"115": [{
"key": "chargeInfo",
"name": "付费类型",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "免费",
"v": "b1"
}, {
"n": "vip",
"v": "b2"
}, {
"n": "VIP用券",
"v": "b3"
}, {
"n": "付费点播",
"v": "b4"
}]
}, {
"key": "sort",
"name": "排序",
"value": [{
"n": "最新",
"v": "c1"
}, {
"n": "最热",
"v": "c2"
}, {
"n": "知乎高分",
"v": "c4"
}]
}, {
"key": "year",
"name": "年代",
"value": [{
"n": "全部",
"v": "all"
}, {
"n": "2025",
"v": "2025"
}, {
"n": "2024",
"v": "2024"
}, {
"n": "2023",
"v": "2023"
}, {
"n": "2022",
"v": "2022"
}, {
"n": "2021",
"v": "2021"
}, {
"n": "2020",
"v": "2020"
}, {
"n": "2019",
"v": "2019"
}, {
"n": "2018",
"v": "2018"
}, {
"n": "2017",
"v": "2017"
}, {
"n": "2016",
"v": "2016"
}, {
"n": "2015",
"v": "2015"
}, {
"n": "2014",
"v": "2014"
}, {
"n": "2013",
"v": "2013"
}, {
"n": "2012",
"v": "2012"
}, {
"n": "2011",
"v": "2011"
}, {
"n": "2010",
"v": "2010"
}, {
"n": "2009",
"v": "2009"
}, {
"n": "2008",
"v": "2008"
}, {
"n": "2007",
"v": "2007"
}, {
"n": "2006",
"v": "2006"
}, {
"n": "2005",
"v": "2005"
}, {
"n": "2004",
"v": "2004"
}]
}]
},
limit: 20,
play_parse: true,
lazy: $js.toString(() => {
try {
let api = "http://140.210.9.53:8100/api/?key=9a23b051c3c3d857ab0b2eecf6e552c5&url=" + input.split("?")[0];
console.log(api);
let response = fetch(api, {
method: 'get',
headers: {
'User-Agent': 'okhttp/3.14.9',
'Content-Type': 'application/x-www-form-urlencoded'
}
});
let bata = JSON.parse(response);
if (bata.url.includes("mgtv")) {
input = {
parse: 0,
url: bata.url,
jx: 0,
danmaku: "" + input.split("?")[0]
};
} else {
input = {
parse: 0,
url: input.split("?")[0],
jx: 1,
danmaku: "" + input.split("?")[0]
};
}
} catch {
input = {
parse: 0,
url: input.split("?")[0],
jx: 1,
danmaku: "" + input.split("?")[0]
};
}
}),
// 手动调用解析请求json的url,此lazy不方便
// lazy:'js:print(input);fetch_params.headers["user-agent"]=MOBILE_UA;let html=request(input);let rurl=html.match(/window\\.open\\(\'(.*?)\',/)[1];rurl=urlDeal(rurl);input={parse:1,url:rurl};',
// 推荐:'.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
一级: 'json:data.hitDocs;title;img;updateInfo||rightCorner.text;playPartId',
// 一级:'json:data.hitDocs;title;img;updateInfo;playPartId',
二级: $js.toString(() => {
fetch_params.headers.Referer = "https://www.mgtv.com";
fetch_params.headers["User-Agent"] = MOBILE_UA;
pdfh = jsp.pdfh;
pdfa = jsp.pdfa;
pd = jsp.pd;
VOD = {};
let d = [];
let html = request(input);
let json = JSON.parse(html);
let host = "https://www.mgtv.com";
let ourl = json.data.list.length > 0 ? json.data.list[0].url : json.data.series[0].url;
if (!/^http/.test(ourl)) {
ourl = host + ourl
}
fetch_params.headers["User-Agent"] = MOBILE_UA;
html = request(ourl);
if (html.includes("window.location =")) {
print("开始获取ourl");
ourl = pdfh(html, "meta[http-equiv=refresh]&&content").split("url=")[1];
print("获取到ourl:" + ourl);
html = request(ourl)
}
try {
let details = pdfh(html, ".m-details&&Html").replace(/h1>/, "h6>").replace(/div/g, "br");
print(details);
let actor = "",
director = "",
time = "";
if (/播出时间/.test(details)) {
actor = pdfh(html, "p:eq(5)&&Text").substr(0, 25);
director = pdfh(html, "p:eq(4)&&Text");
time = pdfh(html, "p:eq(3)&&Text")
} else {
actor = pdfh(html, "p:eq(4)&&Text").substr(0, 25);
director = pdfh(html, "p:eq(3)&&Text");
time = "已完结"
}
let _img = pd(html, ".video-img&&img&&src");
let JJ = pdfh(html, ".desc&&Text").split("简介:")[1];
let _desc = time;
VOD.vod_name = pdfh(html, ".vt-txt&&Text");
VOD.type_name = pdfh(html, "p:eq(0)&&Text").substr(0, 6);
VOD.vod_area = pdfh(html, "p:eq(1)&&Text");
VOD.vod_actor = actor;
VOD.vod_director = director;
VOD.vod_remarks = _desc;
VOD.vod_pic = _img;
VOD.vod_content = JJ;
if (!VOD.vod_name) {
VOD.vod_name = VOD.type_name;
}
} catch (e) {
log("获取影片信息发生错误:" + e.message)
}
function getRjpg(imgUrl, xs) {
xs = xs || 3;
let picSize = /jpg_/.test(imgUrl) ? imgUrl.split("jpg_")[1].split(".")[0] : false;
let rjpg = false;
if (picSize) {
let a = parseInt(picSize.split("x")[0]) * xs;
let b = parseInt(picSize.split("x")[1]) * xs;
rjpg = a + "x" + b + ".jpg"
}
let img = /jpg_/.test(imgUrl) && rjpg ? imgUrl.replace(imgUrl.split("jpg_")[1], rjpg) : imgUrl;
return img
}
if (json.data.total === 1 && json.data.list.length === 1) {
let data = json.data.list[0];
let url = "https://www.mgtv.com" + data.url;
d.push({
title: data.t4,
desc: data.t2,
pic_url: getRjpg(data.img),
url: url
})
} else if (json.data.list.length > 1) {
for (let i = 1; i <= json.data.total_page; i++) {
if (i > 1) {
json = JSON.parse(fetch(input.replace("page=1", "page=" + i), {}))
}
json.data.list.forEach(function(data) {
let url = "https://www.mgtv.com" + data.url;
if (data.isIntact == "1") {
d.push({
title: data.t4,
desc: data.t2,
pic_url: getRjpg(data.img),
url: url
})
}
})
}
} else {
print(input + "暂无片源")
}
VOD.vod_play_from = "mgtv";
VOD.vod_play_url = d.map(function(it) {
return it.title + "$" + it.url
}).join("#");
setResult(d);
}),
搜索: $js.toString(() => {
fetch_params.headers.Referer = "https://www.mgtv.com";
fetch_params.headers["User-Agent"] = MOBILE_UA;
let d = [];
let html = request(input);
let json = JSON.parse(html);
json.data.contents.forEach(function(data) {
if (data.type && data.type == 'media') {
let item = data.data[0];
let desc = item.desc.join(',');
let fyclass = '';
if (item.source === "imgo") {
let img = item.img ? item.img : '';
try {
fyclass = item.rpt.match(/idx=(.*?)&/)[1] + '$';
} catch (e) {
log(e.message);
fyclass = '';
}
log(fyclass);
d.push({
title: item.title.replace(/<B>|<\/B>/g, ''),
img: img,
content: '',
desc: desc,
url: fyclass + item.url.match(/.*\/(.*?)\.html/)[1]
})
}
}
});
setResult(d);
}),
}
+70
View File
@@ -0,0 +1,70 @@
var rule = {
title:'央视频',
host:'https://api.cntv.cn',
homeUrl: '/lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=500&serviceId=tvcctv&t=json',
// url:'/list/getVideoAlbumList?fyfilter&area=&letter=&n=24&serviceId=tvcctv&t=json',
url: '/NewVideo/getVideoListByColumn?id=fyclass&n=10&sort=desc&p=fypage&mode=0&serviceId=tvcctv',
url:'/lanmu/columnSearch?&fl=&fc=fyclass&cid=&p=fypage&n=500&serviceId=tvcctv&t=json',
searchUrl:'',
searchable:0,
quickSearch:0,
class_name: '体育&综艺&健康&生活&科教&经济&农业&法治&军事&少儿&动画',
class_url:'体育&综艺&健康&生活&科教&经济&农业&法治&军事&少儿&动画',
filterable: 1,
headers:{
'User-Agent':'PC_UA'
},
timeout:10000,
play_parse:true,
limit:6,
double:false,
一级: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input)).response.docs;
list.forEach(it => {
let guid1 = it.lastVIDE.videoSharedCode;
// 一级标题
let title1 = it.column_name;
// 一级描述
let desc1 = it.column_playdate + it.channel_name ;
// 一级图片URL
let picUrl1 = it.column_logo;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 更新至)
let url1 = it.lastVIDE.videoSharedCode + '|' + '' + '|' + it.column_firstclass + '|' + it.column_name + '|' + '' + '|' + it.column_playdate + '|' + it.channel_name + '|' + it.column_brief + '|' + it.column_logo + '|' + '' + '|' + it.lastVIDE.videoTitle;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
url : url1
})
})
setResult(d);
}),
二级 : $js.toString(() => {
let info = input.split("|");
let guid = info[0].replaceAll('https://api.cntv.cn/lanmu/', '');
VOD = {
vod_id: info[1],
vod_name: info[3],
vod_pic: info[5],
type_name: info[2],
vod_year: info[2],
vod_area: info[1],
vod_remarks: 'ƪ(˘⌣˘)ʃ优雅',
vod_director: 'ƪ(˘⌣˘)ʃ优雅',
vod_actor: 'ƪ(˘⌣˘)ʃ优雅',
vod_content: info[7],
vod_play_from: '央视频',
//https://hls.cntv.myalicdn.com//asp/hls/2000/0303000a/3/default/https://api.cntv.cn/lanmu/1a01871d6d5f4d4bbe82b9c62650f100/2000.m3u8
vod_play_url: '立即播放$https://cntv.playdreamer.cn/proxy/asp/hls/850/0303000a/3/default/' + guid + '/850.m3u8'
};
}),
搜索:'',
}
+234
View File
@@ -0,0 +1,234 @@
var rule = {
title:'央视频',
host:'https://api.cntv.cn',
homeUrl: '/lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=500&serviceId=tvcctv&t=json',
//lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=20&serviceId=tvcctv&t=jsonp&cb=Callback
url:'/list/getVideoAlbumList?fyfilter&area=&letter=&n=24&serviceId=tvcctv&t=json',
// searchUrl:'https://search.cctv.com/search.php?qtext=**&type=video',
// https://search.cctv.com/m/if3g_search.php?page=fypage&qtext=**&type=video&sort=SCORE&pageSize=20&channel=
searchUrl:'https://search.cctv.com/m/if3g_search.php?page=fypage&qtext=**&type=video&sort=SCORE&pageSize=20&channel=',
searchable:1,
quickSearch:1,
class_name: '4K专区&栏目大全&特别节目&纪录片&电视剧&动画片',
class_url: '4K专区&栏目大全&特别节目&纪录片&电视剧&动画片',
filterable: 1,
filter_url: 'channel={{fl.channel}}&sc={{fl.sc}}&year={{fl.year}}',
filter: {
"纪录片":[
{"key":"channel","name":"频道","value":[{"n":"全部","v":""},{"n":"CCTV-1综合","v":"CCTV-1综合,CCTV-1高清,CCTV-1综合高清"},{"n":"CCTV-2财经","v":"CCTV-2财经,CCTV-2高清,CCTV-2财经高清"},{"n":"CCTV-3综艺","v":"CCTV-3综艺,CCTV-3高清,CCTV-3综艺高清"},{"n":"CCTV-4中文国际","v":"CCTV-4中文国际,CCTV-4高清,CCTV-4中文国际(亚)高清"},{"n":"CCTV-5体育","v":"CCTV-5体育,CCTV-5高清,CCTV-5体育高清"},{"n":"CCTV-6电影","v":"CCTV-6电影,CCTV-6高清,CCTV-6电影高清"},{"n":"CCTV-7国防军事","v":"CCTV-7国防军事,CCTV-7高清,CCTV-7国防军事高清"},{"n":"CCTV-8电视剧","v":"CCTV-8电视剧,CCTV-8高清,CCTV-8电视剧高清"},{"n":"CCTV-9纪录","v":"CCTV-9纪录,CCTV-9高清,CCTV-9纪录高清"},{"n":"CCTV-10科教","v":"CCTV-10科教,CCTV-10高清,CCTV-10科教高清"},{"n":"CCTV-11戏曲","v":"CCTV-11戏曲,CCTV-11高清,CCTV-11戏曲高清"},{"n":"CCTV-12社会与法","v":"CCTV-12社会与法,CCTV-12高清,CCTV-12社会与法高清"},{"n":"CCTV-13新闻","v":"CCTV-13新闻,CCTV-13高清,CCTV-13新闻高清"},{"n":"CCTV-14少儿","v":"CCTV-14少儿,CCTV-14高清,CCTV-14少儿高清"},{"n":"CCTV-15音乐","v":"CCTV-15音乐,CCTV-15高清,CCTV-15音乐高清"},{"n":"CCTV-17农业农村","v":"CCTV-17农业农村,高清,高清"}]},
{"key":"sc","name":"类型","value":[{"n":"全部","v":""},{"n":"人文历史","v":"人文历史"},{"n":"人物","v":"人物"},{"n":"军事","v":"军事"},{"n":"探索","v":"探索"},{"n":"社会","v":"社会"},{"n":"时政","v":"时政"},{"n":"经济","v":"经济"},{"n":"科技","v":"科技"}]},
{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"}]},
],
"特别节目":[
{"key":"channel","name":"频道","value":[{"n":"全部","v":""},{"n":"CCTV-1综合","v":"CCTV-1综合,CCTV-1高清,CCTV-1综合高清"},{"n":"CCTV-2财经","v":"CCTV-2财经,CCTV-2高清,CCTV-2财经高清"},{"n":"CCTV-3综艺","v":"CCTV-3综艺,CCTV-3高清,CCTV-3综艺高清"},{"n":"CCTV-4中文国际","v":"CCTV-4中文国际,CCTV-4高清,CCTV-4中文国际(亚)高清"},{"n":"CCTV-5体育","v":"CCTV-5体育,CCTV-5高清,CCTV-5体育高清"},{"n":"CCTV-6电影","v":"CCTV-6电影,CCTV-6高清,CCTV-6电影高清"},{"n":"CCTV-7国防军事","v":"CCTV-7国防军事,CCTV-7高清,CCTV-7国防军事高清"},{"n":"CCTV-8电视剧","v":"CCTV-8电视剧,CCTV-8高清,CCTV-8电视剧高清"},{"n":"CCTV-9纪录","v":"CCTV-9纪录,CCTV-9高清,CCTV-9纪录高清"},{"n":"CCTV-10科教","v":"CCTV-10科教,CCTV-10高清,CCTV-10科教高清"},{"n":"CCTV-11戏曲","v":"CCTV-11戏曲,CCTV-11高清,CCTV-11戏曲高清"},{"n":"CCTV-12社会与法","v":"CCTV-12社会与法,CCTV-12高清,CCTV-12社会与法高清"},{"n":"CCTV-13新闻","v":"CCTV-13新闻,CCTV-13高清,CCTV-13新闻高清"},{"n":"CCTV-14少儿","v":"CCTV-14少儿,CCTV-14高清,CCTV-14少儿高清"},{"n":"CCTV-15音乐","v":"CCTV-15音乐,CCTV-15高清,CCTV-15音乐高清"},{"n":"CCTV-17农业农村","v":"CCTV-17农业农村,高清,高清"}]},
{"key":"sc","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":"其他"}]},
],
"电视剧":[
{"key":"sc","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":"农村","v":"农村"},{"n":"都市","v":"都市"},{"n":"其他","v":"其他"}]},
{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"},{"n":"2003","v":"2003"},{"n":"2002","v":"2002"},{"n":"2001","v":"2001"},{"n":"2000","v":"2000"},{"n":"1999","v":"1999"},{"n":"1998","v":"1998"},{"n":"1997","v":"1997"}]},
],
},
headers:{
'User-Agent':'PC_UA'
},
timeout:10000,
play_parse:true,
lazy: $js.toString(() => {
let id = input.split("|")[0];
let k4 = input.split("|")[1];
let fc = input.split("|")[2];
if (k4 === '7' && fc!== '体育'){
input = 'https://hls.cntv.myhwcdn.cn/asp/hls/4000/0303000a/3/default/' + id + '/4000.m3u8';
} else {
input = 'https://cntv.playdreamer.cn/proxy/asp/hls/850/0303000a/3/default/' + id + '/850.m3u8';
}
}),
limit:6,
double:false,
/*
推荐: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input)).response.docs;
list.forEach(it => {
// 一级标题
let title1 = it.column_name;
// 一级描述
let desc1 = it.channel_name;
// 一级图片URL
let picUrl1 = it.column_logo;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 更新至)
let url1 = it.lastVIDE.videoSharedCode + '|' + '' + '|' + it.column_firstclass + '|' + it.column_name + '|' + '' + '|' + it.column_playdate + '|' + it.channel_name + '|' + it.column_brief + '|' + it.column_logo + '|' + '' + '|' + it.lastVIDE.videoTitle;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
url : url1
})
})
setResult(d);
}),
*/
一级: $js.toString(() => {
var d = [];
if(MY_CATE==='栏目大全') {
var list = JSON.parse(request(HOST+'/lanmu/columnSearch?&fl=&fc=&cid=&p='+MY_PAGE+'&n=500&serviceId=tvcctv&t=json')).response.docs;
list.forEach(it => {
// 一级标题
let title1 = it.column_name;
// 一级描述
let desc1 = it.channel_name;
// 一级图片URL
let picUrl1 = it.column_logo;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 更新至)
let url1 = it.lastVIDE.videoSharedCode + '|' + '' + '|' + it.column_firstclass + '|' + it.column_name + '|' + '' + '|' + it.column_playdate + '|' + it.channel_name + '|' + it.column_brief + '|' + it.column_logo + '|' + '' + '|' + it.lastVIDE.videoTitle;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
url : url1
})
})
}
else if(MY_CATE==='4K专区') {
var list = JSON.parse(request(HOST+'/NewVideo/getLastVideoList4K?serviceId=cctv4k&cid=&p='+MY_PAGE+'&n=500&serviceId=tvcctv&t=json')).data.list;
list.forEach(it => {
// 一级标题
let title1 = it.title;
// 一级描述
let desc1 = it.sc + ((typeof it.year==='undefined' || it.year==='')?'':('•'+it.year)) + ((typeof it.count==='undefined' || it.count==='')?'':('•共' + it.count + '集'));
// 一级图片URL
let picUrl1 = it.image;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 集数)
let url1 = it.id + '|' + it.area + '|' + it.sc + '|' + it.title + '|' + it.actors + '|' + it.year + '|' + it.channel + '|' + it.brief + '|' + it.image + '|' + it.count + '|' + '' + '|' + MY_CATE;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
url : url1
})
})
}
else {
var channelMap = {
"特别节目": "CHAL1460955953877151",
"纪录片": "CHAL1460955924871139",
"电视剧": "CHAL1460955853485115",
"动画片": "CHAL1460955899450127",
};
var list = JSON.parse(request(input+'&channelid='+channelMap[MY_CATE]+'&fc='+MY_CATE+'&p='+MY_PAGE)).data.list;
list.forEach(it => {
// 一级标题
let title1 = it.title;
// 一级描述
let desc1 = it.sc + ((typeof it.year==='undefined' || it.year==='')?'':('•'+it.year)) + ((typeof it.count==='undefined' || it.count==='')?'':('•共' + it.count + '集'));
// 一级图片URL
let picUrl1 = it.image;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 集数)
let url1 = it.id + '|' + it.area + '|' + it.sc + '|' + it.title + '|' + it.actors + '|' + it.year + '|' + it.channel + '|' + it.brief + '|' + it.image + '|' + it.count + '|' + '' + '|' + MY_CATE;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
url : url1
})
})
}
setResult(d);
}),
二级: $js.toString(() => {
let info = input.split("|");
VOD = {
vod_id: info[0],
vod_name: info[3],
vod_pic: info[8],
type_name: info[2]==='undefined'?'':info[2],
vod_year: info[5]==='undefined'?'':info[5],
vod_area: info[1]==='undefined'?'':info[1],
vod_remarks: info[9]===''?('更新至'+info[10]):('共'+info[9]+'集'),
vod_director: info[6]==='undefined'?'':info[6],
vod_actor: info[4]==='undefined'?'':info[4],
vod_content: info[7]==='undefined'?'':info[7],
};
var modeMap = {
"4K专区": "0",
"特别节目": "0",
"纪录片": "0",
"电视剧": "0",
"动画片": "1",
};
var ctid = info[0].replace('https://api.cntv.cn/lanmu/','');
var link = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?id='+ctid+'&serviceId=tvcctv&p=1&n=100&mode='+modeMap[info[11]]+'&pub=1';
var html = JSON.parse(request(link));
var playUrls;
if(html.errcode==='1001'){
var guid = info[0].replace('https://api.cntv.cn/lanmu/','');
var link1 = 'https://api.cntv.cn/video/videoinfoByGuid?guid='+guid+'&serviceId=tvcctv';
ctid = JSON.parse(request(link1)).ctid.replace('https://api.cntv.cn/lanmu/','');
var link2 = 'https://api.cntv.cn/NewVideo/getVideoListByColumn?id='+ctid+'&d=&p=1&n=100&sort=desc&mode=0&serviceId=tvcctv&t=json';
playUrls = JSON.parse(request(link2)).data.list;
} else {
playUrls = html.data.list;
// 获取更多数据,暂不需要
var flag = '';
if(playUrls===''){
flag = 'true';
}
var page = 1;
while(flag===''){
page = page+1;
var burl = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?id='+ctid+'&serviceId=tvcctv&p='+page+'&n=100&mode='+modeMap[info[11]]+'&pub=1';
var list = JSON.parse(request(burl)).data.list;
if (list.length!==0){
list.forEach(it => {
playUrls.push(it);
})
continue;
}else{
flag='true';
break;
}
}
}
let playFrom = [];
let playList = [];
playFrom.append('央视频');
playUrls.forEach(it => {
playList.append(playUrls.map(function(it) {
return it.title + "$" + it.guid + "|" + it.type + "|" + it.fc
}).join("#"))
});
// 最后封装所有线路
// let vod_content = playUrls;
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;
}),
搜索:'',
}
+97
View File
@@ -0,0 +1,97 @@
var rule = {
title:'央视频',
host:'https://api.cntv.cn',
homeUrl: '/lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=500&serviceId=tvcctv&t=json',
// url:'/list/getVideoAlbumList?fyfilter&area=&letter=&n=24&serviceId=tvcctv&t=json',
url: '/NewVideo/getVideoListByColumn?id=fyclass&n=10&sort=desc&p=fypage&mode=0&serviceId=tvcctv',
searchUrl:'',
searchable:0,
quickSearch:0,
class_name: '周末动画片&快乐体验&小小智慧树&智力快车&音乐快递&英雄出少年&快乐大巴&动漫世界&新闻袋袋裤&大风车&七巧板&大手牵小手&智慧树&动感特区&动画大放映&看我 72 变&快乐童行&风车剧场',
class_url:'TOPC1451559836238828&TOPC1451559479171411&TOPC1451559205464876&TOPC1451559756374759&TOPC1451559666055645&TOPC1451559695702690&TOPC1451559161446811&TOPC1451559448233349&TOPC1451559603261584&TOPC1451558929123462&TOPC1451559569040502&TOPC1451558967135492&TOPC1451447359806385&TOPC1451559378830189&TOPC1451559025546574&TOPC1451559131256781&TOPC1628144739712839&TOPC1573528152700717',
filterable: 1,
headers:{
'User-Agent':'PC_UA'
},
timeout:10000,
play_parse:true,
limit:6,
double:false,
/*
推荐: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input)).response.docs;
list.forEach(it => {
// 一级标题
let title1 = it.column_name;
// 一级描述
let desc1 = it.channel_name;
// 一级图片URL
let picUrl1 = it.column_logo;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 更新至)
let url1 = it.lastVIDE.videoSharedCode + '|' + '' + '|' + it.column_firstclass + '|' + it.column_name + '|' + '' + '|' + it.column_playdate + '|' + it.channel_name + '|' + it.column_brief + '|' + it.column_logo + '|' + '' + '|' + it.lastVIDE.videoTitle;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
url : url1
})
})
setResult(d);
}),
*/
一级: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input)).data.list;
list.forEach(it => {
//一级id
let guid1 = it.guid;
// 一级标题
let title1 = it.title
// 一级描述
let desc1 = it.time;
// 一级图片URL
let picUrl1 = it.image;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 集数)
let url1 =it.guid + '|' + it.id + '|' + it.time + '|' + it.title + '|' + it.length + '|' + it.image + '|' + it.focus_date + '|' + it.brief + '|' + it.url + '|' + '' + '|' + MY_CATE;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
guid : guid1,
url : url1
})
})
setResult(d);
}),
二级 : $js.toString(() => {
let info = input.split("|");
let guid = info[0].replaceAll('https://api.cntv.cn/lanmu/', '');
VOD = {
vod_id: info[1],
vod_name: info[3],
vod_pic: info[5],
type_name: info[2],
vod_year: info[2],
vod_area: info[1],
vod_remarks: 'ƪ(˘⌣˘)ʃ优雅',
vod_director: 'ƪ(˘⌣˘)ʃ优雅',
vod_actor: 'ƪ(˘⌣˘)ʃ优雅',
vod_content: info[7],
vod_play_from: '央视频',
//https://hls.cntv.myalicdn.com//asp/hls/2000/0303000a/3/default/https://api.cntv.cn/lanmu/1a01871d6d5f4d4bbe82b9c62650f100/2000.m3u8
vod_play_url: '立即播放$https://cntv.playdreamer.cn/proxy/asp/hls/850/0303000a/3/default/' + guid + '/850.m3u8'
};
}),
搜索:'',
}
+95
View File
@@ -0,0 +1,95 @@
var rule = {
title:'央视频',
host:'https://api.cntv.cn',
homeUrl: '/lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=500&serviceId=tvcctv&t=json',
// url:'/list/getVideoAlbumList?fyfilter&area=&letter=&n=24&serviceId=tvcctv&t=json',
url: '/NewVideo/getVideoListByColumn?id=fyclass&n=10&sort=desc&p=fypage&mode=0&serviceId=tvcctv',
searchUrl:'',
searchable:0,
quickSearch:0,
class_name: '焦点访谈&每周质量报告&午夜新闻&新闻调查&新闻周刊&面对面&法治在线&新闻30分&新闻1+1&军情时间到&国际时讯&新闻直播间&朝闻天下&世界周刊&高端访谈&环球视线&共同关注&24小时&东方时空',
class_url:'TOPC1451558976694518&TOPC1451558650605123&TOPC1451558779639282&TOPC1451558819463311&TOPC1451559180488841&TOPC1451559038345600&TOPC1451558590627940&TOPC1451559097947700&TOPC1451559066181661&TOPC1462504102545692&TOPC1451558887804404&TOPC1451559129520755&TOPC1451558496100826&TOPC1451558687534149&TOPC1665739007799851&TOPC1451558926200436&TOPC1451558858788377&TOPC1451558428005729&TOPC1451558532019883',
filterable: 1,
headers:{
'User-Agent':'PC_UA'
},
timeout:10000,
play_parse:true,
limit:6,
double:false,
/*
推荐: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input)).response.docs;
list.forEach(it => {
// 一级标题
let title1 = it.column_name;
// 一级描述
let desc1 = it.channel_name;
// 一级图片URL
let picUrl1 = it.column_logo;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 更新至)
let url1 = it.lastVIDE.videoSharedCode + '|' + '' + '|' + it.column_firstclass + '|' + it.column_name + '|' + '' + '|' + it.column_playdate + '|' + it.channel_name + '|' + it.column_brief + '|' + it.column_logo + '|' + '' + '|' + it.lastVIDE.videoTitle;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
url : url1
})
})
setResult(d);
}),
*/
一级: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input)).data.list;
list.forEach(it => {
//一级id
let guid1 = it.guid;
// 一级标题
let title1 = it.title
// 一级描述
let desc1 = it.time;
// 一级图片URL
let picUrl1 = it.image;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 集数)
let url1 =it.guid + '|' + it.id + '|' + it.time + '|' + it.title + '|' + it.length + '|' + it.image + '|' + it.focus_date + '|' + it.brief + '|' + it.url + '|' + '' + '|' + MY_CATE;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
guid : guid1,
url : url1
})
})
setResult(d);
}),
二级 : $js.toString(() => {
let info = input.split("|");
let guid = info[0].replaceAll('https://api.cntv.cn/lanmu/', '');
VOD = {
vod_id: info[1],
vod_name: info[3],
vod_pic: info[5],
type_name: info[2],
vod_year: info[2],
vod_area: info[1],
vod_remarks: 'ƪ(˘⌣˘)ʃ优雅',
vod_director: 'ƪ(˘⌣˘)ʃ优雅',
vod_actor: 'ƪ(˘⌣˘)ʃ优雅',
vod_content: info[7],
vod_play_from: '央视频',
vod_play_url: '立即播放$https://cntv.playdreamer.cn/proxy/asp/hls/850/0303000a/3/default/' + guid + '/850.m3u8'
};
}),
搜索:'',
}
+97
View File
@@ -0,0 +1,97 @@
var rule = {
title: '央视频',
host: 'https://api.cntv.cn',
homeUrl: '/lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=500&serviceId=tvcctv&t=json',
// url:'/list/getVideoAlbumList?fyfilter&area=&letter=&n=24&serviceId=tvcctv&t=json',
url: '/NewVideo/getVideoListByColumn?id=fyclass&n=10&sort=desc&p=fypage&mode=0&serviceId=tvcctv',
searchUrl: '',
searchable: 0,
quickSearch: 0,
class_name: '对话&经济半小时&经济信息联播&第一时间&消费主张&欢乐大猜想&创业英雄汇&生财有道&职场健康课&一锤定音&回家吃饭&央视财经评论&中国经济大讲堂&正点财经&天下财经&生活家&魅力中国城',
class_url: 'TOPC1451530382483536&TOPC1451533652476962&TOPC1451533782742171&TOPC1451530259915198&TOPC1451534775834896&TOPC1672292475106944&TOPC1451529684665516&TOPC1451534118159896&TOPC1467078494968390&TOPC1451538759798817&TOPC1451532939300997&TOPC1451538686034772&TOPC1514182710380601&TOPC1453100395512779&TOPC1451531385787654&TOPC1593419181674791&TOPC1499160712571517',
filterable: 1,
headers: {
'User-Agent': 'PC_UA'
},
timeout: 10000,
play_parse: true,
limit: 6,
double: false,
/*
推荐: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input)).response.docs;
list.forEach(it => {
// 一级标题
let title1 = it.column_name;
// 一级描述
let desc1 = it.channel_name;
// 一级图片URL
let picUrl1 = it.column_logo;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 更新至)
let url1 = it.lastVIDE.videoSharedCode + '|' + '' + '|' + it.column_firstclass + '|' + it.column_name + '|' + '' + '|' + it.column_playdate + '|' + it.channel_name + '|' + it.column_brief + '|' + it.column_logo + '|' + '' + '|' + it.lastVIDE.videoTitle;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
url : url1
})
})
setResult(d);
}),
*/
一级: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input))
.data.list;
list.forEach(it => {
//一级id
let guid1 = it.guid;
// 一级标题
let title1 = it.title
// 一级描述
let desc1 = it.time;
// 一级图片URL
let picUrl1 = it.image;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 集数)
let url1 = it.guid + '|' + it.id + '|' + it.time + '|' + it.title + '|' + it.length + '|' + it.image + '|' + it.focus_date + '|' + it.brief + '|' + it.url + '|' + '' + '|' + MY_CATE;
d.push({
desc: desc1,
title: title1,
pic_url: picUrl1,
guid: guid1,
url: url1
})
})
setResult(d);
}),
二级: $js.toString(() => {
let info = input.split("|");
let guid = info[0].replaceAll('https://api.cntv.cn/lanmu/', '');
VOD = {
vod_id: info[1],
vod_name: info[3],
vod_pic: info[5],
type_name: info[2],
vod_year: info[2],
vod_area: info[1],
vod_remarks: 'ƪ(˘⌣˘)ʃ优雅',
vod_director: 'ƪ(˘⌣˘)ʃ优雅',
vod_actor: 'ƪ(˘⌣˘)ʃ优雅',
vod_content: info[7],
vod_play_from: '央视频',
vod_play_url: '立即播放$https://cntv.playdreamer.cn/proxy/asp/hls/850/0303000a/3/default/' + guid + '/850.m3u8'
};
}),
搜索: '',
}
+98
View File
@@ -0,0 +1,98 @@
var rule = {
title: '央视频',
host: 'https://api.cntv.cn',
homeUrl: '/lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=500&serviceId=tvcctv&t=json',
// url:'/list/getVideoAlbumList?fyfilter&area=&letter=&n=24&serviceId=tvcctv&t=json',
url: '/NewVideo/getVideoListByColumn?id=fyclass&n=10&sort=desc&p=fypage&mode=0&serviceId=tvcctv',
searchUrl: '',
searchable: 0,
quickSearch: 0,
class_name: '动画大放映&第一动画乐园&健康之路&走进科学&探索·发现&动物世界&人与自然&自然传奇&地理·中国&远方的家&跟着书本去旅行&百家讲坛&空中剧院&体坛快讯&新闻联播&焦点访谈&今日说法&等着我&新闻直播间&海峡两岸&天网&今日关注&高端访谈&开讲啦&故事里的中国&对话&面对面&是真的吗&星光大道&精彩音乐汇&音乐厅&民歌·中国&中国电影报道&星推荐&方圆剧阵&正大综艺&第一时间&开门大吉&开讲啦&共同关注&军事报道&新闻调查&新闻 30 分&新闻 1+1&今日亚洲&新闻直播间&24 小时&中国新闻&午夜新闻&朝闻天下&晚间新闻&新闻周刊&经济半小时&经济大讲堂&正点财经&生活圈&生活提示&东方时空&经济信息联播&今日环球&一线',
class_url: 'TOPC1451559025546574&TOPC1451378857272262&TOPC1451557646802924&TOPC1451558190239536&TOPC1451557893544236&TOPC1451378967257534&TOPC1451525103989666&TOPC1451558150787467&TOPC1451557421544786&TOPC1451541349400938&TOPC1575253587571324&TOPC1451557052519584&TOPC1451558856402351&TOPC1451550970356385&TOPC1451528971114112&TOPC1451558976694518&TOPC1451464665008914&TOPC1451378757637200&TOPC1451559129520755&TOPC1451540328102649&TOPC1451530382483536&TOPC1451540389082713&TOPC1665739007799851&TOPC1451464884159276&TOPC1451464884159276&TOPC1514182710380601&TOPC1451559038345600&TOPC1451534366388377&TOPC1451467630488780&TOPC1451541414450906&TOPC1451534421925242&TOPC1451541994820527&TOPC1451354597100320&TOPC1451469943519994&TOPC1571217727564820&TOPC1650782829200997&TOPC1451530259915198&TOPC1451465894294259&TOPC1451464884159276&TOPC1451558858788377&TOPC1451527941788652&TOPC1451558819463311&TOPC1451559097947700&TOPC1451559066181661&TOPC1451540448405749&TOPC1451559129520755&TOPC1451558428005729&TOPC1451539894330405&TOPC1451558779639282&TOPC1451558496100826&TOPC1451528792881669&TOPC1451559180488841&TOPC1601362002656197&TOPC1451533652476962&TOPC1453100395512779&TOPC1451546588784893&TOPC1451526037568184&TOPC1451558532019883&TOPC1451533782742171&TOPC1571034705435323&TOPC1451543462858283',
filterable: 1,
headers: {
'User-Agent': 'PC_UA'
},
timeout: 10000,
play_parse: true,
limit: 6,
double: false,
/*
推荐: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input)).response.docs;
list.forEach(it => {
// 一级标题
let title1 = it.column_name;
// 一级描述
let desc1 = it.channel_name;
// 一级图片URL
let picUrl1 = it.column_logo;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 更新至)
let url1 = it.lastVIDE.videoSharedCode + '|' + '' + '|' + it.column_firstclass + '|' + it.column_name + '|' + '' + '|' + it.column_playdate + '|' + it.channel_name + '|' + it.column_brief + '|' + it.column_logo + '|' + '' + '|' + it.lastVIDE.videoTitle;
d.push({
desc : desc1,
title : title1,
pic_url : picUrl1,
url : url1
})
})
setResult(d);
}),
*/
一级: $js.toString(() => {
var d = [];
var list = JSON.parse(request(input))
.data.list;
list.forEach(it => {
//一级id
let guid1 = it.guid;
// 一级标题
let title1 = it.title
// 一级描述
let desc1 = it.time;
// 一级图片URL
let picUrl1 = it.image;
// 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 集数)
let url1 = it.guid + '|' + it.id + '|' + it.time + '|' + it.title + '|' + it.length + '|' + it.image + '|' + it.focus_date + '|' + it.brief + '|' + it.url + '|' + '' + '|' + MY_CATE;
d.push({
desc: desc1,
title: title1,
pic_url: picUrl1,
guid: guid1,
url: url1
})
})
setResult(d);
}),
二级: $js.toString(() => {
let info = input.split("|");
let guid = info[0].replaceAll('https://api.cntv.cn/lanmu/', '');
VOD = {
vod_id: info[1],
vod_name: info[3],
vod_pic: info[5],
type_name: info[2],
vod_year: info[2],
vod_area: info[1],
vod_remarks: 'ƪ(˘⌣˘)ʃ优雅',
vod_director: 'ƪ(˘⌣˘)ʃ优雅',
vod_actor: 'ƪ(˘⌣˘)ʃ优雅',
vod_content: info[7],
vod_play_from: '央视频',
vod_play_url: '立即播放$https://cntv.playdreamer.cn/proxy/asp/hls/850/0303000a/3/default/' + guid + '/850.m3u8'
};
}),
搜索: '',
}
+85
View File
@@ -0,0 +1,85 @@
var rule = {
类型: '影视',//影视|听书|漫画|小说
title: 'PTT[优]',
host: 'https://ptt.red',
homeUrl: '/zh-cn',
url: '/zh-cn/p/fyclassfyfilter',
searchUrl: '/zh-cn/q/**?page=fypage',
searchable: 2,
quickSearch: 0,
filterable: 1,
filter: 'H4sIAAAAAAAAAO2X32saQRDH/5d76JMQ74d3Z8C/pIRytD6UpimYtBCCYCIGY9qoIbWVSltIqia1UUkQf+TSf8bdPf+Luml0ZtcsBFqf9HH3M+vOznxnvNnRdG316Y72Kr6trWqk0iLv+1pI2/Bex/H6nbf+Nn5nuMG3M/VRus63xwstGbrfPauNyvv3u0+8RNx79vJFzJjyUbVMu02ZR+B8vkV7tzK34Py3c/LFl7nuTA3opx+00pgxcMGgUWO3R7KBDfyq9dANYXDxQ4v0qzMG4CPJdIaDkmxgask1bvE3yKw9IF8PIcjT9WOCPLypssIkyCvPV0wT7s7Vh34FEIpsqUIOakDgxSzbpukMEAgmqxVJbwAERXG3QFMlIFE4k2sy/wIIihzNfh72DxDSsd/05idCIJmx14J7OryW9S+I/xEFAt2112ClIkIWvoudoFeZkYdTN0YWvDionQbNa3TKEBJKetfDgY+qZrJ+TEKNsGFN9LId9xKxuw1ETZmamBoyNTDVZapjGpZpGFE9KlE9iqkrUxdTR6YOprZMbUwjMo1gKseK1x5KBT06Jv08pGK6FlPB9tv0+JecClpJ0VJrcsHmm8RWbN3b3OIXrIU0Yy59kota0QJ50UHMhe7JESpI3Pd4QUIehZ7JEQhAaIbcDVdZCjxBS70vmN7NueldLWqUkZlS0JV6d02l3l1DqXekHOF/n1eJoSwFw1yWwsKVgjWvUjBstahttagdtagdtXLdpXIXTrkR3MX/afAIOleskEbTBeSbNS9FBI+n3S7N5hGCfIwbvHDKRt/2flFEigGLt+plP148Vdv2/1I1y/riZAzRCeopYfa0Iazs/HfQyQFy1LOng+bc/Flwimdt9NmS9kl3D3V4+EF2UiGX3xECRQblAt09REg9zDrWskwWrEySfwAneSZu2xMAAA==',
filter_url: '{% if fyclass !="1" %}{{fl.地区}}?page=fypage{% else %}{{fl.类型}}?page=fypage{{fl.地区|safe}}{% endif %}{{fl.年份|safe}}{{fl.排序|safe}}',
filter_def: {},
headers: {
'User-Agent': 'MOBILE_UA',
},
timeout: 5000,
class_parse: '.nav-tabs&&a;a&&Text;a&&href;(\\d+)',
cate_exclude: '',
play_parse: true,
lazy: $js.toString(() => {
let html = request(input);
let sdata = pdfh(html, '.container-fluid&&script&&Html');
// log(sdata);
let json = JSON.parse(sdata);
if (json.contentUrl) {
input = {parse: 0, url: json.contentUrl, js: ''};
}
}),
double: false,
推荐: '*',
一级: '#videos&&.card;a:eq(-1)&&Text;img&&src;.badge-success&&Text;a:eq(-1)&&href',
二级: $js.toString(() => {
let html = request(input);
let data = html.split('node:')[1].split('},')[0] + '}';
data = data.trim();
// log(data);
let json = JSON.parse(data);
// log(json);
VOD = {};
VOD.vod_name = json.title;
VOD.type_name = json.type;
VOD.vod_id = input;
VOD.vod_pic = urljoin(input, json.thumbnail);
VOD.vod_year = json.year;
VOD.vod_area = json._area;
VOD.vod_remarks = json.note;
VOD.vod_content = json.description;
VOD.vod_director = json.director;
VOD.vod_actor = json.actors;
let v_tabs = pdfa(html, '.nav-tabs&&li');
let v_tab_urls = v_tabs.map(it => pd(it, 'a&&href', input));
v_tabs = v_tabs.map(it => pdfh(it, 'a&&title'));
// log(v_tab_urls);
VOD.vod_play_from = v_tabs.join('$$$');
let lists = [];
let list1 = pdfa(html, '.mb-2.fullwidth&&a').map(it => pdfh(it, 'a&&Text') + '$' + pd(it, 'a&&href', input));
// log(list1);
lists.push(list1);
if (v_tab_urls.length > 1) {
let reqUrls = v_tab_urls.slice(1).map(it => {
return {
url: it,
options: {
timeout: 5000,
headers: rule.headers
}
}
});
let htmls = batchFetch(reqUrls);
htmls.forEach((ht) => {
if (ht) {
let list0 = pdfa(ht, '.mb-2.fullwidth&&a').map(it => pdfh(it, 'a&&Text') + '$' + pd(it, 'a&&href', input));
lists.push(list0);
} else {
lists.push([]);
}
});
}
let playUrls = lists.map(it => it.join('#'));
VOD.vod_play_url = playUrls.join('$$$');
}),
搜索: '*',
}