Add files via upload

This commit is contained in:
n3rddd 2024-06-22 15:43:31 +08:00 committed by GitHub
parent 7ac1d4088f
commit 4a7e9c33cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 61 additions and 21 deletions

View File

@ -0,0 +1,27 @@
var rule = {
类型: '影视',//影视|听书|漫画|小说
title: '分享短视频',
host: 'http://www.sharenice.net',
url: '/fyclass?page=fypage',
searchUrl: '/video/search?kw=**',
searchable: 1,
quickSearch: 0,
filterable: 0,
headers: {
'User-Agent': 'PC_UA',
},
timeout: 5000,
class_parse: 'a[href*=net]:lt(29);a&&Text;a&&href;net/(.*)',
cate_exclude: '',
play_parse: true,
lazy: $js.toString(() => {
let html = request(input);
let _url = pdfh(html, 'div.video-play-box&&video&&src') + '#.mp4';
input = {parse: 0, url: _url, js: ''};
}),
double: true,
推荐: 'div.item-box ul;li;*;*;*;*',
一级: 'div.item-box&&ul&&li;a&&title;img&&data-original;;a&&href',
二级: '*',
搜索: '*',
}

View File

@ -12,7 +12,7 @@ var rule = {
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',
searchUrl: '/api.php/provide/vod/?wd=**&pg=#TruePage##page=fypage',
classUrl: '/api.php/provide/vod/',
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyfilter',
filter_url: '{{fl.类型}}',
@ -194,27 +194,40 @@ var rule = {
搜索: $js.toString(() => {
VODS = [];
if (rule.classes) {
let search_classes = rule.search_limit?rule.classes.slice(0, rule.search_limit):rule.classes;
search_classes.forEach(it => {
let _url = urljoin(it.type_id, input);
if (it.api) {
_url = _url.replace('/api.php/provide/vod/', it.api)
}
// 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}`)
}
let page = Number(MY_PAGE);
page = (MY_PAGE - 1) % Math.ceil(rule.classes.length / rule.search_limit) + 1;
let truePage = Math.ceil(MY_PAGE / Math.ceil(rule.classes.length / rule.search_limit));
if (rule.search_limit) {
let start = (page - 1) * rule.search_limit;
let end = page * rule.search_limit;
});
log('start:' + start);
log('end:' + end);
if (start < rule.classes.length) {
let search_classes = rule.classes.slice(start, end);
search_classes.forEach(it => {
let _url = urljoin(it.type_id, input);
if (it.api) {
_url = _url.replace('/api.php/provide/vod/', it.api)
}
_url = _url.replace("#TruePage#", "" + truePage);
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(() => {