diff --git a/JN/dr_py/js/分享短视频.js b/JN/dr_py/js/分享短视频.js new file mode 100644 index 00000000..af35962b --- /dev/null +++ b/JN/dr_py/js/分享短视频.js @@ -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', + 二级: '*', + 搜索: '*', +} \ No newline at end of file diff --git a/JN/dr_py/js/采集之王[合].js b/JN/dr_py/js/采集之王[合].js index aa95655a..2525cf91 100644 --- a/JN/dr_py/js/采集之王[合].js +++ b/JN/dr_py/js/采集之王[合].js @@ -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(() => {