mirror of
https://github.com/alantang1977/X.git
synced 2024-11-05 05:53:08 +02:00
Add files via upload
This commit is contained in:
parent
9097fc318d
commit
4ddf6a5ebb
2 changed files with 208 additions and 0 deletions
1
js/七猫小说.js
Normal file
1
js/七猫小说.js
Normal file
|
@ -0,0 +1 @@
|
|||
H4sIAPCHYWYC/61YfW/q1hn/v5/CohUvI9gY85robiVAeAmBgCEJub2ixj4GB2M79jEGbiNtmtZ1Wtderd06qdUqTVpbqdvaqld7uV33aUrSfoudYxswL2nVdVzdBJ/n97yd8zzP+Tl9We1xcmsgGWQfQFbqKyzUiQeEaCo8lFSFCGqczo2MEPH4OQJ9KIoQGKEoVfhkgu6zjbRF2+u8qhiQMJB+dwimyIBvE+Y7sIEygARCGAhS710BHpL4aeHFhuAPaag6DIZWOrZpw44NK5A6EEweBIOaDvYIJUQ8+DGBvhJhQkH/fQ986Kdj86HyaI/w+UJoYRGeY1UH0NQVYiQkggvjyN/Nc88tc1fUMZBzqgKBAvOA16caDAoc5PYIabzYEDcfFFYOy9UKSwKFJ0tgQiL/Bgj6mBgTZ2JJBv2LMWn0xDDRZJxJMVEmk0wwtM/NUhrfbwT5W20FWnYO6R4wDtEDP+QMkIzv0HAEJMpbUvqSOA06hj2qgpM0ELyq2QJLuoLg0vYe3oQ9d0+cbPaW30eqAPZXBvAjmTvMrQAaJwgoBg8GrZCnQ95I2Zib0NqRLcMiocra0QfXEmtDMe0cZX9V3kgJ+XVPc63CdWBoqHyB90jhBN6zXc4eL3VWFbuMxbOB9pkiW6QhS6hao3sEE/OIu/wynF21tlJEWnbRebzp0ii4vi0La3bmY04ndFMGyLST1d1nX8z/+Ot9IjD/9M2vP3ka2EO9PP/ys68/fPWV+ZO/fPWvD165/ffHd29/8Yojt3WgBGV0coHU3esfO8sPEfBRwDm5gWpAJBxAqBn7FGVZFnktjTiV5NUR5WJMXUYQyhiYQ5MSp7zMGUZEnIqSDIGOvmhcHyywtrCrcCPscv6Lj775+Uf++Z8/v3v7/fkb789fe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UcGXhHCIwoPpYE3T6RlXN7Qp+7YpiaT2fefOwS66ufCFFw3s7YRJApK6frYQN9uOUVRbU82Vfa8p6knEfYPxTlJnJrmCvZ3K92h6FWObIw9/3FyXSa8BbkK7jsE1tyOAjWF7P/A7h+RysDvHZqxPRXdxHV4tsy0W4R4uxKi2tKAEcR1KkHQukzAReAGPokUZomd0oaBfCLHxaCuEPIW4mEtuU3Qh6hNUSnY/czLcaIiFuKcK062esgGLt0R7BO0QdjW0Lk1W487lF7dP3rt7+qf/nTgEUCxAwYUe2OiCAEprV3cEEE8UdjdOAMWILp9B14AcBBiR3kTY77D7xEmne5otFjaEFo7juNDZWJaMrjFQdYjMqvq0axoL7/8XvoJ3d6tLli/oC6bxvEOn7qMt2EjoW8kGRvxAmvHDGAUesw89FbxqIVz/BoloeoFD49dpkg16KRJonUSnYHXhVEM87MEDfAChHUNEIDXTGAS3BZ5rE9lSdakvKZzc3cE61q9CBOZMiApgN8i+U3HHjlBpdWVJGe7G2R328u6/Azl/HXvhsd34N9TL2xY2p9/NzhMyAGza5Cu4uJjwnLj5LxHFyOfkFwAA
|
207
js/采集之王[合].js
Normal file
207
js/采集之王[合].js
Normal file
|
@ -0,0 +1,207 @@
|
|||
/**
|
||||
* 强烈推荐静态分类。可以加快速度!!!
|
||||
* 传参 ?type=url¶ms=../json/采集.json
|
||||
* 传参 ?type=url¶ms=../json/采集静态.json
|
||||
* [{"name":"暴风资源","url":"https://bfzyapi.com","parse_url":""},{"name":"飞刀资源","url":"http://www.feidaozy.com","parse_url":""},{"name":"黑木耳资源","url":"https://www.heimuer.tv","parse_url":""}]
|
||||
*/
|
||||
var rule = {
|
||||
title: '采集之王[合]',
|
||||
author: '道长',
|
||||
version: '20240621 beta2',
|
||||
host: '',
|
||||
homeTid: '', // 首页推荐。一般填写第一个资源站的想要的推荐分类的id.可以空
|
||||
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||
detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
|
||||
searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
|
||||
classUrl: '/api.php/provide/vod/',
|
||||
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyfilter',
|
||||
filter_url: '{{fl.类型}}',
|
||||
headers: {'User-Agent': 'MOBILE_UA'},
|
||||
timeout: 5000, // class_name: '电影&电视剧&综艺&动漫',
|
||||
limit: 20,
|
||||
search_limit: 5, // 搜索限制取前5个,可以注释掉,就不限制搜索
|
||||
searchable: 1,//是否启用全局搜索,
|
||||
quickSearch: 0,//是否启用快速搜索,
|
||||
filterable: 1,//是否启用分类筛选,
|
||||
play_parse: true,
|
||||
parse_url: '', // 这个参数暂时不起作用。聚合类的每个资源应该有自己独立的解析口
|
||||
// params: 'http://127.0.0.1:5707/files/json/%E9%87%87%E9%9B%86.json',
|
||||
// params: 'http://127.0.0.1:5707/files/json/采集静态.json',
|
||||
预处理: $js.toString(() => {
|
||||
function getClasses(homeObj) {
|
||||
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]
|
||||
});
|
||||
}
|
||||
}
|
||||
return classes
|
||||
}
|
||||
|
||||
let _url = rule.params;
|
||||
if (_url && typeof (_url) === 'string' && /^(http|file)/.test(_url)) {
|
||||
let html = request(_url);
|
||||
let json = JSON.parse(html);
|
||||
let _classes = [];
|
||||
rule.filter = {};
|
||||
rule.filter_def = {};
|
||||
json.forEach(it => {
|
||||
let _obj = {
|
||||
type_name: it.name,
|
||||
type_id: it.url,
|
||||
parse_url: it.parse_url || '',
|
||||
cate_exclude: it.cate_exclude || '',
|
||||
// class_name: it.class_name || '',
|
||||
// class_url: it.class_url || '',
|
||||
};
|
||||
_classes.push(_obj);
|
||||
try {
|
||||
let json1 = [];
|
||||
if (it.class_name && it.class_url) {
|
||||
json1 = getClasses(it);
|
||||
} else {
|
||||
json1 = JSON.parse(request(urljoin(_obj.type_id, rule.classUrl))).class;
|
||||
}
|
||||
if (_obj.cate_exclude) {
|
||||
json1 = json1.filter(cl => !new RegExp(_obj.cate_exclude, 'i').test(cl.type_name));
|
||||
}
|
||||
rule.filter[_obj.type_id] = [{
|
||||
"key": "类型", "name": "类型", "value": json1.map(i => {
|
||||
return {"n": i.type_name, 'v': i.type_id}
|
||||
})
|
||||
}];
|
||||
if (json1.length > 0) {
|
||||
rule.filter_def[it.url] = {"类型": json1[0].type_id};
|
||||
}
|
||||
} catch (e) {
|
||||
rule.filter[it.url] = [{"key": "类型", "name": "类型", "value": [{"n": "全部", "v": ""}]}];
|
||||
}
|
||||
});
|
||||
rule.classes = _classes;
|
||||
}
|
||||
}),
|
||||
// class_parse: $js.toString(() => {
|
||||
// let _url = rule.params;
|
||||
// if (_url && typeof (_url) === 'string' && _url.startsWith('http')) {
|
||||
// let html = request(_url);
|
||||
// let json = JSON.parse(html);
|
||||
// let _classes = [];
|
||||
// homeObj.filter = {};
|
||||
// rule.filter_def = {};
|
||||
// json.forEach(it => {
|
||||
// let _obj = {
|
||||
// type_name: it.name,
|
||||
// type_id: it.url,
|
||||
// parse_url: it.parse_url || '',
|
||||
// cate_exclude: it.cate_exclude || '',
|
||||
// };
|
||||
// _classes.push(_obj);
|
||||
// try {
|
||||
// let json1 = JSON.parse(request(urljoin(_obj.type_id, rule.classUrl))).class;
|
||||
// if (_obj.cate_exclude) {
|
||||
// json1 = json1.filter(cl => !new RegExp(_obj.cate_exclude, 'i').test(cl.type_name));
|
||||
// }
|
||||
// homeObj.filter[_obj.type_id] = [{
|
||||
// "key": "类型", "name": "类型", "value": json1.map(i => {
|
||||
// return {"n": i.type_name, 'v': i.type_id}
|
||||
// })
|
||||
// }];
|
||||
// if (json1.length > 0) {
|
||||
// rule.filter_def[it.url] = {"类型": json1[0].type_id};
|
||||
// }
|
||||
// } catch (e) {
|
||||
// homeObj.filter[it.url] = [{"key": "类型", "name": "类型", "value": [{"n": "全部", "v": ""}]}];
|
||||
// }
|
||||
// });
|
||||
// rule.classes = _classes;
|
||||
// input = _classes;
|
||||
// }
|
||||
// }),
|
||||
class_parse: $js.toString(() => {
|
||||
input = rule.classes;
|
||||
}),
|
||||
推荐: $js.toString(() => {
|
||||
VODS = [];
|
||||
if (rule.classes) {
|
||||
let _url = urljoin(rule.classes[0].type_id, input);
|
||||
try {
|
||||
let html = request(_url);
|
||||
let json = JSON.parse(html);
|
||||
VODS = json.list;
|
||||
VODS.forEach(it => {
|
||||
it.vod_id = rule.classes[0].type_id + '$' + it.vod_id
|
||||
});
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
VODS = [];
|
||||
if (rule.classes) {
|
||||
// log(input);
|
||||
let _url = urljoin(MY_CATE, input);
|
||||
let html = request(_url);
|
||||
let json = JSON.parse(html);
|
||||
VODS = json.list;
|
||||
VODS.forEach(it => {
|
||||
it.vod_id = MY_CATE + '$' + it.vod_id
|
||||
});
|
||||
}
|
||||
}),
|
||||
// 一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
||||
二级: $js.toString(() => {
|
||||
VOD = [];
|
||||
if (rule.classes) {
|
||||
let _url = urljoin(fyclass, input);
|
||||
let html = request(_url);
|
||||
let json = JSON.parse(html);
|
||||
let data = json.list;
|
||||
VOD = data[0];
|
||||
}
|
||||
}),
|
||||
搜索: $js.toString(() => {
|
||||
VODS = [];
|
||||
if (rule.classes) {
|
||||
if (rule.search_limit) {
|
||||
rule.classes = rule.classes.slice(0, rule.search_limit);
|
||||
}
|
||||
rule.classes.forEach(it => {
|
||||
let _url = urljoin(it.type_id, input);
|
||||
// log(_url);
|
||||
try {
|
||||
let html = request(_url);
|
||||
let json = JSON.parse(html);
|
||||
let data = json.list;
|
||||
data.forEach(i => {
|
||||
i.vod_id = it.type_id + '$' + i.vod_id;
|
||||
i.vod_remarks = i.vod_remarks + '|' + it.type_name;
|
||||
});
|
||||
VODS = VODS.concat(data);
|
||||
} catch (e) {
|
||||
log(`请求:${it.type_id}发生错误:${e.message}`)
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}),
|
||||
lazy: $js.toString(() => {
|
||||
// lazy想办法用对应的parse_url,但是有难度,暂未实现
|
||||
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;
|
||||
}
|
||||
}
|
||||
}),
|
||||
}
|
Loading…
Reference in a new issue