From ae94a78fd6600341327122c390e840f9875435af Mon Sep 17 00:00:00 2001 From: yutons Date: Wed, 1 Nov 2023 22:24:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=87=8F=E5=AD=90?= =?UTF-8?q?=E8=B5=84=E6=BA=90=EF=BC=8C=E8=BF=87=E6=BB=A4=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/量子资源.js | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 js/量子资源.js diff --git a/js/量子资源.js b/js/量子资源.js new file mode 100644 index 0000000..34d83b3 --- /dev/null +++ b/js/量子资源.js @@ -0,0 +1,87 @@ +var rule = { + title: '量子资源', + host: 'https://cj.lzcaiji.com', + homeUrl: '/api.php/provide/vod?ac=detail', + searchUrl: '/api.php/provide/vod?ac=detail&wd=**&pg=fypage', + detailUrl: '/api.php/provide/vod?ac=detail&ids=fyid', //非必填,二级详情拼接链接 + searchable: 2,//是否启用全局搜索, + quickSearch: 1,//是否启用快速搜索, + filterable: 1,//是否启用分类筛选, + play_parse: false, + lazy: '', + multi: 1, + timeout: 5000, + limit: 6, + url: '/api.php/provide/vod?ac=detail&t=fyclass&pg=fypage&f=', + class_name: '国产剧&香港剧&韩国剧&动作片&剧情片&喜剧片&爱情片&国产动漫', + class_url: '13&14&15&6&11&7&8&29', + 推荐: 'json:list;vod_name;vod_pic;vod_remarks;vod_id', // double: true, // 推荐内容是否双层定位 + // 一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id', + 一级: `js: + function getParam(url,name) { + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); + var r = url.split('?')[1].match(reg); //获取url中"?"符后的字符串并正则匹配 + var context = ""; + if (r != null) + context = decodeURIComponent(r[2]); + reg = null; + r = null; + return context == null || context == "" || context == "undefined" ? "" : context; + } + let d = []; + // 忽略分类 + let cate_exclude = '34,35,45'; + let type_id = getParam(input,'t'); + if(!cate_exclude.match(type_id)){ + let html = request(input); + let list = JSON.parse(html).list; + list.forEach(function (it){ + if(!cate_exclude.match(it.type_id)){ + d.push({ + title:it.vod_name, + img:it.vod_pic, + desc:it.vod_remarks, + url:it.vod_id + }); + } + }); + } + setResult(d); + // log(input); + `, + /** + * 资源采集站,二级链接解析 + */ + // 二级: `json:list;vod_name;vod_pic;vod_remarks;vod_id`, + 二级: `js: + let html = request(input); + let list = JSON.parse(html).list; + if(list.length===1){ + VOD = list[0]; + VOD.vod_blurb = VOD.vod_blurb.replace(/ /g, '').replace(/<[^>]*>/g, ''); + VOD.vod_content = VOD.vod_content.replace(/ /g, '').replace(/<[^>]*>/g, ''); + } + `, + /** + * 搜索解析 过滤部分资源 + */ + // 搜索: 'json:list;vod_name;vod_pic;vod_remarks;vod_id', + 搜索: `js: + let d = []; + // 忽略分类 + let cate_exclude = '34,35,45'; + let html = request(input); + let list = JSON.parse(html).list; + list.forEach(function (it){ + if(!cate_exclude.match(it.type_id)){ + d.push({ + title:it.vod_name, + img:it.vod_pic, + desc:it.vod_remarks, + url:it.vod_id + }); + } + }); + setResult(d); + `, +} From 748a1e12e18c0221aff9723fcc56963434c80fb5 Mon Sep 17 00:00:00 2001 From: yutons Date: Wed, 1 Nov 2023 22:42:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=87=8F=E5=AD=90=E8=B5=84=E6=BA=90?= =?UTF-8?q?=EF=BC=8C=E5=85=B3=E9=97=AD=E5=BF=AB=E9=80=9F=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/量子资源.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/量子资源.js b/js/量子资源.js index 34d83b3..c6fffb4 100644 --- a/js/量子资源.js +++ b/js/量子资源.js @@ -4,9 +4,9 @@ var rule = { homeUrl: '/api.php/provide/vod?ac=detail', searchUrl: '/api.php/provide/vod?ac=detail&wd=**&pg=fypage', detailUrl: '/api.php/provide/vod?ac=detail&ids=fyid', //非必填,二级详情拼接链接 - searchable: 2,//是否启用全局搜索, - quickSearch: 1,//是否启用快速搜索, - filterable: 1,//是否启用分类筛选, + searchable: 2, + quickSearch: 0, + filterable: 1, play_parse: false, lazy: '', multi: 1,