Add files via upload
This commit is contained in:
parent
525357fc26
commit
284c24d87a
149
JN/EXT/OPENJS/open/1080kk_open.js
Normal file
149
JN/EXT/OPENJS/open/1080kk_open.js
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
import { Crypto, load, _, jinja2 } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = '108kk';
|
||||||
|
let HOST = 'https://www.1080kk.com';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":1,"type_name":"电影"},{"type_id":2,"type_name":"追剧"},{"type_id":3,"type_name":"综艺"},{"type_id":4,"type_name":"动漫"}];
|
||||||
|
let filterObj = {
|
||||||
|
"2":[{"key":"cateId","name":"类型","value":[{"n":"全部","v":"2"},{"n":"陆剧","v":"13"},{"n":"日韩剧","v":"15"},{"n":"欧美剧","v":"16"},{"n":"港台剧","v":"14"}]},{"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":"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"}]},{"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":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"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"}]},{"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"}]},{"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":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"3":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"国综","v":"大陆综艺"},{"n":"港综","v":"港台综艺"},{"n":"韩日综","v":"日韩综艺"},{"n":"欧美综","v":"欧美综艺"}]},{"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"}]},{"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":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"4":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"国漫","v":"国产动漫"},{"n":"日韩动漫","v":"日韩动漫"},{"n":"欧美动漫","v":"欧美动漫"},{"n":"港漫","v":"港台动漫"},{"n":"海外动漫","v":"海外动漫"}]},{"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"}]},{"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":"hits"},{"n":"评分","v":"score"}]}]
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const link = HOST + '/vodshow/' + (extend.CateId || tid) + '--' + (extend.by || 'time') + '-' + (extend.class || '') + '--' + (extend.letter || '') + '---' + pg + '---' + (extend.year || '') + '.html';//https://www.1080kk.com/vodshow/13--hits-%E5%8F%A4%E8%A3%85-%E5%9B%BD%E8%AF%AD-B------2022.html
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('ul.myui-vodlist > li');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a:first')[0];
|
||||||
|
const remarks = $($(item).find('span.pic-text text-right')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/.*?\/voddetail\/(.*).html/g, '$1'),
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: it.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('ul.myui-page > li > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
var html = await request( HOST + '/voddetail/' + id + '.html');
|
||||||
|
var $ = load(html);
|
||||||
|
var vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.stui-content__detail p:first a').text(),
|
||||||
|
vod_actor: $('.stui-content__detail p:nth-child(3)').text().replace('主演:',''),
|
||||||
|
vod_pic: $('.stui-content__thumb img:first').attr('data-original'),
|
||||||
|
vod_remarks : $('.stui-content__detail p:nth-child(5)').text() || '',
|
||||||
|
vod_content: $('span.detail-content').text().trim(),
|
||||||
|
};
|
||||||
|
var playMap = {};
|
||||||
|
var tabs = $('ul.nav-tabs > li > a[data-toggle*=tab]');
|
||||||
|
var playlists = $('ul.myui-content__list');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
var from = tab.children[0].data;
|
||||||
|
var list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
var title = it.children[0].data;
|
||||||
|
var playUrl = it.attribs.href.replace(/\/vodplay\/(.*).html/g, '$1');
|
||||||
|
if (title.length == 0) title = it.children[0].data.trim();
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push( title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
var urls = _.values(playMap);
|
||||||
|
var vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = HOST + '/vodplay/' + id + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const js = JSON.parse($('script:contains(player_)').html().replace('var player_aaaa=',''));
|
||||||
|
const playurl = js.url;
|
||||||
|
const playUrl = unescape(playurl);
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick) {
|
||||||
|
let data = JSON.parse(await request(HOST + '/index.php/ajax/suggest?mid=1&wd=' + wd)).list;
|
||||||
|
let videos = [];
|
||||||
|
for (const vod of data) {
|
||||||
|
videos.push({
|
||||||
|
vod_id: vod.id,
|
||||||
|
vod_name: vod.name,
|
||||||
|
vod_pic: vod.pic,
|
||||||
|
vod_remarks: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/4kys_open.js
Normal file
1
JN/EXT/OPENJS/open/4kys_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/52ju_open.js
Normal file
1
JN/EXT/OPENJS/open/52ju_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/58dm_open.js
Normal file
1
JN/EXT/OPENJS/open/58dm_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/91doutu_open.js
Normal file
1
JN/EXT/OPENJS/open/91doutu_open.js
Normal file
File diff suppressed because one or more lines are too long
171
JN/EXT/OPENJS/open/91free_open.js
Normal file
171
JN/EXT/OPENJS/open/91free_open.js
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
import { Crypto, load, _ } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = '1free';
|
||||||
|
let HOST = 'https://91d.top';//歪片星球.com
|
||||||
|
let url = '';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13E230 Safari/601.1';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
let html = await request(HOST);
|
||||||
|
url = html.match(/<a href="(http.*www.*)" target=.*>/)[1]
|
||||||
|
console.debug('跳转地址 =====>' + url); // js_debug.log
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":1,"type_name":"电影"},{"type_id":2,"type_name":"追剧"},{"type_id":3,"type_name":"综艺"},{"type_id":4,"type_name":"动漫"}];
|
||||||
|
let filterObj = {
|
||||||
|
"1":[{"key":"cateId","name":"类型","value":[{"n":"全部","v":"1"},{"n":"纪录片","v":"20"},{"n":"动作片","v":"6"},{"n":"爱情片","v":"8"},{"n":"科幻片","v":"9"},{"n":"恐怖片","v":"10"},{"n":"剧情片","v":"11"},{"n":"战争片","v":"12"},{"n":"喜剧片","v":"7"}]},{"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":"lang","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":"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"2":[{"key":"cateId","name":"类型","value":[{"n":"全部","v":"2"},{"n":"国产剧","v":"13"},{"n":"欧美剧","v":"14"},{"n":"港台剧","v":"15"},{"n":"日韩剧","v":"16"},{"n":"泰剧","v":"21"}]},{"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","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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"3":[{"key":"cateId","name":"类型","value":[{"n":"全部","v":"3"},{"n":"大陆综艺","v":"22"},{"n":"港台综艺","v":"25"},{"n":"日韩综艺","v":"24"},{"n":"欧美综艺","v":"23"}]},{"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","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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"4":[{"key":"cateId","name":"类型","value":[{"n":"全部","v":"4"},{"n":"国产动漫","v":"26"},{"n":"日韩动漫","v":"28"},{"n":"欧美动漫","v":"27"},{"n":"港台动漫","v":"29"}]},{"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","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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}]
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const link = url + '/vodshow/' + (extend.cateId || tid) + '-' + (extend.area || '') + '-' + (extend.by || 'time') + '--' + (extend.lang || '') + '----' + pg + '---' + (extend.year || '') + '.html';//https://91free.live/vodshow/6-%E7%BE%8E%E5%9B%BD-hits--%E8%8B%B1%E8%AF%AD----2---2022.html
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.module-items a.module-poster-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item)[0];
|
||||||
|
const k = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('div.module-item-note')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/\/voddetail\/(.*?).html/g, '$1'),
|
||||||
|
vod_name: k.attribs.alt,
|
||||||
|
vod_pic: k.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div#page > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const html = await request( url + '/voddetail/' + id + '.html');
|
||||||
|
const $ = load(html);
|
||||||
|
const vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.module-info-tag a').text(),
|
||||||
|
vod_actor: $('.module-info-item-content').text(),
|
||||||
|
vod_pic: $('.module-info img:first').attr('data-src'),
|
||||||
|
vod_remarks : $('.stui-content__detail p:nth-child(5)').text() || '',
|
||||||
|
vod_content: $('.module-info-introduction-content p').text().trim(),
|
||||||
|
};
|
||||||
|
let playMap = {};
|
||||||
|
const tabs = $('div.module-tab-items-box div.module-tab-item span');
|
||||||
|
const playlists = $('div.module-play-list-content');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
const from = $(tab).text();
|
||||||
|
let list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
const title = $(it).text();
|
||||||
|
const playUrl = it.attribs.href.replace(/\/vodplay\/(.*?).html/g, '$1');
|
||||||
|
if (title.length == 0) title = it.children[0].data.trim();
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push( title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
const urls = _.values(playMap);
|
||||||
|
let vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = url + '/vodplay/' + id + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const js = JSON.parse($('script:contains(player_)').html().replace('var player_aaaa=',''));
|
||||||
|
const playUrl = js.url;
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Encode(text) {
|
||||||
|
return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let data = await request(url + '/phsch/' + '/page/' + pg + '/wd/' + wd + '.html');//https://www.physkan.com/phsch/page/2/wd/%E6%88%91.html
|
||||||
|
const $ = load(data);
|
||||||
|
const items = $('div.module-items > div.module-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a:first')[0];
|
||||||
|
const k = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('div.module-item-note')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/\/v\/(.*?).html/g, '$1'),
|
||||||
|
vod_name: k.attribs.alt,
|
||||||
|
vod_pic: k.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div#page > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/abu_open.js
Normal file
1
JN/EXT/OPENJS/open/abu_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/adm_open.js
Normal file
1
JN/EXT/OPENJS/open/adm_open.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
157
JN/EXT/OPENJS/open/anfun_open.js
Normal file
157
JN/EXT/OPENJS/open/anfun_open.js
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
import { Crypto, load, _, jinja2 } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'anfun';
|
||||||
|
let HOST = 'https://www.anfuns.cc';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":1,"type_name":"新旧番剧"},{"type_id":2,"type_name":"蓝光无修"},{"type_id":3,"type_name":"动漫剧场"},{"type_id":4,"type_name":"欧美动漫"}];
|
||||||
|
let filterObj = {
|
||||||
|
"1":[{"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","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":"by","name":"排序","value":[{"n":"最新","v":"/by/time"},{"n":"最热","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||||
|
"2":[{"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","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":"by","name":"排序","value":[{"n":"最新","v":"/by/time"},{"n":"最热","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||||
|
"3":[{"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","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":"by","name":"排序","value":[{"n":"最新","v":"/by/time"},{"n":"最热","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||||
|
"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","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":"by","name":"排序","value":[{"n":"最新","v":"/by/time"},{"n":"最热","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}]
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const link = HOST + '/show/' + tid + '-' + (extend.class || '') + '--' + (extend.year || '') + (extend.by || '/by/time') + '/page/' + pg + '.html';//https://www.anfuns.cc/show/1---2023/by/hits/page/2.html
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('ul.hl-vod-list > li');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a:first')[0];
|
||||||
|
const remarks = $($(item).find('span.hl-lc-1')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/.*?\/anime\/(.*).html/g, '$1'),
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: it.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('ul.hl-page-wrap > li > a > span.hl-hidden-xs:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
var html = await request( HOST + '/anime/' + id + '.html');
|
||||||
|
var $ = load(html);
|
||||||
|
var vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.stui-content__detail p:first a').text(),
|
||||||
|
vod_actor: $('.stui-content__detail p:nth-child(3)').text().replace('主演:',''),
|
||||||
|
vod_pic: $('.stui-content__thumb img:first').attr('data-original'),
|
||||||
|
vod_remarks : $('.stui-content__detail p:nth-child(5)').text() || '',
|
||||||
|
vod_content: $('span.detail-content').text().trim(),
|
||||||
|
};
|
||||||
|
var playMap = {};
|
||||||
|
var tabs = $('ul.hl-from-list > li > span');
|
||||||
|
var playlists = $('ul.hl-plays-list');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
var from = tab.children[0].data;
|
||||||
|
var list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
var title = it.children[0].data;
|
||||||
|
var playUrl = it.attribs.href.replace(/\/play\/(.*).html/g, '$1');
|
||||||
|
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push( title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
var urls = _.values(playMap);
|
||||||
|
var vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = HOST + '/play/' + id + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const js = JSON.parse($('script:contains(player_)').html().replace('var player_aaaa=',''));
|
||||||
|
const playurl = js.url;
|
||||||
|
const playUrl = unescape(base64Decode(playurl));
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Encode(text) {
|
||||||
|
return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick) {
|
||||||
|
let data = JSON.parse(await request(HOST + '/index.php/ajax/suggest?mid=1&wd=' + wd)).list;
|
||||||
|
let videos = [];
|
||||||
|
for (const vod of data) {
|
||||||
|
videos.push({
|
||||||
|
vod_id: vod.id,
|
||||||
|
vod_name: vod.name,
|
||||||
|
vod_pic: vod.pic,
|
||||||
|
vod_remarks: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
function __jsEvalReturn() {
|
function __jsEvalReturn() {
|
||||||
return {
|
return {
|
||||||
isVideoFormat: function (url) {
|
isVideoFormat: function (url) {
|
||||||
return !0;
|
return !0;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export { __jsEvalReturn };
|
export { __jsEvalReturn };
|
||||||
|
1
JN/EXT/OPENJS/open/appv2.js
Normal file
1
JN/EXT/OPENJS/open/appv2.js
Normal file
File diff suppressed because one or more lines are too long
894
JN/EXT/OPENJS/open/appysv1.js
Normal file
894
JN/EXT/OPENJS/open/appysv1.js
Normal file
@ -0,0 +1,894 @@
|
|||||||
|
import { Crypto, _ } from 'assets://js/lib/cat.js'
|
||||||
|
|
||||||
|
let host = '';
|
||||||
|
let header = {
|
||||||
|
'User-Agent': 'okhttp/3.12.11'
|
||||||
|
};
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = '';
|
||||||
|
let siteJx = '';
|
||||||
|
|
||||||
|
const urlPattern1 = /api\.php\/.*?\/vod/;
|
||||||
|
const urlPattern2 = /api\.php\/.+?\.vod/;
|
||||||
|
const parsePattern = /\/.+\\?.+=/;
|
||||||
|
const parsePattern1 = /.*(url|v|vid|php\?id)=/;
|
||||||
|
const parsePattern2 = /https?:\/\/[^\/]*/;
|
||||||
|
|
||||||
|
const htmlVideoKeyMatch = [
|
||||||
|
/player=new/,
|
||||||
|
/<div id="video"/,
|
||||||
|
/<div id="[^"]*?player"/,
|
||||||
|
/\/\/视频链接/,
|
||||||
|
/HlsJsPlayer\(/,
|
||||||
|
/<iframe[\s\S]*?src="[^"]+?"/,
|
||||||
|
/<video[\s\S]*?src="[^"]+?"/,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
host = cfg.ext;
|
||||||
|
if (cfg.ext.hasOwnProperty('host')) { // for custom jx
|
||||||
|
host = cfg.ext.host;
|
||||||
|
siteJx = cfg.ext;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async function request(reqUrl, ua, timeout = 60000) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: ua ? ua : {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36'},
|
||||||
|
timeout: timeout,
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
try {
|
||||||
|
let url = getCateUrl(host);
|
||||||
|
|
||||||
|
let jsonArray = null;
|
||||||
|
|
||||||
|
if (url) {
|
||||||
|
const json = await request(url, getHeaders(url));
|
||||||
|
const obj = JSON.parse(json);
|
||||||
|
if (obj.hasOwnProperty("list") && Array.isArray(obj.list)) {
|
||||||
|
jsonArray = obj.list;
|
||||||
|
} else if (
|
||||||
|
obj.hasOwnProperty("data") &&
|
||||||
|
obj.data.hasOwnProperty("list") &&
|
||||||
|
Array.isArray(obj.data.list)
|
||||||
|
) {
|
||||||
|
jsonArray = obj.data.list;
|
||||||
|
} else if (obj.hasOwnProperty("data") && Array.isArray(obj.data)) {
|
||||||
|
jsonArray = obj.data;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 通过filter列表读分类
|
||||||
|
const filterStr = getFilterTypes(url, null);
|
||||||
|
const classes = filterStr.split("\n")[0].split("+");
|
||||||
|
jsonArray = [];
|
||||||
|
for (let i = 1; i < classes.length; i++) {
|
||||||
|
const kv = classes[i].trim().split("=");
|
||||||
|
if (kv.length < 2) continue;
|
||||||
|
const newCls = {
|
||||||
|
type_name: kv[0].trim(),
|
||||||
|
type_id: kv[1].trim(),
|
||||||
|
};
|
||||||
|
jsonArray.push(newCls);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = { class: [] };
|
||||||
|
if (jsonArray != null) {
|
||||||
|
for (let i = 0; i < jsonArray.length; i++) {
|
||||||
|
const jObj = jsonArray[i];
|
||||||
|
const typeName = jObj.type_name;
|
||||||
|
if (isBan(typeName)) continue;
|
||||||
|
const typeId = jObj.type_id;
|
||||||
|
const newCls = {
|
||||||
|
type_id: typeId,
|
||||||
|
type_name: typeName,
|
||||||
|
};
|
||||||
|
const typeExtend = jObj.type_extend;
|
||||||
|
if (filter) {
|
||||||
|
const filterStr = getFilterTypes(url, typeExtend);
|
||||||
|
|
||||||
|
const filters = filterStr.split("\n");
|
||||||
|
const filterArr = [];
|
||||||
|
for (let k = (url) ? 1 : 0; k < filters.length; k++) {
|
||||||
|
const l = filters[k].trim();
|
||||||
|
if (!l) continue;
|
||||||
|
const oneLine = l.split("+");
|
||||||
|
|
||||||
|
let type = oneLine[0].trim();
|
||||||
|
let typeN = type;
|
||||||
|
if (type.includes("筛选")) {
|
||||||
|
type = type.replace(/筛选/g, "");
|
||||||
|
if (type === "class") typeN = "类型";
|
||||||
|
else if (type === "area") typeN = "地区";
|
||||||
|
else if (type === "lang") typeN = "语言";
|
||||||
|
else if (type === "year") typeN = "年份";
|
||||||
|
}
|
||||||
|
const jOne = {
|
||||||
|
key: type,
|
||||||
|
name: typeN,
|
||||||
|
value: [],
|
||||||
|
};
|
||||||
|
for (let j = 1; j < oneLine.length; j++) {
|
||||||
|
const kv = oneLine[j].trim();
|
||||||
|
const sp = kv.indexOf("=");
|
||||||
|
|
||||||
|
if (sp === -1) {
|
||||||
|
if (isBan(kv)) continue;
|
||||||
|
jOne.value.push({ n: kv, v: kv });
|
||||||
|
} else {
|
||||||
|
const n = kv.substring(0, sp);
|
||||||
|
if (isBan(n)) continue;
|
||||||
|
jOne.value.push({
|
||||||
|
n: n.trim(),
|
||||||
|
v: kv.substring(sp + 1).trim(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filterArr.push(jOne);
|
||||||
|
}
|
||||||
|
if (!result.hasOwnProperty("filters")) {
|
||||||
|
result.filters = {};
|
||||||
|
}
|
||||||
|
result.filters[typeId] = filterArr;
|
||||||
|
}
|
||||||
|
result.class.push(newCls);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {
|
||||||
|
try {
|
||||||
|
const apiUrl = host;
|
||||||
|
let url = getRecommendUrl(apiUrl);
|
||||||
|
let isTV = false;
|
||||||
|
|
||||||
|
if (!url) {
|
||||||
|
url = getCateFilterUrlPrefix(apiUrl) + "movie&page=1&area=&type=&start=";
|
||||||
|
isTV = true;
|
||||||
|
}
|
||||||
|
const json = await request(url, getHeaders(url));
|
||||||
|
const obj = JSON.parse(json);
|
||||||
|
const videos = [];
|
||||||
|
if (isTV) {
|
||||||
|
const jsonArray = obj.data;
|
||||||
|
for (let i = 0; i < jsonArray.length; i++) {
|
||||||
|
const vObj = jsonArray[i];
|
||||||
|
const v = {
|
||||||
|
vod_id: vObj.nextlink,
|
||||||
|
vod_name: vObj.title,
|
||||||
|
vod_pic: vObj.pic,
|
||||||
|
vod_remarks: vObj.state,
|
||||||
|
};
|
||||||
|
videos.push(v);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const arrays = [];
|
||||||
|
findJsonArray(obj, "vlist", arrays);
|
||||||
|
if (arrays.length === 0) {
|
||||||
|
findJsonArray(obj, "vod_list", arrays);
|
||||||
|
}
|
||||||
|
const ids = [];
|
||||||
|
for (const jsonArray of arrays) {
|
||||||
|
for (let i = 0; i < jsonArray.length; i++) {
|
||||||
|
const vObj = jsonArray[i];
|
||||||
|
const vid = vObj.vod_id;
|
||||||
|
if (ids.includes(vid)) continue;
|
||||||
|
ids.push(vid);
|
||||||
|
const v = {
|
||||||
|
vod_id: vid,
|
||||||
|
vod_name: vObj.vod_name,
|
||||||
|
vod_pic: vObj.vod_pic,
|
||||||
|
vod_remarks: vObj.vod_remarks,
|
||||||
|
};
|
||||||
|
videos.push(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
list: videos,
|
||||||
|
};
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
try {
|
||||||
|
const apiUrl = host;
|
||||||
|
|
||||||
|
let url = getCateFilterUrlPrefix(apiUrl) + tid + getCateFilterUrlSuffix(apiUrl);
|
||||||
|
url = url.replace(/#PN#/g, pg);
|
||||||
|
url = url.replace(/筛选class/g, extend?.class ?? "");
|
||||||
|
url = url.replace(/筛选area/g, extend?.area ?? "");
|
||||||
|
url = url.replace(/筛选lang/g, extend?.lang ?? "");
|
||||||
|
url = url.replace(/筛选year/g, extend?.year ?? "");
|
||||||
|
url = url.replace(/排序/g, extend?.排序 ?? "");
|
||||||
|
|
||||||
|
|
||||||
|
const json = await request(url, getHeaders(url));
|
||||||
|
const obj = JSON.parse(json);
|
||||||
|
|
||||||
|
let totalPg = Infinity;
|
||||||
|
try {
|
||||||
|
if (obj.totalpage !== undefined && typeof obj.totalpage === "number") {
|
||||||
|
totalPg = obj.totalpage;
|
||||||
|
} else if (
|
||||||
|
obj.pagecount !== undefined &&
|
||||||
|
typeof obj.pagecount === "number"
|
||||||
|
) {
|
||||||
|
totalPg = obj.pagecount;
|
||||||
|
} else if (
|
||||||
|
obj.data !== undefined &&
|
||||||
|
typeof obj.data === "object" &&
|
||||||
|
obj.data.total !== undefined &&
|
||||||
|
typeof obj.data.total === "number" &&
|
||||||
|
obj.data.limit !== undefined &&
|
||||||
|
typeof obj.data.limit === "number"
|
||||||
|
) {
|
||||||
|
const limit = obj.data.limit;
|
||||||
|
const total = obj.data.total;
|
||||||
|
totalPg = total % limit === 0 ? total / limit : Math.floor(total / limit) + 1;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const jsonArray =
|
||||||
|
obj.list !== undefined
|
||||||
|
? obj.list
|
||||||
|
: obj.data !== undefined && obj.data.list !== undefined
|
||||||
|
? obj.data.list
|
||||||
|
: obj.data;
|
||||||
|
const videos = [];
|
||||||
|
|
||||||
|
if (jsonArray !== undefined) {
|
||||||
|
for (let i = 0; i < jsonArray.length; i++) {
|
||||||
|
const vObj = jsonArray[i];
|
||||||
|
const v = {
|
||||||
|
vod_id: vObj.vod_id !== undefined ? vObj.vod_id : vObj.nextlink,
|
||||||
|
vod_name: vObj.vod_name !== undefined ? vObj.vod_name : vObj.title,
|
||||||
|
vod_pic: vObj.vod_pic !== undefined ? vObj.vod_pic : vObj.pic,
|
||||||
|
vod_remarks: vObj.vod_remarks !== undefined ? vObj.vod_remarks : vObj.state,
|
||||||
|
};
|
||||||
|
videos.push(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
page: pg,
|
||||||
|
pagecount: totalPg,
|
||||||
|
limit: 90,
|
||||||
|
total: Infinity,
|
||||||
|
list: videos,
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) {
|
||||||
|
SpiderDebug.log(e);
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(ids) {
|
||||||
|
try {
|
||||||
|
const apiUrl = host;
|
||||||
|
const url = getPlayUrlPrefix(apiUrl) + ids;
|
||||||
|
|
||||||
|
const json = await request(url, getHeaders(url));
|
||||||
|
const obj = JSON.parse(json);
|
||||||
|
const result = {
|
||||||
|
list: [],
|
||||||
|
};
|
||||||
|
const vod = {};
|
||||||
|
genPlayList(apiUrl, obj, json, vod, ids);
|
||||||
|
result.list.push(vod);
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
const parseUrlMap = new Map();
|
||||||
|
|
||||||
|
function genPlayList(URL, object, json, vod, vid) {
|
||||||
|
const playUrls = [];
|
||||||
|
const playFlags = [];
|
||||||
|
|
||||||
|
if (URL.includes("lfytyl.com")) {
|
||||||
|
const data = object.data;
|
||||||
|
vod.vod_id = data.vod_id || vid;
|
||||||
|
vod.vod_name = data.vod_name;
|
||||||
|
vod.vod_pic = data.vod_pic;
|
||||||
|
vod.type_name = data.vod_class || "";
|
||||||
|
vod.vod_year = data.vod_year || "";
|
||||||
|
vod.vod_area = data.vod_area || "";
|
||||||
|
vod.vod_remarks = data.vod_remarks || "";
|
||||||
|
vod.vod_actor = data.vod_actor || "";
|
||||||
|
vod.vod_director = data.vod_director || "";
|
||||||
|
vod.vod_content = data.vod_content || "";
|
||||||
|
|
||||||
|
vod.vod_play_from = data.vod_play_from;
|
||||||
|
vod.vod_play_url = data.vod_play_url;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (URL.includes("api.php/app")) {
|
||||||
|
const data = object.data;
|
||||||
|
vod.vod_id = data.vod_id || vid;
|
||||||
|
vod.vod_name = data.vod_name;
|
||||||
|
vod.vod_pic = data.vod_pic;
|
||||||
|
vod.type_name = data.vod_class || "";
|
||||||
|
vod.vod_year = data.vod_year || "";
|
||||||
|
vod.vod_area = data.vod_area || "";
|
||||||
|
vod.vod_remarks = data.vod_remarks || "";
|
||||||
|
vod.vod_actor = data.vod_actor || "";
|
||||||
|
vod.vod_director = data.vod_director || "";
|
||||||
|
vod.vod_content = data.vod_content || "";
|
||||||
|
|
||||||
|
const vodUrlWithPlayer = data.vod_url_with_player;
|
||||||
|
for (let i = 0; i < vodUrlWithPlayer.length; i++) {
|
||||||
|
const from = vodUrlWithPlayer[i];
|
||||||
|
let flag = from.code.trim();
|
||||||
|
if (flag === "") flag = from.name.trim();
|
||||||
|
playFlags.push(flag);
|
||||||
|
playUrls.push(from.url);
|
||||||
|
|
||||||
|
let purl = from.parse_api;
|
||||||
|
const parseUrls = parseUrlMap.get(flag) || [];
|
||||||
|
if (purl && !parseUrls.includes(purl)) {
|
||||||
|
parseUrls.push(purl);
|
||||||
|
}
|
||||||
|
parseUrlMap.set(flag, parseUrls);
|
||||||
|
|
||||||
|
}
|
||||||
|
} else if (URL.includes("xgapp")) {
|
||||||
|
const data = object.data.vod_info;
|
||||||
|
vod.vod_id = data.vod_id || vid;
|
||||||
|
vod.vod_name = data.vod_name;
|
||||||
|
vod.vod_pic = data.vod_pic;
|
||||||
|
vod.type_name = data.vod_class || "";
|
||||||
|
vod.vod_year = data.vod_year || "";
|
||||||
|
vod.vod_area = data.vod_area || "";
|
||||||
|
vod.vod_remarks = data.vod_remarks || "";
|
||||||
|
vod.vod_actor = data.vod_actor || "";
|
||||||
|
vod.vod_director = data.vod_director || "";
|
||||||
|
vod.vod_content = data.vod_content || "";
|
||||||
|
|
||||||
|
const vodUrlWithPlayer = data.vod_url_with_player;
|
||||||
|
for (let i = 0; i < vodUrlWithPlayer.length; i++) {
|
||||||
|
const from = vodUrlWithPlayer[i];
|
||||||
|
let flag = from.code.trim();
|
||||||
|
if (flag === "") flag = from.name.trim();
|
||||||
|
playFlags.push(flag);
|
||||||
|
playUrls.push(from.url);
|
||||||
|
|
||||||
|
const purl = from.parse_api.trim();
|
||||||
|
const parseUrls = parseUrlMap.get(flag) || [];
|
||||||
|
if (purl && !parseUrls.includes(purl)) {
|
||||||
|
parseUrls.push(purl);
|
||||||
|
}
|
||||||
|
parseUrlMap.set(flag, parseUrls);
|
||||||
|
}
|
||||||
|
} else if (URL.includes(".vod")) {
|
||||||
|
const data = object.data;
|
||||||
|
vod.vod_id = data.vod_id || vid;
|
||||||
|
vod.vod_name = data.vod_name;
|
||||||
|
vod.vod_pic = data.vod_pic;
|
||||||
|
vod.type_name = data.vod_class || "";
|
||||||
|
vod.vod_year = data.vod_year || "";
|
||||||
|
vod.vod_area = data.vod_area || "";
|
||||||
|
vod.vod_remarks = data.vod_remarks || "";
|
||||||
|
vod.vod_actor = data.vod_actor || "";
|
||||||
|
vod.vod_director = data.vod_director || "";
|
||||||
|
vod.vod_content = data.vod_content || "";
|
||||||
|
|
||||||
|
const vodUrlWithPlayer = data.vod_play_list;
|
||||||
|
for (let i = 0; i < vodUrlWithPlayer.length; i++) {
|
||||||
|
const from = vodUrlWithPlayer[i];
|
||||||
|
let flag = from.player_info.from.trim();
|
||||||
|
if (flag === "") flag = from.player_info.show.trim();
|
||||||
|
playFlags.push(flag);
|
||||||
|
playUrls.push(from.url);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const parses = [];
|
||||||
|
const parse1 = from.player_info.parse.split(",");
|
||||||
|
const parse2 = from.player_info.parse2.split(",");
|
||||||
|
parses.push(...parse1, ...parse2);
|
||||||
|
const parseUrls = parseUrlMap.get(flag) || [];
|
||||||
|
for (const purl of parses) {
|
||||||
|
if (purl.includes("http")) {
|
||||||
|
const match = purl.match(parsePattern1);
|
||||||
|
if (match) {
|
||||||
|
parseUrls.push(match[0]);
|
||||||
|
}
|
||||||
|
} else if (purl.includes("//")) {
|
||||||
|
const match = purl.match(parsePattern1);
|
||||||
|
if (match) {
|
||||||
|
parseUrls.push("http:" + match[0]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const urlMatch = URL.match(parsePattern2);
|
||||||
|
if (urlMatch) {
|
||||||
|
const match = URL.match(parsePattern1);
|
||||||
|
if (match) {
|
||||||
|
parseUrls.push(urlMatch[0] + match[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (purl.includes("..")) purl = purl.replace(/\.\./g, ".").trim();
|
||||||
|
|
||||||
|
if (purl && !parseUrls.includes(purl)) {
|
||||||
|
parseUrls.push(purl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parseUrlMap.set(flag, parseUrls);
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (URLPattern1.matcher(URL).find()) {
|
||||||
|
// Same implementation as the previous cases
|
||||||
|
}
|
||||||
|
|
||||||
|
vod.vod_play_from = playFlags.join("$$$");
|
||||||
|
vod.vod_play_url = playUrls.join("$$$");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function play(flag, id, vipFlags) {
|
||||||
|
try {
|
||||||
|
// let parseUrls = parseUrlMap.get(flag);
|
||||||
|
let parseUrls = siteJx[flag]; // custom sitejx
|
||||||
|
if (!parseUrls) {
|
||||||
|
if (siteJx.hasOwnProperty('*')) { // all jx
|
||||||
|
parseUrls = siteJx['*'];
|
||||||
|
} else {
|
||||||
|
parseUrls = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parseUrls.length > 0) {
|
||||||
|
const result = await getFinalVideo(flag, parseUrls, id);
|
||||||
|
if (result !== null) {
|
||||||
|
return JSON.stringify(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isVideo(id)) {
|
||||||
|
const result = {
|
||||||
|
parse: 0,
|
||||||
|
playUrl: "",
|
||||||
|
url: id
|
||||||
|
};
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} else {
|
||||||
|
const result = {
|
||||||
|
parse: 1,
|
||||||
|
jx: "1",
|
||||||
|
url: id
|
||||||
|
};
|
||||||
|
return JSON.stringify(result);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Handle any error here
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(key, quick) {
|
||||||
|
try {
|
||||||
|
const apiUrl = host;
|
||||||
|
const url = getSearchUrl(apiUrl, encodeURIComponent(key));
|
||||||
|
const json = await request(url, getHeaders(url));
|
||||||
|
const obj = JSON.parse(json);
|
||||||
|
let jsonArray = null;
|
||||||
|
const videos = [];
|
||||||
|
|
||||||
|
if (obj.list instanceof Array) {
|
||||||
|
jsonArray = obj.list;
|
||||||
|
} else if (obj.data instanceof Object && obj.data.list instanceof Array) {
|
||||||
|
jsonArray = obj.data.list;
|
||||||
|
} else if (obj.data instanceof Array) {
|
||||||
|
jsonArray = obj.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (jsonArray !== null) {
|
||||||
|
for (const vObj of jsonArray) {
|
||||||
|
if (vObj.vod_id) {
|
||||||
|
const v = {
|
||||||
|
vod_id: vObj.vod_id,
|
||||||
|
vod_name: vObj.vod_name,
|
||||||
|
vod_pic: vObj.vod_pic,
|
||||||
|
vod_remarks: vObj.vod_remarks
|
||||||
|
};
|
||||||
|
videos.push(v);
|
||||||
|
} else {
|
||||||
|
const v = {
|
||||||
|
vod_id: vObj.nextlink,
|
||||||
|
vod_name: vObj.title,
|
||||||
|
vod_pic: vObj.pic,
|
||||||
|
vod_remarks: vObj.state
|
||||||
|
};
|
||||||
|
videos.push(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = { list: videos };
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
async function getFinalVideo(flag, parseUrls, url) {
|
||||||
|
let htmlPlayUrl = "";
|
||||||
|
for (const parseUrl of parseUrls) {
|
||||||
|
if (parseUrl === "" || parseUrl === "null") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const playUrl = parseUrl + url;
|
||||||
|
const content = await request(playUrl, null, 10000); // 10秒请求,能更好过滤webjx
|
||||||
|
let tryJson = null;
|
||||||
|
try {
|
||||||
|
tryJson = jsonParse(url, content);
|
||||||
|
} catch (error) { }
|
||||||
|
|
||||||
|
if (tryJson !== null && tryJson.hasOwnProperty("url") && tryJson.hasOwnProperty("header")) {
|
||||||
|
tryJson.header = JSON.stringify(tryJson.header);
|
||||||
|
return tryJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (content.includes("<html")) {
|
||||||
|
let sniffer = false;
|
||||||
|
for (const p of htmlVideoKeyMatch) {
|
||||||
|
if (p.test(content)) {
|
||||||
|
sniffer = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sniffer) {
|
||||||
|
htmlPlayUrl = parseUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (htmlPlayUrl !== "") { // 不支持sniffer
|
||||||
|
const result = {
|
||||||
|
parse: 0,
|
||||||
|
playUrl: "",
|
||||||
|
url: url
|
||||||
|
};
|
||||||
|
return JSON.stringify(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function jsonParse(input, json) {
|
||||||
|
try {
|
||||||
|
// 处理解析接口返回的报文,如果返回的报文中包含header信息,就加到返回值中
|
||||||
|
let jsonPlayData = JSON.parse(json);
|
||||||
|
// 处理293的解析结果url在data字段的解析
|
||||||
|
if (jsonPlayData.hasOwnProperty("data") && typeof jsonPlayData.data === "object" && !jsonPlayData.hasOwnProperty("url")) {
|
||||||
|
jsonPlayData = jsonPlayData.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
let url = jsonPlayData.url;
|
||||||
|
|
||||||
|
if (url.startsWith("//")) {
|
||||||
|
url = "https:" + url;
|
||||||
|
}
|
||||||
|
if (!url.trim().startsWith("http")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (url === input) {
|
||||||
|
if (isVip(url) || !isVideoFormat(url)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isBlackVodUrl(input, url)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
let headers = {};
|
||||||
|
if (jsonPlayData.hasOwnProperty("header")) {
|
||||||
|
headers = jsonPlayData.header;
|
||||||
|
} else if (jsonPlayData.hasOwnProperty("Header")) {
|
||||||
|
headers = jsonPlayData.Header;
|
||||||
|
} else if (jsonPlayData.hasOwnProperty("headers")) {
|
||||||
|
headers = jsonPlayData.headers;
|
||||||
|
} else if (jsonPlayData.hasOwnProperty("Headers")) {
|
||||||
|
headers = jsonPlayData.Headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
let ua = "";
|
||||||
|
if (jsonPlayData.hasOwnProperty("user-agent")) {
|
||||||
|
ua = jsonPlayData["user-agent"];
|
||||||
|
} else if (jsonPlayData.hasOwnProperty("User-Agent")) {
|
||||||
|
ua = jsonPlayData["User-Agent"];
|
||||||
|
}
|
||||||
|
if (ua.trim().length > 0) {
|
||||||
|
headers["User-Agent"] = " " + ua;
|
||||||
|
}
|
||||||
|
|
||||||
|
let referer = "";
|
||||||
|
if (jsonPlayData.hasOwnProperty("referer")) {
|
||||||
|
referer = jsonPlayData.referer;
|
||||||
|
} else if (jsonPlayData.hasOwnProperty("Referer")) {
|
||||||
|
referer = jsonPlayData.Referer;
|
||||||
|
}
|
||||||
|
if (referer.trim().length > 0) {
|
||||||
|
headers["Referer"] = " " + referer;
|
||||||
|
}
|
||||||
|
|
||||||
|
headers = fixJsonVodHeader(headers, input, url);
|
||||||
|
|
||||||
|
const taskResult = {
|
||||||
|
header: headers,
|
||||||
|
url: url,
|
||||||
|
parse: "0"
|
||||||
|
};
|
||||||
|
|
||||||
|
return taskResult;
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isVip(url) {
|
||||||
|
try {
|
||||||
|
let isVip = false;
|
||||||
|
const host = new URL(url).hostname;
|
||||||
|
const vipWebsites = ["iqiyi.com", "v.qq.com", "youku.com", "le.com", "tudou.com", "mgtv.com", "sohu.com", "acfun.cn", "bilibili.com", "baofeng.com", "pptv.com"];
|
||||||
|
for (let b = 0; b < vipWebsites.length; b++) {
|
||||||
|
if (host.includes(vipWebsites[b])) {
|
||||||
|
if (vipWebsites[b] === "iqiyi.com") {
|
||||||
|
// 爱奇艺需要特殊处理
|
||||||
|
if (url.includes("iqiyi.com/a_") || url.includes("iqiyi.com/w_") || url.includes("iqiyi.com/v_")) {
|
||||||
|
isVip = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
isVip = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return isVip;
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function isBlackVodUrl(input, url) {
|
||||||
|
return url.includes("973973.xyz") || url.includes(".fit:");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function fixJsonVodHeader(headers, input, url) {
|
||||||
|
if (headers === null) {
|
||||||
|
headers = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input.includes("www.mgtv.com")) {
|
||||||
|
headers["Referer"] = " ";
|
||||||
|
headers["User-Agent"] = " Mozilla/5.0";
|
||||||
|
} else if (url.includes("titan.mgtv")) {
|
||||||
|
headers["Referer"] = " ";
|
||||||
|
headers["User-Agent"] = " Mozilla/5.0";
|
||||||
|
} else if (input.includes("bilibili")) {
|
||||||
|
headers["Referer"] = " https://www.bilibili.com/";
|
||||||
|
headers["User-Agent"] = " " + Misc.UaWinChrome;
|
||||||
|
}
|
||||||
|
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const snifferMatch = /http((?!http).){26,}?\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg)\?.*|http((?!http).){26,}\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg)|http((?!http).){26,}\/m3u8\?pt=m3u8.*|http((?!http).)*?default\.ixigua\.com\/.*|http((?!http).)*?cdn-tos[^\?]*|http((?!http).)*?\/obj\/tos[^\?]*|http.*?\/player\/m3u8play\.php\?url=.*|http.*?\/player\/.*?[pP]lay\.php\?url=.*|http.*?\/playlist\/m3u8\/\?vid=.*|http.*?\.php\?type=m3u8&.*|http.*?\/download.aspx\?.*|http.*?\/api\/up_api.php\?.*|https.*?\.66yk\.cn.*|http((?!http).)*?netease\.com\/file\/.*/;
|
||||||
|
|
||||||
|
function isVideoFormat(url) {
|
||||||
|
if (snifferMatch.test(url)) {
|
||||||
|
return !url.includes("cdn-tos") || !url.includes(".js");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function isVideo(url) {
|
||||||
|
if (!url.includes(".mp4") || !url.includes(".m3u8")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function UA(url) {
|
||||||
|
if (url.includes(".vod")) {
|
||||||
|
return "okhttp/4.1.0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCateUrl(URL) {
|
||||||
|
if (URL.includes("api.php/app") || URL.includes("xgapp")) {
|
||||||
|
return URL + "nav?token=";
|
||||||
|
} else if (URL.includes(".vod")) {
|
||||||
|
return URL + "/types";
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPlayUrlPrefix(URL) {
|
||||||
|
if (URL.includes("api.php/app") || URL.includes("xgapp")) {
|
||||||
|
return URL + "video_detail?id=";
|
||||||
|
} else if (URL.includes(".vod")) {
|
||||||
|
return URL + "/detail?vod_id=";
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRecommendUrl(URL) {
|
||||||
|
if (URL.includes("api.php/app") || URL.includes("xgapp")) {
|
||||||
|
return URL + "index_video?token=";
|
||||||
|
} else if (URL.includes(".vod")) {
|
||||||
|
return URL + "/vodPhbAll";
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFilterTypes(URL, typeExtend) {
|
||||||
|
let str = "";
|
||||||
|
|
||||||
|
if (typeExtend !== null) {
|
||||||
|
for (let key in typeExtend) {
|
||||||
|
if (key === "class" || key === "area" || key === "lang" || key === "year") {
|
||||||
|
try {
|
||||||
|
|
||||||
|
str += "筛选" + key + "+全部=+" + typeExtend[key].replace(/,/g, "+") + "\n";
|
||||||
|
} catch (e) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (URL.includes(".vod")) {
|
||||||
|
str += "\n" + "排序+全部=+最新=time+最热=hits+评分=score";
|
||||||
|
} else if (URL.includes("api.php/app") || URL.includes("xgapp")) {
|
||||||
|
// Do nothing, leave the string as it is.
|
||||||
|
} else {
|
||||||
|
str = "分类+全部=+电影=movie+连续剧=tvplay+综艺=tvshow+动漫=comic+4K=movie_4k+体育=tiyu\n筛选class+全部=+喜剧+爱情+恐怖+动作+科幻+剧情+战争+警匪+犯罪+动画+奇幻+武侠+冒险+枪战+恐怖+悬疑+惊悚+经典+青春+文艺+微电影+古装+历史+运动+农村+惊悚+惊悚+伦理+情色+福利+三级+儿童+网络电影\n筛选area+全部=+大陆+香港+台湾+美国+英国+法国+日本+韩国+德国+泰国+印度+西班牙+加拿大+其他\n筛选year+全部=+2023+2022+2021+2020+2019+2018+2017+2016+2015+2014+2013+2012+2011+2010+2009+2008+2007+2006+2005+2004+2003+2002+2001+2000";
|
||||||
|
}
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCateFilterUrlSuffix(URL) {
|
||||||
|
if (URL.includes("api.php/app") || URL.includes("xgapp")) {
|
||||||
|
return "&class=筛选class&area=筛选area&lang=筛选lang&year=筛选year&limit=18&pg=#PN#";
|
||||||
|
} else if (URL.includes(".vod")) {
|
||||||
|
return "&class=筛选class&area=筛选area&lang=筛选lang&year=筛选year&by=排序&limit=18&page=#PN#";
|
||||||
|
} else {
|
||||||
|
return "&page=#PN#&area=筛选area&type=筛选class&start=筛选year";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCateFilterUrlPrefix(URL) {
|
||||||
|
if (URL.includes("api.php/app") || URL.includes("xgapp")) {
|
||||||
|
return URL + "video?tid=";
|
||||||
|
} else if (URL.includes(".vod")) {
|
||||||
|
return URL + "?type=";
|
||||||
|
} else {
|
||||||
|
return URL + "?ac=list&class=";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isBan(key) {
|
||||||
|
return key === "伦理" || key === "情色" || key === "福利";
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSearchUrl(URL, KEY) {
|
||||||
|
if (URL.includes(".vod")) {
|
||||||
|
return URL + "?wd=" + KEY + "&page=";
|
||||||
|
} else if (URL.includes("api.php/app") || URL.includes("xgapp")) {
|
||||||
|
return URL + "search?text=" + KEY + "&pg=";
|
||||||
|
} else if (urlPattern1.test(URL)) {
|
||||||
|
return URL + "?ac=list&zm=" + KEY + "&page=";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function findJsonArray(obj, match, result) {
|
||||||
|
Object.keys(obj).forEach((k) => {
|
||||||
|
try {
|
||||||
|
const o = obj[k];
|
||||||
|
if (k === match && Array.isArray(o)) {
|
||||||
|
result.push(o);
|
||||||
|
}
|
||||||
|
if (typeof o === "object" && o !== null) {
|
||||||
|
if (Array.isArray(o)) {
|
||||||
|
o.forEach((item) => {
|
||||||
|
if (typeof item === "object" && item !== null) {
|
||||||
|
findJsonArray(item, match, result);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
findJsonArray(o, match, result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function jsonArr2Str(array) {
|
||||||
|
const strings = [];
|
||||||
|
for (let i = 0; i < array.length; i++) {
|
||||||
|
try {
|
||||||
|
strings.push(array[i]);
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return strings.join(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHeaders(URL) {
|
||||||
|
const headers = {};
|
||||||
|
headers["User-Agent"] = UA(URL);
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isJsonString(str) {
|
||||||
|
try {
|
||||||
|
JSON.parse(str);
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
1
JN/EXT/OPENJS/open/appysv2.js
Normal file
1
JN/EXT/OPENJS/open/appysv2.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/bb_douban_open.js
Normal file
1
JN/EXT/OPENJS/open/bb_douban_open.js
Normal file
File diff suppressed because one or more lines are too long
621
JN/EXT/OPENJS/open/bili_open.js
Normal file
621
JN/EXT/OPENJS/open/bili_open.js
Normal file
@ -0,0 +1,621 @@
|
|||||||
|
import { Crypto, jinja2, _ } from 'assets://js/lib/cat.js';
|
||||||
|
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
let cookie = '';
|
||||||
|
let login = '';
|
||||||
|
let vip = false;
|
||||||
|
let extendObj = {};
|
||||||
|
let bili_jct = '';
|
||||||
|
let vod_audio_id = {
|
||||||
|
30280: 192000,
|
||||||
|
30232: 132000,
|
||||||
|
30216: 64000,
|
||||||
|
};
|
||||||
|
|
||||||
|
let vod_codec = {
|
||||||
|
// 13: 'AV1',
|
||||||
|
12: 'HEVC',
|
||||||
|
7: 'AVC',
|
||||||
|
};
|
||||||
|
|
||||||
|
const UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36';
|
||||||
|
|
||||||
|
async function request(reqUrl, ua, buffer) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: ua ? ua : { 'User-Agent': UA },
|
||||||
|
timeout: 60000,
|
||||||
|
buffer: buffer ? 1 : 0,
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function post(reqUrl, postData, ua, posttype) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'post',
|
||||||
|
headers: ua ? ua : { 'User-Agent': UA },
|
||||||
|
data: postData,
|
||||||
|
timeout: 60000,
|
||||||
|
postType: posttype,
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHeaders() {
|
||||||
|
const headers = {
|
||||||
|
'User-Agent': UA,
|
||||||
|
};
|
||||||
|
if (!_.isEmpty(cookie)) {
|
||||||
|
headers.cookie = cookie;
|
||||||
|
}
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getCookie() {
|
||||||
|
let result = await req('https://www.bilibili.com', {
|
||||||
|
method: 'get',
|
||||||
|
headers: { 'User-Agent': UA },
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
const setCookieHeaders = result.headers['set-cookie'];
|
||||||
|
cookie = setCookieHeaders.map((kk) => kk.split(';')[0] + ';').join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
let extend = cfg.ext;
|
||||||
|
|
||||||
|
if (cfg.ext.hasOwnProperty('categories')) extend = cfg.ext.categories;
|
||||||
|
if (cfg.ext.hasOwnProperty('cookie')) cookie = cfg.ext.cookie;
|
||||||
|
// 获取csrf
|
||||||
|
const cookies = cookie.split(';');
|
||||||
|
cookies.forEach(cookie => {
|
||||||
|
if (cookie.includes('bili_jct')) {
|
||||||
|
bili_jct = cookie.split('=')[1];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (_.isEmpty(cookie)) await getCookie();
|
||||||
|
let result = JSON.parse(await request('https://api.bilibili.com/x/web-interface/nav', getHeaders()));
|
||||||
|
login = result.data.isLogin;
|
||||||
|
vip = result.data.vipStatus;
|
||||||
|
const ext = extend.split('#');
|
||||||
|
const jsonData = [
|
||||||
|
{
|
||||||
|
key: 'order',
|
||||||
|
name: '排序',
|
||||||
|
value: [
|
||||||
|
{ n: '综合排序', v: '0' },
|
||||||
|
{ n: '最多点击', v: 'click' },
|
||||||
|
{ n: '最新发布', v: 'pubdate' },
|
||||||
|
{ n: '最多弹幕', v: 'dm' },
|
||||||
|
{ n: '最多收藏', v: 'stow' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'duration',
|
||||||
|
name: '时长',
|
||||||
|
value: [
|
||||||
|
{ n: '全部时长', v: '0' },
|
||||||
|
{ n: '60分钟以上', v: '4' },
|
||||||
|
{ n: '30~60分钟', v: '3' },
|
||||||
|
{ n: '10~30分钟', v: '2' },
|
||||||
|
{ n: '10分钟以下', v: '1' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const newarr = [];
|
||||||
|
const d = {};
|
||||||
|
const sc = {
|
||||||
|
type_name: "首页",
|
||||||
|
type_id: "首页",
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
}
|
||||||
|
newarr.push(sc);
|
||||||
|
for (const kk of ext) {
|
||||||
|
const c = {
|
||||||
|
type_name: kk,
|
||||||
|
type_id: kk,
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
};
|
||||||
|
newarr.push(c);
|
||||||
|
d[kk] = jsonData;
|
||||||
|
}
|
||||||
|
if (!_.isEmpty(bili_jct)) {
|
||||||
|
const hc = {
|
||||||
|
type_name: "历史记录",
|
||||||
|
type_id: "历史记录",
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
}
|
||||||
|
newarr.push(hc);
|
||||||
|
}
|
||||||
|
extendObj = {
|
||||||
|
classes: newarr,
|
||||||
|
filter: d,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function home(filter) {
|
||||||
|
try {
|
||||||
|
const jSONObject = {
|
||||||
|
class: extendObj.classes,
|
||||||
|
};
|
||||||
|
if (filter) {
|
||||||
|
jSONObject.filters = extendObj.filter;
|
||||||
|
}
|
||||||
|
return JSON.stringify(jSONObject);
|
||||||
|
} catch (e) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {
|
||||||
|
try {
|
||||||
|
const list = [];
|
||||||
|
const url = 'https://api.bilibili.com/x/web-interface/index/top/rcmd?ps=14&fresh_idx=1&fresh_idx_1h=1';
|
||||||
|
|
||||||
|
const response = await request(url, getHeaders());
|
||||||
|
const responseData = JSON.parse(response);
|
||||||
|
const vods = responseData.data.item;
|
||||||
|
|
||||||
|
for (const item of vods) {
|
||||||
|
const vod = {};
|
||||||
|
let imageUrl = item.pic;
|
||||||
|
if (imageUrl.startsWith('//')) {
|
||||||
|
imageUrl = 'https:' + imageUrl;
|
||||||
|
}
|
||||||
|
let cd = getFullTime(item.duration);
|
||||||
|
|
||||||
|
vod.vod_id = item.bvid;
|
||||||
|
vod.vod_name = removeTags(item.title);
|
||||||
|
vod.vod_pic = imageUrl;
|
||||||
|
vod.vod_remarks = cd;
|
||||||
|
vod.style = {
|
||||||
|
type: 'rect',
|
||||||
|
ratio: 1.33,
|
||||||
|
},
|
||||||
|
list.push(vod);
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = { list: list };
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
async function category(tid, page, filter, ext) {
|
||||||
|
if (page < 1) page = 1;
|
||||||
|
try {
|
||||||
|
if (Object.keys(ext).length > 0 && ext.hasOwnProperty('tid') && ext['tid'].length > 0) {
|
||||||
|
tid = ext['tid'];
|
||||||
|
}
|
||||||
|
let url = '';
|
||||||
|
url = `https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword=${encodeURIComponent(tid)}`;
|
||||||
|
|
||||||
|
if (Object.keys(ext).length > 0) {
|
||||||
|
for (const k in ext) {
|
||||||
|
if (k == 'tid') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
url += `&${encodeURIComponent(k)}=${encodeURIComponent(ext[k])}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
url += `&page=${encodeURIComponent(page)}`;
|
||||||
|
|
||||||
|
if (tid == "首页") {
|
||||||
|
url = "https://api.bilibili.com/x/web-interface/index/top/rcmd?ps=14&fresh_idx=" + page + "&fresh_idx_1h=" + page;
|
||||||
|
} else if (tid == "历史记录") {
|
||||||
|
url = "https://api.bilibili.com/x/v2/history?pn=" + page;
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = JSON.parse(await request(url, getHeaders())).data;
|
||||||
|
let items = data.result;
|
||||||
|
if (tid == "首页") {
|
||||||
|
items = data.item;
|
||||||
|
} else if (tid == "历史记录") {
|
||||||
|
items = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
const videos = [];
|
||||||
|
for (const item of items) {
|
||||||
|
const video = {};
|
||||||
|
let pic = item.pic;
|
||||||
|
if (pic.startsWith('//')) {
|
||||||
|
pic = 'https:' + pic;
|
||||||
|
}
|
||||||
|
let cd = getFullTime(item.duration);
|
||||||
|
|
||||||
|
video.vod_remarks = cd;
|
||||||
|
video.vod_id = item.bvid;
|
||||||
|
video.vod_name = removeTags(item.title);
|
||||||
|
video.vod_pic = pic;
|
||||||
|
|
||||||
|
video.style = {
|
||||||
|
type: 'rect',
|
||||||
|
ratio: 1.33,
|
||||||
|
},
|
||||||
|
videos.push(video);
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
page: page,
|
||||||
|
pagecount: data.numPages ?? (page + 1),
|
||||||
|
limit: videos.length,
|
||||||
|
total: videos.length * (page + 1),
|
||||||
|
list: videos,
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(ids) {
|
||||||
|
try {
|
||||||
|
const bvid = ids;
|
||||||
|
const detailUrl = `https://api.bilibili.com/x/web-interface/view?bvid=${bvid}`;
|
||||||
|
|
||||||
|
const detailData = JSON.parse(await request(detailUrl, getHeaders())).data;
|
||||||
|
// 记录历史
|
||||||
|
if (!_.isEmpty(bili_jct)) {
|
||||||
|
const historyReport = 'https://api.bilibili.com/x/v2/history/report';
|
||||||
|
let dataPost = {
|
||||||
|
aid: detailData.aid,
|
||||||
|
cid: detailData.cid,
|
||||||
|
csrf: bili_jct,
|
||||||
|
}
|
||||||
|
await post(historyReport, dataPost, getHeaders(), 'form');
|
||||||
|
}
|
||||||
|
let cd = getFullTime(detailData.duration);
|
||||||
|
const aid = detailData.aid;
|
||||||
|
const video = {
|
||||||
|
vod_id: bvid,
|
||||||
|
vod_name: detailData.title,
|
||||||
|
vod_pic: detailData.pic,
|
||||||
|
type_name: detailData.tname,
|
||||||
|
vod_year: '',
|
||||||
|
vod_area: '',
|
||||||
|
vod_remarks: cd,
|
||||||
|
vod_actor: '',
|
||||||
|
vod_director: '',
|
||||||
|
vod_content: detailData.desc,
|
||||||
|
};
|
||||||
|
|
||||||
|
const playurldata = 'https://api.bilibili.com/x/player/playurl?avid=' + aid + '&cid=' + detailData.cid + '&qn=127&fnval=4048&fourk=1';
|
||||||
|
const playurldatas = JSON.parse(await request(playurldata, getHeaders()));
|
||||||
|
|
||||||
|
const playurldatalist = playurldatas.data;
|
||||||
|
const accept_quality = playurldatalist.accept_quality;
|
||||||
|
const accept_description = playurldatalist.accept_description;
|
||||||
|
const qualitylist = [];
|
||||||
|
const descriptionList = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < accept_quality.length; i++) {
|
||||||
|
if (!vip) {
|
||||||
|
if (!login) {
|
||||||
|
if (accept_quality[i] > 32) continue;
|
||||||
|
} else {
|
||||||
|
if (accept_quality[i] > 80) continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
descriptionList.push(base64Encode(accept_description[i]));
|
||||||
|
qualitylist.push(accept_quality[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
let treeMap = {};
|
||||||
|
const jSONArray = detailData.pages;
|
||||||
|
let playList = [];
|
||||||
|
for (let j = 0; j < jSONArray.length; j++) {
|
||||||
|
const jSONObject6 = jSONArray[j];
|
||||||
|
const cid = jSONObject6.cid;
|
||||||
|
const playUrl = j + '$' + aid + '+' + cid + '+' + qualitylist.join(':') + '+' + descriptionList.join(':');
|
||||||
|
playList.push(playUrl);
|
||||||
|
}
|
||||||
|
treeMap['dash'] = playList.join('#');
|
||||||
|
treeMap['mp4'] = playList.join('#');
|
||||||
|
|
||||||
|
const relatedUrl = 'https://api.bilibili.com/x/web-interface/archive/related?bvid=' + bvid;
|
||||||
|
const relatedData = JSON.parse(await request(relatedUrl, getHeaders())).data;
|
||||||
|
playList = [];
|
||||||
|
for (let j = 0; j < relatedData.length; j++) {
|
||||||
|
const jSONObject6 = relatedData[j];
|
||||||
|
const cid = jSONObject6.cid;
|
||||||
|
const title = jSONObject6.title;
|
||||||
|
const aaid = jSONObject6.aid;
|
||||||
|
const playUrl = title + '$' + aaid + '+' + cid + '+' + qualitylist.join(':') + '+' + descriptionList.join(':');
|
||||||
|
playList.push(playUrl);
|
||||||
|
}
|
||||||
|
treeMap['相关'] = playList.join('#');
|
||||||
|
|
||||||
|
video.vod_play_from = Object.keys(treeMap).join("$$$");
|
||||||
|
video.vod_play_url = Object.values(treeMap).join("$$$");
|
||||||
|
|
||||||
|
const list = [video];
|
||||||
|
const result = { list };
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
try {
|
||||||
|
const playHeaders = { Referer: 'https://www.bilibili.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' };
|
||||||
|
const ids = id.split('+');
|
||||||
|
const aid = ids[0];
|
||||||
|
const cid = ids[1];
|
||||||
|
const qualityIds = ids[2].split(':');
|
||||||
|
const qualityName = ids[3].split(':');
|
||||||
|
const dan = 'https://api.bilibili.com/x/v1/dm/list.so?oid=' + cid;
|
||||||
|
if (flag == 'dash' || flag == '相关') {
|
||||||
|
// dash mpd 代理
|
||||||
|
const js2Base = await js2Proxy(true, siteType, siteKey, 'dash/', {});
|
||||||
|
let urls = [];
|
||||||
|
for (let i = 0; i < qualityIds.length; i++) {
|
||||||
|
urls.push(base64Decode(qualityName[i]), js2Base + base64Encode(aid + '+' + cid + '+' + qualityIds[i]));
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: urls,
|
||||||
|
danmaku: dan,
|
||||||
|
header: playHeaders,
|
||||||
|
});
|
||||||
|
} else if (flag == 'mp4') {
|
||||||
|
// 直链
|
||||||
|
let urls = [];
|
||||||
|
for (let i = 0; i < qualityIds.length; i++) {
|
||||||
|
const url = `https://api.bilibili.com/x/player/playurl?avid=${aid}&cid=${cid}&qn=${qualityIds[i]}&fourk=1`;
|
||||||
|
const resp = JSON.parse(await request(url, getHeaders()));
|
||||||
|
const data = resp.data;
|
||||||
|
if (data.quality != qualityIds[i]) continue;
|
||||||
|
let durl = data.durl[0].url;
|
||||||
|
urls.push(base64Decode(qualityName[i]), durl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: urls,
|
||||||
|
danmaku: dan,
|
||||||
|
header: playHeaders,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 音频外挂
|
||||||
|
let urls = [];
|
||||||
|
let audios = [];
|
||||||
|
for (let i = 0; i < qualityIds.length; i++) {
|
||||||
|
const url = `https://api.bilibili.com/x/player/playurl?avid=${aid}&cid=${cid}&qn=${qualityIds[i]}&fnval=4048&fourk=1`;
|
||||||
|
let resp = JSON.parse(await request(url, getHeaders()));
|
||||||
|
const dash = resp.data.dash;
|
||||||
|
const video = dash.video;
|
||||||
|
const audio = dash.audio;
|
||||||
|
for (let j = 0; j < video.length; j++) {
|
||||||
|
const dashjson = video[j];
|
||||||
|
if (dashjson.id == qualityIds[i]) {
|
||||||
|
for (const key in vod_codec) {
|
||||||
|
if (dashjson.codecid == key) {
|
||||||
|
urls.push(base64Decode(qualityName[i]) + ' ' + vod_codec[key], dashjson.baseUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (audios.length == 0) {
|
||||||
|
for (let j = 0; j < audio.length; j++) {
|
||||||
|
const dashjson = audio[j];
|
||||||
|
for (const key in vod_audio_id) {
|
||||||
|
if (dashjson.id == key) {
|
||||||
|
audios.push({
|
||||||
|
title: _.floor(parseInt(vod_audio_id[key]) / 1024) + 'Kbps',
|
||||||
|
bit: vod_audio_id[key],
|
||||||
|
url: dashjson.baseUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
audios = _.sortBy(audios, 'bit');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: urls,
|
||||||
|
extra: {
|
||||||
|
audio: audios,
|
||||||
|
},
|
||||||
|
header: playHeaders,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(key, quick, pg) {
|
||||||
|
let page = pg || 1;
|
||||||
|
if (page == 0) page = 1;
|
||||||
|
try {
|
||||||
|
const ext = {
|
||||||
|
duration: '0',
|
||||||
|
};
|
||||||
|
let resp = JSON.parse(await category(key, page, true, ext));
|
||||||
|
const catVideos = resp.list;
|
||||||
|
const pageCount = resp.pagecount;
|
||||||
|
const videos = [];
|
||||||
|
for (let i = 0; i < catVideos.length; ++i) {
|
||||||
|
videos.push(catVideos[i]);
|
||||||
|
}
|
||||||
|
const result = {
|
||||||
|
page: page,
|
||||||
|
pagecount: pageCount,
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
list: videos,
|
||||||
|
};
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function proxy(segments, headers) {
|
||||||
|
let what = segments[0];
|
||||||
|
let url = base64Decode(segments[1]);
|
||||||
|
if (what == 'dash') {
|
||||||
|
const ids = url.split('+');
|
||||||
|
const aid = ids[0];
|
||||||
|
const cid = ids[1];
|
||||||
|
const str5 = ids[2];
|
||||||
|
const urls = `https://api.bilibili.com/x/player/playurl?avid=${aid}&cid=${cid}&qn=${str5}&fnval=4048&fourk=1`;
|
||||||
|
let videoList = '';
|
||||||
|
let audioList = '';
|
||||||
|
|
||||||
|
let resp = JSON.parse(await request(urls, getHeaders()));
|
||||||
|
const dash = resp.data.dash;
|
||||||
|
const video = dash.video;
|
||||||
|
const audio = dash.audio;
|
||||||
|
|
||||||
|
for (let i = 0; i < video.length; i++) {
|
||||||
|
// if (i > 0) continue; // 只取一个
|
||||||
|
const dashjson = video[i];
|
||||||
|
if (dashjson.id == str5) {
|
||||||
|
videoList += getDashMedia(dashjson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < audio.length; i++) {
|
||||||
|
// if (i > 0) continue;
|
||||||
|
const ajson = audio[i];
|
||||||
|
for (const key in vod_audio_id) {
|
||||||
|
if (ajson.id == key) {
|
||||||
|
audioList += getDashMedia(ajson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let mpd = getDash(resp, videoList, audioList);
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
code: 200,
|
||||||
|
content: mpd,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/dash+xml',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
code: 500,
|
||||||
|
content: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDashMedia(dash) {
|
||||||
|
try {
|
||||||
|
let qnid = dash.id;
|
||||||
|
const codecid = dash.codecid;
|
||||||
|
const media_codecs = dash.codecs;
|
||||||
|
const media_bandwidth = dash.bandwidth;
|
||||||
|
const media_startWithSAP = dash.startWithSap;
|
||||||
|
const media_mimeType = dash.mimeType;
|
||||||
|
const media_BaseURL = dash.baseUrl.replace(/&/g, '&');
|
||||||
|
const media_SegmentBase_indexRange = dash.SegmentBase.indexRange;
|
||||||
|
const media_SegmentBase_Initialization = dash.SegmentBase.Initialization;
|
||||||
|
const mediaType = media_mimeType.split('/')[0];
|
||||||
|
let media_type_params = '';
|
||||||
|
|
||||||
|
if (mediaType == 'video') {
|
||||||
|
const media_frameRate = dash.frameRate;
|
||||||
|
const media_sar = dash.sar;
|
||||||
|
const media_width = dash.width;
|
||||||
|
const media_height = dash.height;
|
||||||
|
media_type_params = `height='${media_height}' width='${media_width}' frameRate='${media_frameRate}' sar='${media_sar}'`;
|
||||||
|
} else if (mediaType == 'audio') {
|
||||||
|
for (const key in vod_audio_id) {
|
||||||
|
if (qnid == key) {
|
||||||
|
const audioSamplingRate = vod_audio_id[key];
|
||||||
|
media_type_params = `numChannels='2' sampleRate='${audioSamplingRate}'`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qnid += '_' + codecid;
|
||||||
|
|
||||||
|
return `<AdaptationSet lang="chi">
|
||||||
|
<ContentComponent contentType="${mediaType}"/>
|
||||||
|
<Representation id="${qnid}" bandwidth="${media_bandwidth}" codecs="${media_codecs}" mimeType="${media_mimeType}" ${media_type_params} startWithSAP="${media_startWithSAP}">
|
||||||
|
<BaseURL>${media_BaseURL}</BaseURL>
|
||||||
|
<SegmentBase indexRange="${media_SegmentBase_indexRange}">
|
||||||
|
<Initialization range="${media_SegmentBase_Initialization}"/>
|
||||||
|
</SegmentBase>
|
||||||
|
</Representation>
|
||||||
|
</AdaptationSet>`;
|
||||||
|
} catch (e) {
|
||||||
|
// Handle exceptions here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDash(ja, videoList, audioList) {
|
||||||
|
const duration = ja.data.dash.duration;
|
||||||
|
const minBufferTime = ja.data.dash.minBufferTime;
|
||||||
|
return `<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" type="static" mediaPresentationDuration="PT${duration}S" minBufferTime="PT${minBufferTime}S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
|
||||||
|
<Period duration="PT${duration}S" start="PT0S">
|
||||||
|
${videoList}
|
||||||
|
${audioList}
|
||||||
|
</Period>
|
||||||
|
</MPD>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function base64Encode(text) {
|
||||||
|
return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function removeTags(input) {
|
||||||
|
return input.replace(/<[^>]*>/g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFullTime(numberSec) {
|
||||||
|
let totalSeconds = '';
|
||||||
|
try {
|
||||||
|
var timeParts = numberSec.split(":");
|
||||||
|
var min = parseInt(timeParts[0]);
|
||||||
|
var sec = parseInt(timeParts[1]);
|
||||||
|
totalSeconds = min * 60 + sec;
|
||||||
|
} catch (e) {
|
||||||
|
totalSeconds = parseInt(numberSec);
|
||||||
|
}
|
||||||
|
if (isNaN(totalSeconds)) {
|
||||||
|
return '无效输入';
|
||||||
|
}
|
||||||
|
if (totalSeconds >= 3600) {
|
||||||
|
const hours = Math.floor(totalSeconds / 3600);
|
||||||
|
const remainingSecondsAfterHours = totalSeconds % 3600;
|
||||||
|
const minutes = Math.floor(remainingSecondsAfterHours / 60);
|
||||||
|
const seconds = remainingSecondsAfterHours % 60;
|
||||||
|
return `${hours}小时 ${minutes}分钟 ${seconds}秒`;
|
||||||
|
} else {
|
||||||
|
const minutes = Math.floor(totalSeconds / 60);
|
||||||
|
const seconds = totalSeconds % 60;
|
||||||
|
return `${minutes}分钟 ${seconds}秒`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
proxy: proxy,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
618
JN/EXT/OPENJS/open/bili_open2.js
Normal file
618
JN/EXT/OPENJS/open/bili_open2.js
Normal file
@ -0,0 +1,618 @@
|
|||||||
|
import { Crypto, jinja2, _ } from 'assets://js/lib/cat.js';
|
||||||
|
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
let cookie = '';
|
||||||
|
let login = '';
|
||||||
|
let vip = false;
|
||||||
|
let extendObj = {};
|
||||||
|
let bili_jct = '';
|
||||||
|
let vod_audio_id = {
|
||||||
|
30280: 192000,
|
||||||
|
30232: 132000,
|
||||||
|
30216: 64000,
|
||||||
|
};
|
||||||
|
|
||||||
|
let vod_codec = {
|
||||||
|
// 13: 'AV1',
|
||||||
|
12: 'HEVC',
|
||||||
|
7: 'AVC',
|
||||||
|
};
|
||||||
|
|
||||||
|
const UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36';
|
||||||
|
|
||||||
|
async function request(reqUrl, ua, buffer) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: ua ? ua : { 'User-Agent': UA },
|
||||||
|
timeout: 60000,
|
||||||
|
buffer: buffer ? 1 : 0,
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function post(reqUrl, postData, ua, posttype) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'post',
|
||||||
|
headers: ua ? ua : { 'User-Agent': UA },
|
||||||
|
data: postData,
|
||||||
|
timeout: 60000,
|
||||||
|
postType: posttype,
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHeaders() {
|
||||||
|
const headers = {
|
||||||
|
'User-Agent': UA,
|
||||||
|
};
|
||||||
|
if (!_.isEmpty(cookie)) {
|
||||||
|
headers.cookie = cookie;
|
||||||
|
}
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getCookie() {
|
||||||
|
let result = await req('https://www.bilibili.com', {
|
||||||
|
method: 'get',
|
||||||
|
headers: { 'User-Agent': UA },
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
const setCookieHeaders = result.headers['set-cookie'];
|
||||||
|
cookie = setCookieHeaders.map((kk) => kk.split(';')[0] + ';').join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
let extend = cfg.ext;
|
||||||
|
|
||||||
|
if (cfg.ext.hasOwnProperty('categories')) extend = cfg.ext.categories;
|
||||||
|
if (cfg.ext.hasOwnProperty('cookie')) cookie = cfg.ext.cookie;
|
||||||
|
if (cookie.startsWith('http')) cookie = await request(cookie);
|
||||||
|
// 获取csrf
|
||||||
|
const cookies = cookie.split(';');
|
||||||
|
cookies.forEach(cookie => {
|
||||||
|
if (cookie.includes('bili_jct')) {
|
||||||
|
bili_jct = cookie.split('=')[1];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (_.isEmpty(cookie)) await getCookie();
|
||||||
|
let result = JSON.parse(await request('https://api.bilibili.com/x/web-interface/nav', getHeaders()));
|
||||||
|
login = result.data.isLogin;
|
||||||
|
vip = result.data.vipStatus;
|
||||||
|
const ext = extend.split('#');
|
||||||
|
const jsonData = [
|
||||||
|
{
|
||||||
|
key: 'order',
|
||||||
|
name: '排序',
|
||||||
|
value: [
|
||||||
|
{ n: '综合排序', v: '0' },
|
||||||
|
{ n: '最多点击', v: 'click' },
|
||||||
|
{ n: '最新发布', v: 'pubdate' },
|
||||||
|
{ n: '最多弹幕', v: 'dm' },
|
||||||
|
{ n: '最多收藏', v: 'stow' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'duration',
|
||||||
|
name: '时长',
|
||||||
|
value: [
|
||||||
|
{ n: '全部时长', v: '0' },
|
||||||
|
{ n: '60分钟以上', v: '4' },
|
||||||
|
{ n: '30~60分钟', v: '3' },
|
||||||
|
{ n: '10~30分钟', v: '2' },
|
||||||
|
{ n: '10分钟以下', v: '1' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const newarr = [];
|
||||||
|
const d = {};
|
||||||
|
const sc = {
|
||||||
|
type_name: "首页",
|
||||||
|
type_id: "首页",
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
}
|
||||||
|
newarr.push(sc);
|
||||||
|
for (const kk of ext) {
|
||||||
|
const c = {
|
||||||
|
type_name: kk,
|
||||||
|
type_id: kk,
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
};
|
||||||
|
newarr.push(c);
|
||||||
|
d[kk] = jsonData;
|
||||||
|
}
|
||||||
|
if (!_.isEmpty(bili_jct)) {
|
||||||
|
const hc = {
|
||||||
|
type_name: "历史记录",
|
||||||
|
type_id: "历史记录",
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
}
|
||||||
|
newarr.push(hc);
|
||||||
|
}
|
||||||
|
extendObj = {
|
||||||
|
classes: newarr,
|
||||||
|
filter: d,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function home(filter) {
|
||||||
|
try {
|
||||||
|
const jSONObject = {
|
||||||
|
class: extendObj.classes,
|
||||||
|
};
|
||||||
|
if (filter) {
|
||||||
|
jSONObject.filters = extendObj.filter;
|
||||||
|
}
|
||||||
|
return JSON.stringify(jSONObject);
|
||||||
|
} catch (e) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {
|
||||||
|
try {
|
||||||
|
const list = [];
|
||||||
|
const url = 'https://api.bilibili.com/x/web-interface/index/top/rcmd?ps=14&fresh_idx=1&fresh_idx_1h=1';
|
||||||
|
|
||||||
|
const response = await request(url, getHeaders());
|
||||||
|
const responseData = JSON.parse(response);
|
||||||
|
const vods = responseData.data.item;
|
||||||
|
|
||||||
|
for (const item of vods) {
|
||||||
|
const vod = {};
|
||||||
|
let imageUrl = item.pic;
|
||||||
|
if (imageUrl.startsWith('//')) {
|
||||||
|
imageUrl = 'https:' + imageUrl;
|
||||||
|
}
|
||||||
|
let cd = getFullTime(item.duration);
|
||||||
|
|
||||||
|
vod.vod_id = item.bvid;
|
||||||
|
vod.vod_name = removeTags(item.title);
|
||||||
|
vod.vod_pic = imageUrl;
|
||||||
|
vod.vod_remarks = cd;
|
||||||
|
vod.style = {
|
||||||
|
type: 'rect',
|
||||||
|
ratio: 1.33,
|
||||||
|
},
|
||||||
|
list.push(vod);
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = { list: list };
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
async function category(tid, page, filter, ext) {
|
||||||
|
if (page < 1) page = 1;
|
||||||
|
try {
|
||||||
|
if (Object.keys(ext).length > 0 && ext.hasOwnProperty('tid') && ext['tid'].length > 0) {
|
||||||
|
tid = ext['tid'];
|
||||||
|
}
|
||||||
|
let url = '';
|
||||||
|
url = `https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword=${encodeURIComponent(tid)}`;
|
||||||
|
|
||||||
|
if (Object.keys(ext).length > 0) {
|
||||||
|
for (const k in ext) {
|
||||||
|
if (k == 'tid') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
url += `&${encodeURIComponent(k)}=${encodeURIComponent(ext[k])}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
url += `&page=${encodeURIComponent(page)}`;
|
||||||
|
|
||||||
|
if (tid == "首页") {
|
||||||
|
url = "https://api.bilibili.com/x/web-interface/index/top/rcmd?ps=14&fresh_idx=" + page + "&fresh_idx_1h=" + page;
|
||||||
|
} else if (tid == "历史记录") {
|
||||||
|
url = "https://api.bilibili.com/x/v2/history?pn=" + page;
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = JSON.parse(await request(url, getHeaders())).data;
|
||||||
|
let items = data.result;
|
||||||
|
if (tid == "首页") {
|
||||||
|
items = data.item;
|
||||||
|
} else if (tid == "历史记录") {
|
||||||
|
items = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
const videos = [];
|
||||||
|
for (const item of items) {
|
||||||
|
const video = {};
|
||||||
|
let pic = item.pic;
|
||||||
|
if (pic.startsWith('//')) {
|
||||||
|
pic = 'https:' + pic;
|
||||||
|
}
|
||||||
|
let cd = getFullTime(item.duration);
|
||||||
|
|
||||||
|
video.vod_remarks = cd;
|
||||||
|
video.vod_id = item.bvid;
|
||||||
|
video.vod_name = removeTags(item.title);
|
||||||
|
video.vod_pic = pic;
|
||||||
|
|
||||||
|
video.style = {
|
||||||
|
type: 'rect',
|
||||||
|
ratio: 1.33,
|
||||||
|
},
|
||||||
|
videos.push(video);
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
page: page,
|
||||||
|
pagecount: data.numPages ?? (page + 1),
|
||||||
|
limit: videos.length,
|
||||||
|
total: videos.length * (page + 1),
|
||||||
|
list: videos,
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(ids) {
|
||||||
|
try {
|
||||||
|
const bvid = ids;
|
||||||
|
const detailUrl = `https://api.bilibili.com/x/web-interface/view?bvid=${bvid}`;
|
||||||
|
|
||||||
|
const detailData = JSON.parse(await request(detailUrl, getHeaders())).data;
|
||||||
|
// 记录历史
|
||||||
|
if (!_.isEmpty(bili_jct)) {
|
||||||
|
const historyReport = 'https://api.bilibili.com/x/v2/history/report';
|
||||||
|
let dataPost = {
|
||||||
|
aid: detailData.aid,
|
||||||
|
cid: detailData.cid,
|
||||||
|
csrf: bili_jct,
|
||||||
|
}
|
||||||
|
await post(historyReport, dataPost, getHeaders(), 'form');
|
||||||
|
}
|
||||||
|
let cd = getFullTime(detailData.duration);
|
||||||
|
const aid = detailData.aid;
|
||||||
|
const video = {
|
||||||
|
vod_id: bvid,
|
||||||
|
vod_name: detailData.title,
|
||||||
|
vod_pic: detailData.pic,
|
||||||
|
type_name: detailData.tname,
|
||||||
|
vod_year: '',
|
||||||
|
vod_area: '',
|
||||||
|
vod_remarks: cd,
|
||||||
|
vod_actor: '',
|
||||||
|
vod_director: '',
|
||||||
|
vod_content: detailData.desc,
|
||||||
|
};
|
||||||
|
|
||||||
|
const playurldata = 'https://api.bilibili.com/x/player/playurl?avid=' + aid + '&cid=' + detailData.cid + '&qn=127&fnval=4048&fourk=1';
|
||||||
|
const playurldatas = JSON.parse(await request(playurldata, getHeaders()));
|
||||||
|
|
||||||
|
const playurldatalist = playurldatas.data;
|
||||||
|
const accept_quality = playurldatalist.accept_quality;
|
||||||
|
const accept_description = playurldatalist.accept_description;
|
||||||
|
const qualitylist = [];
|
||||||
|
const descriptionList = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < accept_quality.length; i++) {
|
||||||
|
if (!vip) {
|
||||||
|
if (!login) {
|
||||||
|
if (accept_quality[i] > 32) continue;
|
||||||
|
} else {
|
||||||
|
if (accept_quality[i] > 80) continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
descriptionList.push(base64Encode(accept_description[i]));
|
||||||
|
qualitylist.push(accept_quality[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
let treeMap = {};
|
||||||
|
const jSONArray = detailData.pages;
|
||||||
|
let playList = [];
|
||||||
|
for (let j = 0; j < jSONArray.length; j++) {
|
||||||
|
const jSONObject6 = jSONArray[j];
|
||||||
|
const cid = jSONObject6.cid;
|
||||||
|
const playUrl = j + '$' + aid + '+' + cid + '+' + qualitylist.join(':') + '+' + descriptionList.join(':');
|
||||||
|
playList.push(playUrl);
|
||||||
|
}
|
||||||
|
treeMap['dash'] = playList.join('#');
|
||||||
|
treeMap['mp4'] = playList.join('#');
|
||||||
|
|
||||||
|
const relatedUrl = 'https://api.bilibili.com/x/web-interface/archive/related?bvid=' + bvid;
|
||||||
|
const relatedData = JSON.parse(await request(relatedUrl, getHeaders())).data;
|
||||||
|
playList = [];
|
||||||
|
for (let j = 0; j < relatedData.length; j++) {
|
||||||
|
const jSONObject6 = relatedData[j];
|
||||||
|
const cid = jSONObject6.cid;
|
||||||
|
const title = jSONObject6.title;
|
||||||
|
const aaid = jSONObject6.aid;
|
||||||
|
const playUrl = title + '$' + aaid + '+' + cid + '+' + qualitylist.join(':') + '+' + descriptionList.join(':');
|
||||||
|
playList.push(playUrl);
|
||||||
|
}
|
||||||
|
treeMap['相关'] = playList.join('#');
|
||||||
|
|
||||||
|
video.vod_play_from = Object.keys(treeMap).join("$$$");
|
||||||
|
video.vod_play_url = Object.values(treeMap).join("$$$");
|
||||||
|
|
||||||
|
const list = [video];
|
||||||
|
const result = { list };
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
try {
|
||||||
|
const playHeaders = { Referer: 'https://www.bilibili.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' };
|
||||||
|
const ids = id.split('+');
|
||||||
|
const aid = ids[0];
|
||||||
|
const cid = ids[1];
|
||||||
|
const qualityIds = ids[2].split(':');
|
||||||
|
const qualityName = ids[3].split(':');
|
||||||
|
if (flag == 'dash' || flag == '相关') {
|
||||||
|
// dash mpd 代理
|
||||||
|
const js2Base = await js2Proxy(true, siteType, siteKey, 'dash/', {});
|
||||||
|
let urls = [];
|
||||||
|
for (let i = 0; i < qualityIds.length; i++) {
|
||||||
|
urls.push(base64Decode(qualityName[i]), js2Base + base64Encode(aid + '+' + cid + '+' + qualityIds[i]));
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: urls,
|
||||||
|
header: playHeaders,
|
||||||
|
});
|
||||||
|
} else if (flag == 'mp4') {
|
||||||
|
// 直链
|
||||||
|
let urls = [];
|
||||||
|
for (let i = 0; i < qualityIds.length; i++) {
|
||||||
|
const url = `https://api.bilibili.com/x/player/playurl?avid=${aid}&cid=${cid}&qn=${qualityIds[i]}&fourk=1`;
|
||||||
|
const resp = JSON.parse(await request(url, getHeaders()));
|
||||||
|
const data = resp.data;
|
||||||
|
if (data.quality != qualityIds[i]) continue;
|
||||||
|
let durl = data.durl[0].url;
|
||||||
|
urls.push(base64Decode(qualityName[i]), durl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: urls,
|
||||||
|
header: playHeaders,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 音频外挂
|
||||||
|
let urls = [];
|
||||||
|
let audios = [];
|
||||||
|
for (let i = 0; i < qualityIds.length; i++) {
|
||||||
|
const url = `https://api.bilibili.com/x/player/playurl?avid=${aid}&cid=${cid}&qn=${qualityIds[i]}&fnval=4048&fourk=1`;
|
||||||
|
let resp = JSON.parse(await request(url, getHeaders()));
|
||||||
|
const dash = resp.data.dash;
|
||||||
|
const video = dash.video;
|
||||||
|
const audio = dash.audio;
|
||||||
|
for (let j = 0; j < video.length; j++) {
|
||||||
|
const dashjson = video[j];
|
||||||
|
if (dashjson.id == qualityIds[i]) {
|
||||||
|
for (const key in vod_codec) {
|
||||||
|
if (dashjson.codecid == key) {
|
||||||
|
urls.push(base64Decode(qualityName[i]) + ' ' + vod_codec[key], dashjson.baseUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (audios.length == 0) {
|
||||||
|
for (let j = 0; j < audio.length; j++) {
|
||||||
|
const dashjson = audio[j];
|
||||||
|
for (const key in vod_audio_id) {
|
||||||
|
if (dashjson.id == key) {
|
||||||
|
audios.push({
|
||||||
|
title: _.floor(parseInt(vod_audio_id[key]) / 1024) + 'Kbps',
|
||||||
|
bit: vod_audio_id[key],
|
||||||
|
url: dashjson.baseUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
audios = _.sortBy(audios, 'bit');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: urls,
|
||||||
|
extra: {
|
||||||
|
audio: audios,
|
||||||
|
},
|
||||||
|
header: playHeaders,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(key, quick, pg) {
|
||||||
|
let page = pg || 1;
|
||||||
|
if (page == 0) page = 1;
|
||||||
|
try {
|
||||||
|
const ext = {
|
||||||
|
duration: '0',
|
||||||
|
};
|
||||||
|
let resp = JSON.parse(await category(key, page, true, ext));
|
||||||
|
const catVideos = resp.list;
|
||||||
|
const pageCount = resp.pagecount;
|
||||||
|
const videos = [];
|
||||||
|
for (let i = 0; i < catVideos.length; ++i) {
|
||||||
|
videos.push(catVideos[i]);
|
||||||
|
}
|
||||||
|
const result = {
|
||||||
|
page: page,
|
||||||
|
pagecount: pageCount,
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
list: videos,
|
||||||
|
};
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function proxy(segments, headers) {
|
||||||
|
let what = segments[0];
|
||||||
|
let url = base64Decode(segments[1]);
|
||||||
|
if (what == 'dash') {
|
||||||
|
const ids = url.split('+');
|
||||||
|
const aid = ids[0];
|
||||||
|
const cid = ids[1];
|
||||||
|
const str5 = ids[2];
|
||||||
|
const urls = `https://api.bilibili.com/x/player/playurl?avid=${aid}&cid=${cid}&qn=${str5}&fnval=4048&fourk=1`;
|
||||||
|
let videoList = '';
|
||||||
|
let audioList = '';
|
||||||
|
|
||||||
|
let resp = JSON.parse(await request(urls, getHeaders()));
|
||||||
|
const dash = resp.data.dash;
|
||||||
|
const video = dash.video;
|
||||||
|
const audio = dash.audio;
|
||||||
|
|
||||||
|
for (let i = 0; i < video.length; i++) {
|
||||||
|
// if (i > 0) continue; // 只取一个
|
||||||
|
const dashjson = video[i];
|
||||||
|
if (dashjson.id == str5) {
|
||||||
|
videoList += getDashMedia(dashjson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < audio.length; i++) {
|
||||||
|
// if (i > 0) continue;
|
||||||
|
const ajson = audio[i];
|
||||||
|
for (const key in vod_audio_id) {
|
||||||
|
if (ajson.id == key) {
|
||||||
|
audioList += getDashMedia(ajson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let mpd = getDash(resp, videoList, audioList);
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
code: 200,
|
||||||
|
content: mpd,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/dash+xml',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
code: 500,
|
||||||
|
content: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDashMedia(dash) {
|
||||||
|
try {
|
||||||
|
let qnid = dash.id;
|
||||||
|
const codecid = dash.codecid;
|
||||||
|
const media_codecs = dash.codecs;
|
||||||
|
const media_bandwidth = dash.bandwidth;
|
||||||
|
const media_startWithSAP = dash.startWithSap;
|
||||||
|
const media_mimeType = dash.mimeType;
|
||||||
|
const media_BaseURL = dash.baseUrl.replace(/&/g, '&');
|
||||||
|
const media_SegmentBase_indexRange = dash.SegmentBase.indexRange;
|
||||||
|
const media_SegmentBase_Initialization = dash.SegmentBase.Initialization;
|
||||||
|
const mediaType = media_mimeType.split('/')[0];
|
||||||
|
let media_type_params = '';
|
||||||
|
|
||||||
|
if (mediaType == 'video') {
|
||||||
|
const media_frameRate = dash.frameRate;
|
||||||
|
const media_sar = dash.sar;
|
||||||
|
const media_width = dash.width;
|
||||||
|
const media_height = dash.height;
|
||||||
|
media_type_params = `height='${media_height}' width='${media_width}' frameRate='${media_frameRate}' sar='${media_sar}'`;
|
||||||
|
} else if (mediaType == 'audio') {
|
||||||
|
for (const key in vod_audio_id) {
|
||||||
|
if (qnid == key) {
|
||||||
|
const audioSamplingRate = vod_audio_id[key];
|
||||||
|
media_type_params = `numChannels='2' sampleRate='${audioSamplingRate}'`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qnid += '_' + codecid;
|
||||||
|
|
||||||
|
return `<AdaptationSet lang="chi">
|
||||||
|
<ContentComponent contentType="${mediaType}"/>
|
||||||
|
<Representation id="${qnid}" bandwidth="${media_bandwidth}" codecs="${media_codecs}" mimeType="${media_mimeType}" ${media_type_params} startWithSAP="${media_startWithSAP}">
|
||||||
|
<BaseURL>${media_BaseURL}</BaseURL>
|
||||||
|
<SegmentBase indexRange="${media_SegmentBase_indexRange}">
|
||||||
|
<Initialization range="${media_SegmentBase_Initialization}"/>
|
||||||
|
</SegmentBase>
|
||||||
|
</Representation>
|
||||||
|
</AdaptationSet>`;
|
||||||
|
} catch (e) {
|
||||||
|
// Handle exceptions here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDash(ja, videoList, audioList) {
|
||||||
|
const duration = ja.data.dash.duration;
|
||||||
|
const minBufferTime = ja.data.dash.minBufferTime;
|
||||||
|
return `<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" type="static" mediaPresentationDuration="PT${duration}S" minBufferTime="PT${minBufferTime}S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
|
||||||
|
<Period duration="PT${duration}S" start="PT0S">
|
||||||
|
${videoList}
|
||||||
|
${audioList}
|
||||||
|
</Period>
|
||||||
|
</MPD>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function base64Encode(text) {
|
||||||
|
return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function removeTags(input) {
|
||||||
|
return input.replace(/<[^>]*>/g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFullTime(numberSec) {
|
||||||
|
let totalSeconds = '';
|
||||||
|
try {
|
||||||
|
var timeParts = numberSec.split(":");
|
||||||
|
var min = parseInt(timeParts[0]);
|
||||||
|
var sec = parseInt(timeParts[1]);
|
||||||
|
totalSeconds = min * 60 + sec;
|
||||||
|
} catch (e) {
|
||||||
|
totalSeconds = parseInt(numberSec);
|
||||||
|
}
|
||||||
|
if (isNaN(totalSeconds)) {
|
||||||
|
return '无效输入';
|
||||||
|
}
|
||||||
|
if (totalSeconds >= 3600) {
|
||||||
|
const hours = Math.floor(totalSeconds / 3600);
|
||||||
|
const remainingSecondsAfterHours = totalSeconds % 3600;
|
||||||
|
const minutes = Math.floor(remainingSecondsAfterHours / 60);
|
||||||
|
const seconds = remainingSecondsAfterHours % 60;
|
||||||
|
return `${hours}小时 ${minutes}分钟 ${seconds}秒`;
|
||||||
|
} else {
|
||||||
|
const minutes = Math.floor(totalSeconds / 60);
|
||||||
|
const seconds = totalSeconds % 60;
|
||||||
|
return `${minutes}分钟 ${seconds}秒`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
proxy: proxy,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
618
JN/EXT/OPENJS/open/bili_open3.js
Normal file
618
JN/EXT/OPENJS/open/bili_open3.js
Normal file
@ -0,0 +1,618 @@
|
|||||||
|
import { Crypto, jinja2, _ } from 'assets://js/lib/cat.js';
|
||||||
|
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
let cookie = '';
|
||||||
|
let login = '';
|
||||||
|
let vip = false;
|
||||||
|
let extendObj = {};
|
||||||
|
let bili_jct = '';
|
||||||
|
let vod_audio_id = {
|
||||||
|
30280: 192000,
|
||||||
|
30232: 132000,
|
||||||
|
30216: 64000,
|
||||||
|
};
|
||||||
|
|
||||||
|
let vod_codec = {
|
||||||
|
// 13: 'AV1',
|
||||||
|
12: 'HEVC',
|
||||||
|
7: 'AVC',
|
||||||
|
};
|
||||||
|
|
||||||
|
const UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36';
|
||||||
|
|
||||||
|
async function request(reqUrl, ua, buffer) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: ua ? ua : { 'User-Agent': UA },
|
||||||
|
timeout: 60000,
|
||||||
|
buffer: buffer ? 1 : 0,
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function post(reqUrl, postData, ua, posttype) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'post',
|
||||||
|
headers: ua ? ua : { 'User-Agent': UA },
|
||||||
|
data: postData,
|
||||||
|
timeout: 60000,
|
||||||
|
postType: posttype,
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHeaders() {
|
||||||
|
const headers = {
|
||||||
|
'User-Agent': UA,
|
||||||
|
};
|
||||||
|
if (!_.isEmpty(cookie)) {
|
||||||
|
headers.cookie = cookie;
|
||||||
|
}
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getCookie() {
|
||||||
|
let result = await req('https://www.bilibili.com', {
|
||||||
|
method: 'get',
|
||||||
|
headers: { 'User-Agent': UA },
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
const setCookieHeaders = result.headers['set-cookie'];
|
||||||
|
cookie = setCookieHeaders.map((kk) => kk.split(';')[0] + ';').join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
let extend = cfg.ext;
|
||||||
|
|
||||||
|
if (cfg.ext.hasOwnProperty('categories')) extend = cfg.ext.categories;
|
||||||
|
if (cfg.ext.hasOwnProperty('cookie')) cookie = cfg.ext.cookie;
|
||||||
|
// 获取csrf
|
||||||
|
const cookies = cookie.split(';');
|
||||||
|
cookies.forEach(cookie => {
|
||||||
|
if (cookie.includes('bili_jct')) {
|
||||||
|
bili_jct = cookie.split('=')[1];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (_.isEmpty(cookie)) await getCookie();
|
||||||
|
let result = JSON.parse(await request('https://api.bilibili.com/x/web-interface/nav', getHeaders()));
|
||||||
|
login = result.data.isLogin;
|
||||||
|
vip = result.data.vipStatus;
|
||||||
|
const ext = extend.split('#');
|
||||||
|
const jsonData = [
|
||||||
|
{
|
||||||
|
key: 'order',
|
||||||
|
name: '排序',
|
||||||
|
value: [
|
||||||
|
{ n: '综合排序', v: '0' },
|
||||||
|
{ n: '最多点击', v: 'click' },
|
||||||
|
{ n: '最新发布', v: 'pubdate' },
|
||||||
|
{ n: '最多弹幕', v: 'dm' },
|
||||||
|
{ n: '最多收藏', v: 'stow' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'duration',
|
||||||
|
name: '时长',
|
||||||
|
value: [
|
||||||
|
{ n: '全部时长', v: '0' },
|
||||||
|
{ n: '60分钟以上', v: '4' },
|
||||||
|
{ n: '30~60分钟', v: '3' },
|
||||||
|
{ n: '10~30分钟', v: '2' },
|
||||||
|
{ n: '10分钟以下', v: '1' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const newarr = [];
|
||||||
|
const d = {};
|
||||||
|
const sc = {
|
||||||
|
type_name: "首页",
|
||||||
|
type_id: "首页",
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
}
|
||||||
|
newarr.push(sc);
|
||||||
|
for (const kk of ext) {
|
||||||
|
const c = {
|
||||||
|
type_name: kk,
|
||||||
|
type_id: kk,
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
};
|
||||||
|
newarr.push(c);
|
||||||
|
d[kk] = jsonData;
|
||||||
|
}
|
||||||
|
if (!_.isEmpty(bili_jct)) {
|
||||||
|
const hc = {
|
||||||
|
type_name: "历史记录",
|
||||||
|
type_id: "历史记录",
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
}
|
||||||
|
newarr.push(hc);
|
||||||
|
}
|
||||||
|
extendObj = {
|
||||||
|
classes: newarr,
|
||||||
|
filter: d,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function home(filter) {
|
||||||
|
try {
|
||||||
|
const jSONObject = {
|
||||||
|
class: extendObj.classes,
|
||||||
|
};
|
||||||
|
if (filter) {
|
||||||
|
jSONObject.filters = extendObj.filter;
|
||||||
|
}
|
||||||
|
return JSON.stringify(jSONObject);
|
||||||
|
} catch (e) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {
|
||||||
|
try {
|
||||||
|
const list = [];
|
||||||
|
const url = 'https://api.bilibili.com/x/web-interface/index/top/rcmd?ps=14&fresh_idx=1&fresh_idx_1h=1';
|
||||||
|
|
||||||
|
const response = await request(url, getHeaders());
|
||||||
|
const responseData = JSON.parse(response);
|
||||||
|
const vods = responseData.data.item;
|
||||||
|
|
||||||
|
for (const item of vods) {
|
||||||
|
const vod = {};
|
||||||
|
let imageUrl = item.pic;
|
||||||
|
if (imageUrl.startsWith('//')) {
|
||||||
|
imageUrl = 'https:' + imageUrl;
|
||||||
|
}
|
||||||
|
let cd = getFullTime(item.duration);
|
||||||
|
|
||||||
|
vod.vod_id = item.bvid;
|
||||||
|
vod.vod_name = removeTags(item.title);
|
||||||
|
vod.vod_pic = imageUrl;
|
||||||
|
vod.vod_remarks = cd;
|
||||||
|
vod.style = {
|
||||||
|
type: 'rect',
|
||||||
|
ratio: 1.33,
|
||||||
|
},
|
||||||
|
list.push(vod);
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = { list: list };
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
async function category(tid, page, filter, ext) {
|
||||||
|
if (page < 1) page = 1;
|
||||||
|
try {
|
||||||
|
if (Object.keys(ext).length > 0 && ext.hasOwnProperty('tid') && ext['tid'].length > 0) {
|
||||||
|
tid = ext['tid'];
|
||||||
|
}
|
||||||
|
let url = '';
|
||||||
|
url = `https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword=${encodeURIComponent(tid)}`;
|
||||||
|
|
||||||
|
if (Object.keys(ext).length > 0) {
|
||||||
|
for (const k in ext) {
|
||||||
|
if (k == 'tid') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
url += `&${encodeURIComponent(k)}=${encodeURIComponent(ext[k])}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
url += `&page=${encodeURIComponent(page)}`;
|
||||||
|
|
||||||
|
if (tid == "首页") {
|
||||||
|
url = "https://api.bilibili.com/x/web-interface/index/top/rcmd?ps=14&fresh_idx=" + page + "&fresh_idx_1h=" + page;
|
||||||
|
} else if (tid == "历史记录") {
|
||||||
|
url = "https://api.bilibili.com/x/v2/history?pn=" + page;
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = JSON.parse(await request(url, getHeaders())).data;
|
||||||
|
let items = data.result;
|
||||||
|
if (tid == "首页") {
|
||||||
|
items = data.item;
|
||||||
|
} else if (tid == "历史记录") {
|
||||||
|
items = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
const videos = [];
|
||||||
|
for (const item of items) {
|
||||||
|
const video = {};
|
||||||
|
let pic = item.pic;
|
||||||
|
if (pic.startsWith('//')) {
|
||||||
|
pic = 'https:' + pic;
|
||||||
|
}
|
||||||
|
let cd = getFullTime(item.duration);
|
||||||
|
|
||||||
|
video.vod_remarks = cd;
|
||||||
|
video.vod_id = item.bvid;
|
||||||
|
video.vod_name = removeTags(item.title);
|
||||||
|
video.vod_pic = pic;
|
||||||
|
|
||||||
|
video.style = {
|
||||||
|
type: 'rect',
|
||||||
|
ratio: 1.33,
|
||||||
|
},
|
||||||
|
videos.push(video);
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = {
|
||||||
|
page: page,
|
||||||
|
pagecount: data.numPages ?? (page + 1),
|
||||||
|
limit: videos.length,
|
||||||
|
total: videos.length * (page + 1),
|
||||||
|
list: videos,
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(ids) {
|
||||||
|
try {
|
||||||
|
const bvid = ids;
|
||||||
|
const detailUrl = `https://api.bilibili.com/x/web-interface/view?bvid=${bvid}`;
|
||||||
|
|
||||||
|
const detailData = JSON.parse(await request(detailUrl, getHeaders())).data;
|
||||||
|
// 记录历史
|
||||||
|
if (!_.isEmpty(bili_jct)) {
|
||||||
|
const historyReport = 'https://api.bilibili.com/x/v2/history/report';
|
||||||
|
let dataPost = {
|
||||||
|
aid: detailData.aid,
|
||||||
|
cid: detailData.cid,
|
||||||
|
csrf: bili_jct,
|
||||||
|
}
|
||||||
|
await post(historyReport, dataPost, getHeaders(), 'form');
|
||||||
|
}
|
||||||
|
let cd = getFullTime(detailData.duration);
|
||||||
|
const aid = detailData.aid;
|
||||||
|
const video = {
|
||||||
|
vod_id: bvid,
|
||||||
|
vod_name: detailData.title,
|
||||||
|
vod_pic: detailData.pic,
|
||||||
|
type_name: detailData.tname,
|
||||||
|
vod_year: '',
|
||||||
|
vod_area: '',
|
||||||
|
vod_remarks: cd,
|
||||||
|
vod_actor: '',
|
||||||
|
vod_director: '',
|
||||||
|
vod_content: detailData.desc,
|
||||||
|
};
|
||||||
|
|
||||||
|
const playurldata = 'https://api.bilibili.com/x/player/playurl?avid=' + aid + '&cid=' + detailData.cid + '&qn=127&fnval=4048&fourk=1';
|
||||||
|
const playurldatas = JSON.parse(await request(playurldata, getHeaders()));
|
||||||
|
|
||||||
|
const playurldatalist = playurldatas.data;
|
||||||
|
const accept_quality = playurldatalist.accept_quality;
|
||||||
|
const accept_description = playurldatalist.accept_description;
|
||||||
|
const qualitylist = [];
|
||||||
|
const descriptionList = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < accept_quality.length; i++) {
|
||||||
|
if (!vip) {
|
||||||
|
if (!login) {
|
||||||
|
if (accept_quality[i] > 32) continue;
|
||||||
|
} else {
|
||||||
|
if (accept_quality[i] > 80) continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
descriptionList.push(base64Encode(accept_description[i]));
|
||||||
|
qualitylist.push(accept_quality[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
let treeMap = {};
|
||||||
|
const jSONArray = detailData.pages;
|
||||||
|
let playList = [];
|
||||||
|
for (let j = 0; j < jSONArray.length; j++) {
|
||||||
|
const jSONObject6 = jSONArray[j];
|
||||||
|
const cid = jSONObject6.cid;
|
||||||
|
const playUrl = j + '$' + aid + '+' + cid + '+' + qualitylist.join(':') + '+' + descriptionList.join(':');
|
||||||
|
playList.push(playUrl);
|
||||||
|
}
|
||||||
|
treeMap['dash'] = playList.join('#');
|
||||||
|
treeMap['mp4'] = playList.join('#');
|
||||||
|
|
||||||
|
const relatedUrl = 'https://api.bilibili.com/x/web-interface/archive/related?bvid=' + bvid;
|
||||||
|
const relatedData = JSON.parse(await request(relatedUrl, getHeaders())).data;
|
||||||
|
playList = [];
|
||||||
|
for (let j = 0; j < relatedData.length; j++) {
|
||||||
|
const jSONObject6 = relatedData[j];
|
||||||
|
const cid = jSONObject6.cid;
|
||||||
|
const title = jSONObject6.title;
|
||||||
|
const aaid = jSONObject6.aid;
|
||||||
|
const playUrl = title + '$' + aaid + '+' + cid + '+' + qualitylist.join(':') + '+' + descriptionList.join(':');
|
||||||
|
playList.push(playUrl);
|
||||||
|
}
|
||||||
|
treeMap['相关'] = playList.join('#');
|
||||||
|
|
||||||
|
video.vod_play_from = Object.keys(treeMap).join("$$$");
|
||||||
|
video.vod_play_url = Object.values(treeMap).join("$$$");
|
||||||
|
|
||||||
|
const list = [video];
|
||||||
|
const result = { list };
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
try {
|
||||||
|
const playHeaders = { Referer: 'https://www.bilibili.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' };
|
||||||
|
const ids = id.split('+');
|
||||||
|
const aid = ids[0];
|
||||||
|
const cid = ids[1];
|
||||||
|
const qualityIds = ids[2].split(':');
|
||||||
|
const qualityName = ids[3].split(':');
|
||||||
|
if (flag == 'dash' || flag == '相关') {
|
||||||
|
// dash mpd 代理
|
||||||
|
const js2Base = await js2Proxy(true, siteType, siteKey, 'dash/', {});
|
||||||
|
let urls = [];
|
||||||
|
for (let i = 0; i < qualityIds.length; i++) {
|
||||||
|
urls.push(base64Decode(qualityName[i]), js2Base + base64Encode(aid + '+' + cid + '+' + qualityIds[i]));
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: urls,
|
||||||
|
header: playHeaders,
|
||||||
|
});
|
||||||
|
} else if (flag == 'mp4') {
|
||||||
|
// 直链
|
||||||
|
let urls = [];
|
||||||
|
for (let i = 0; i < qualityIds.length; i++) {
|
||||||
|
const url = `https://api.bilibili.com/x/player/playurl?avid=${aid}&cid=${cid}&qn=${qualityIds[i]}&fourk=1`;
|
||||||
|
const resp = JSON.parse(await request(url, getHeaders()));
|
||||||
|
const data = resp.data;
|
||||||
|
if (data.quality != qualityIds[i]) continue;
|
||||||
|
let durl = data.durl[0].url;
|
||||||
|
urls.push(base64Decode(qualityName[i]), durl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: urls,
|
||||||
|
header: playHeaders,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 音频外挂
|
||||||
|
let urls = [];
|
||||||
|
let audios = [];
|
||||||
|
for (let i = 0; i < qualityIds.length; i++) {
|
||||||
|
const url = `https://api.bilibili.com/x/player/playurl?avid=${aid}&cid=${cid}&qn=${qualityIds[i]}&fnval=4048&fourk=1`;
|
||||||
|
let resp = JSON.parse(await request(url, getHeaders()));
|
||||||
|
const dash = resp.data.dash;
|
||||||
|
const video = dash.video;
|
||||||
|
const audio = dash.audio;
|
||||||
|
for (let j = 0; j < video.length; j++) {
|
||||||
|
const dashjson = video[j];
|
||||||
|
if (dashjson.id == qualityIds[i]) {
|
||||||
|
for (const key in vod_codec) {
|
||||||
|
if (dashjson.codecid == key) {
|
||||||
|
urls.push(base64Decode(qualityName[i]) + ' ' + vod_codec[key], dashjson.baseUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (audios.length == 0) {
|
||||||
|
for (let j = 0; j < audio.length; j++) {
|
||||||
|
const dashjson = audio[j];
|
||||||
|
for (const key in vod_audio_id) {
|
||||||
|
if (dashjson.id == key) {
|
||||||
|
audios.push({
|
||||||
|
title: _.floor(parseInt(vod_audio_id[key]) / 1024) + 'Kbps',
|
||||||
|
bit: vod_audio_id[key],
|
||||||
|
url: dashjson.baseUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
audios = _.sortBy(audios, 'bit');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: urls,
|
||||||
|
extra: {
|
||||||
|
audio: audios,
|
||||||
|
},
|
||||||
|
header: playHeaders,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(key, quick, pg) {
|
||||||
|
let page = pg || 1;
|
||||||
|
if (page == 0) page = 1;
|
||||||
|
try {
|
||||||
|
const ext = {
|
||||||
|
duration: '0',
|
||||||
|
};
|
||||||
|
let resp = JSON.parse(await category(key, page, true, ext));
|
||||||
|
const catVideos = resp.list;
|
||||||
|
const pageCount = resp.pagecount;
|
||||||
|
const videos = [];
|
||||||
|
for (let i = 0; i < catVideos.length; ++i) {
|
||||||
|
videos.push(catVideos[i]);
|
||||||
|
}
|
||||||
|
const result = {
|
||||||
|
page: page,
|
||||||
|
pagecount: pageCount,
|
||||||
|
land: 1,
|
||||||
|
ratio: 1.33,
|
||||||
|
list: videos,
|
||||||
|
};
|
||||||
|
return JSON.stringify(result);
|
||||||
|
} catch (e) { }
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function proxy(segments, headers) {
|
||||||
|
let what = segments[0];
|
||||||
|
let url = base64Decode(segments[1]);
|
||||||
|
if (what == 'dash') {
|
||||||
|
const ids = url.split('+');
|
||||||
|
const aid = ids[0];
|
||||||
|
const cid = ids[1];
|
||||||
|
const str5 = ids[2];
|
||||||
|
const urls = `https://api.bilibili.com/x/player/playurl?avid=${aid}&cid=${cid}&qn=${str5}&fnval=4048&fourk=1`;
|
||||||
|
let videoList = '';
|
||||||
|
let audioList = '';
|
||||||
|
|
||||||
|
let resp = JSON.parse(await request(urls, getHeaders()));
|
||||||
|
const dash = resp.data.dash;
|
||||||
|
const video = dash.video;
|
||||||
|
const audio = dash.audio;
|
||||||
|
|
||||||
|
for (let i = 0; i < video.length; i++) {
|
||||||
|
// if (i > 0) continue; // 只取一个
|
||||||
|
const dashjson = video[i];
|
||||||
|
if (dashjson.id == str5) {
|
||||||
|
videoList += getDashMedia(dashjson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < audio.length; i++) {
|
||||||
|
// if (i > 0) continue;
|
||||||
|
const ajson = audio[i];
|
||||||
|
for (const key in vod_audio_id) {
|
||||||
|
if (ajson.id == key) {
|
||||||
|
audioList += getDashMedia(ajson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let mpd = getDash(resp, videoList, audioList);
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
code: 200,
|
||||||
|
content: mpd,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/dash+xml',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
code: 500,
|
||||||
|
content: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDashMedia(dash) {
|
||||||
|
try {
|
||||||
|
let qnid = dash.id;
|
||||||
|
const codecid = dash.codecid;
|
||||||
|
const media_codecs = dash.codecs;
|
||||||
|
const media_bandwidth = dash.bandwidth;
|
||||||
|
const media_startWithSAP = dash.startWithSap;
|
||||||
|
const media_mimeType = dash.mimeType;
|
||||||
|
const media_BaseURL = dash.baseUrl.replace(/&/g, '&');
|
||||||
|
const media_SegmentBase_indexRange = dash.SegmentBase.indexRange;
|
||||||
|
const media_SegmentBase_Initialization = dash.SegmentBase.Initialization;
|
||||||
|
const mediaType = media_mimeType.split('/')[0];
|
||||||
|
let media_type_params = '';
|
||||||
|
|
||||||
|
if (mediaType == 'video') {
|
||||||
|
const media_frameRate = dash.frameRate;
|
||||||
|
const media_sar = dash.sar;
|
||||||
|
const media_width = dash.width;
|
||||||
|
const media_height = dash.height;
|
||||||
|
media_type_params = `height='${media_height}' width='${media_width}' frameRate='${media_frameRate}' sar='${media_sar}'`;
|
||||||
|
} else if (mediaType == 'audio') {
|
||||||
|
for (const key in vod_audio_id) {
|
||||||
|
if (qnid == key) {
|
||||||
|
const audioSamplingRate = vod_audio_id[key];
|
||||||
|
media_type_params = `numChannels='2' sampleRate='${audioSamplingRate}'`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qnid += '_' + codecid;
|
||||||
|
|
||||||
|
return `<AdaptationSet lang="chi">
|
||||||
|
<ContentComponent contentType="${mediaType}"/>
|
||||||
|
<Representation id="${qnid}" bandwidth="${media_bandwidth}" codecs="${media_codecs}" mimeType="${media_mimeType}" ${media_type_params} startWithSAP="${media_startWithSAP}">
|
||||||
|
<BaseURL>${media_BaseURL}</BaseURL>
|
||||||
|
<SegmentBase indexRange="${media_SegmentBase_indexRange}">
|
||||||
|
<Initialization range="${media_SegmentBase_Initialization}"/>
|
||||||
|
</SegmentBase>
|
||||||
|
</Representation>
|
||||||
|
</AdaptationSet>`;
|
||||||
|
} catch (e) {
|
||||||
|
// Handle exceptions here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDash(ja, videoList, audioList) {
|
||||||
|
const duration = ja.data.dash.duration;
|
||||||
|
const minBufferTime = ja.data.dash.minBufferTime;
|
||||||
|
return `<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" type="static" mediaPresentationDuration="PT${duration}S" minBufferTime="PT${minBufferTime}S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
|
||||||
|
<Period duration="PT${duration}S" start="PT0S">
|
||||||
|
${videoList}
|
||||||
|
${audioList}
|
||||||
|
</Period>
|
||||||
|
</MPD>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function base64Encode(text) {
|
||||||
|
return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function removeTags(input) {
|
||||||
|
return input.replace(/<[^>]*>/g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFullTime(numberSec) {
|
||||||
|
let totalSeconds = '';
|
||||||
|
try {
|
||||||
|
var timeParts = numberSec.split(":");
|
||||||
|
var min = parseInt(timeParts[0]);
|
||||||
|
var sec = parseInt(timeParts[1]);
|
||||||
|
totalSeconds = min * 60 + sec;
|
||||||
|
} catch (e) {
|
||||||
|
totalSeconds = parseInt(numberSec);
|
||||||
|
}
|
||||||
|
if (isNaN(totalSeconds)) {
|
||||||
|
return '无效输入';
|
||||||
|
}
|
||||||
|
if (totalSeconds >= 3600) {
|
||||||
|
const hours = Math.floor(totalSeconds / 3600);
|
||||||
|
const remainingSecondsAfterHours = totalSeconds % 3600;
|
||||||
|
const minutes = Math.floor(remainingSecondsAfterHours / 60);
|
||||||
|
const seconds = remainingSecondsAfterHours % 60;
|
||||||
|
return `${hours}小时 ${minutes}分钟 ${seconds}秒`;
|
||||||
|
} else {
|
||||||
|
const minutes = Math.floor(totalSeconds / 60);
|
||||||
|
const seconds = totalSeconds % 60;
|
||||||
|
return `${minutes}分钟 ${seconds}秒`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
proxy: proxy,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
1
JN/EXT/OPENJS/open/bilibili_open.js
Normal file
1
JN/EXT/OPENJS/open/bilibili_open.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{Crypto,load,_}from"assets://js/lib/cat.js";let key="bilibili",url="",siteKey="",siteType=0;const 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",cookie={};async function request(reqUrl,referer,mth,data,hd){var headers={"User-Agent":UA,Cookie:_.map(cookie,(value,key)=>key+"="+value).join(";")},referer=(referer&&(headers.referer=encodeURIComponent(referer)),await req(reqUrl,{method:mth||"get",headers:headers,data:data,postType:"post"===mth?"form":""}));return referer.content}async function init(cfg){siteKey=cfg.skey,siteType=cfg.stype,url=cfg.ext}async function home(filter){return(await request(url)).replaceAll("1$/$1","1$/$0")}async function homeVod(){return"{}"}async function category(tid,pg,filter,extend){pg<=0&&(pg=1);let api=url+"?t="+tid+"&pg="+pg;return extend&&(tid=Object.entries(extend).map(([key,val]=entry)=>"&"+key+"="+val),api=(api+=tid)+("&f="+encodeURIComponent(JSON.stringify(extend)))),request(api)}async function detail(id){return request(url+"?ids="+id)}async function play(flag,id,flags){return request(url.replace("/bilibili","/play")+"?bvid="+id+"&from=open")}async function search(wd,quick){return request(url+"?wd="+wd)}function __jsEvalReturn(){return{init:init,home:home,homeVod:homeVod,category:category,detail:detail,play:play,search:search}}export{__jsEvalReturn};
|
1
JN/EXT/OPENJS/open/bililive_open.js
Normal file
1
JN/EXT/OPENJS/open/bililive_open.js
Normal file
File diff suppressed because one or more lines are too long
136
JN/EXT/OPENJS/open/bookan_book_open.js
Normal file
136
JN/EXT/OPENJS/open/bookan_book_open.js
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
import { _ } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'bookan';
|
||||||
|
let url = 'https://api.bookan.com.cn';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
return JSON.stringify({
|
||||||
|
class: [
|
||||||
|
{ type_id: '1305', type_name: '少年读物' },
|
||||||
|
{ type_id: '1304', type_name: '儿童文学' },
|
||||||
|
{ type_id: '1320', type_name: '国学经典' },
|
||||||
|
{ type_id: '1306', type_name: '文艺少年' },
|
||||||
|
{ type_id: '1309', type_name: '育儿心经' },
|
||||||
|
{ type_id: '1310', type_name: '心理哲学' },
|
||||||
|
{ type_id: '1307', type_name: '青春励志' },
|
||||||
|
{ type_id: '1312', type_name: '历史小说' },
|
||||||
|
{ type_id: '1303', type_name: '故事会' },
|
||||||
|
{ type_id: '1317', type_name: '音乐戏剧' },
|
||||||
|
{ type_id: '1319', type_name: '相声评书' },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
pg = pg || 1;
|
||||||
|
if (pg == 0) pg = 1;
|
||||||
|
let content = await request(`${url}/voice/book/list?instance_id=25304&page=${pg}&category_id=${tid}&num=24`);
|
||||||
|
let data = JSON.parse(content).data;
|
||||||
|
let books = [];
|
||||||
|
for (const book of data.list) {
|
||||||
|
books.push({
|
||||||
|
book_id: book.id,
|
||||||
|
book_name: book.name,
|
||||||
|
book_pic: book.cover,
|
||||||
|
book_remarks: book.extra.author,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
page: data.current_page,
|
||||||
|
pagecount: data.last_page,
|
||||||
|
limit: 24,
|
||||||
|
total: data.total,
|
||||||
|
list: books,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
let content = await request(`${url}/voice/album/units?album_id=${id}&page=1&num=200&order=1`);
|
||||||
|
let data = JSON.parse(content).data;
|
||||||
|
|
||||||
|
let book = {
|
||||||
|
book_id: id,
|
||||||
|
type_name: '',
|
||||||
|
book_year: '',
|
||||||
|
book_area: '',
|
||||||
|
book_remarks: '',
|
||||||
|
book_actor: '',
|
||||||
|
book_director: '',
|
||||||
|
book_content: '',
|
||||||
|
};
|
||||||
|
let us = _.map(data.list, function (b) {
|
||||||
|
return formatPlayUrl(b.title) + '$' + b.file;
|
||||||
|
}).join('#');
|
||||||
|
book.volumes = '书卷';
|
||||||
|
book.urls = us;
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [book],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatPlayUrl(name) {
|
||||||
|
return name
|
||||||
|
.trim()
|
||||||
|
.replace(/<|>|《|》/g, '')
|
||||||
|
.replace(/\$|#/g, ' ')
|
||||||
|
.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function proxy(segments, headers) {}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
pg = pg || 1;
|
||||||
|
if (pg == 0) pg = 1;
|
||||||
|
let content = await request(`https://es.bookan.com.cn/api/v3/voice/book?instanceId=25304&keyword=${wd}&pageNum=${pg}&limitNum=20`);
|
||||||
|
let data = JSON.parse(content).data;
|
||||||
|
let books = [];
|
||||||
|
for (const book of data.list) {
|
||||||
|
books.push({
|
||||||
|
book_id: book.id,
|
||||||
|
book_name: book.name,
|
||||||
|
book_pic: book.cover,
|
||||||
|
book_remarks: book.extra.author,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
page: data.current_page,
|
||||||
|
pagecount: data.last_page,
|
||||||
|
limit: 20,
|
||||||
|
total: data.total,
|
||||||
|
list: books,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import { _ } from './lib/cat.js';
|
import { _ } from 'assets://js/lib/cat.js';
|
||||||
|
|
||||||
let key = 'bookkan';
|
let key = 'bookkan';
|
||||||
let url = 'https://api.bookan.com.cn';
|
let url = 'https://api.bookan.com.cn';
|
||||||
@ -65,7 +65,7 @@ async function detail(id) {
|
|||||||
|
|
||||||
let book = {
|
let book = {
|
||||||
book_id: id,
|
book_id: id,
|
||||||
type_name: '',
|
book_type: '',
|
||||||
book_year: '',
|
book_year: '',
|
||||||
book_area: '',
|
book_area: '',
|
||||||
book_remarks: '',
|
book_remarks: '',
|
||||||
|
@ -1,61 +1,61 @@
|
|||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import uglifyjs from 'uglify-js';
|
import uglifyjs from 'uglify-js';
|
||||||
|
|
||||||
const copySpider = ['app', 'kunyu77_open', 'alist_open'];
|
const copySpider = ['app', 'kunyu77_open', 'alist_open'];
|
||||||
|
|
||||||
const root = process.cwd();
|
const root = process.cwd();
|
||||||
|
|
||||||
const src = path.join(root);
|
const src = path.join(root);
|
||||||
const out = path.join(root, 'dist');
|
const out = path.join(root, 'dist');
|
||||||
|
|
||||||
function minify(s, d) {
|
function minify(s, d) {
|
||||||
var jsContent = fs.readFileSync(s).toString();
|
var jsContent = fs.readFileSync(s).toString();
|
||||||
jsContent = jsContent.replace('./lib/cat.js', 'assets://js/lib/cat.js');
|
jsContent = jsContent.replace('./lib/cat.js', 'assets://js/lib/cat.js');
|
||||||
jsContent = jsContent.replace('./cat.js', 'assets://js/lib/cat.js');
|
jsContent = jsContent.replace('./cat.js', 'assets://js/lib/cat.js');
|
||||||
jsContent = uglifyjs.minify(jsContent, {
|
jsContent = uglifyjs.minify(jsContent, {
|
||||||
mangle: false,
|
mangle: false,
|
||||||
});
|
});
|
||||||
fs.writeFileSync(d, jsContent.code);
|
fs.writeFileSync(d, jsContent.code);
|
||||||
}
|
}
|
||||||
|
|
||||||
function listAllFiles(dirPath, arrayOfFiles) {
|
function listAllFiles(dirPath, arrayOfFiles) {
|
||||||
var files = fs.readdirSync(dirPath);
|
var files = fs.readdirSync(dirPath);
|
||||||
|
|
||||||
arrayOfFiles = arrayOfFiles || [];
|
arrayOfFiles = arrayOfFiles || [];
|
||||||
|
|
||||||
files.forEach(function (file) {
|
files.forEach(function (file) {
|
||||||
if (fs.statSync(dirPath + '/' + file).isDirectory()) {
|
if (fs.statSync(dirPath + '/' + file).isDirectory()) {
|
||||||
arrayOfFiles = listAllFiles(dirPath + '/' + file, arrayOfFiles);
|
arrayOfFiles = listAllFiles(dirPath + '/' + file, arrayOfFiles);
|
||||||
} else {
|
} else {
|
||||||
arrayOfFiles.push(path.join(dirPath, '/', file));
|
arrayOfFiles.push(path.join(dirPath, '/', file));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return arrayOfFiles;
|
return arrayOfFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
function src2Out() {
|
function src2Out() {
|
||||||
if (fs.existsSync(out)) fs.rmSync(out, { recursive: true, force: true });
|
if (fs.existsSync(out)) fs.rmSync(out, { recursive: true, force: true });
|
||||||
|
|
||||||
fs.mkdirSync(out, { recursive: true });
|
fs.mkdirSync(out, { recursive: true });
|
||||||
const libSrc = path.join(src, 'lib');
|
const libSrc = path.join(src, 'lib');
|
||||||
const libOut = path.join(out, 'lib');
|
const libOut = path.join(out, 'lib');
|
||||||
fs.mkdirSync(libOut, { recursive: true });
|
fs.mkdirSync(libOut, { recursive: true });
|
||||||
const libs = listAllFiles(libSrc);
|
const libs = listAllFiles(libSrc);
|
||||||
for (let index = 0; index < libs.length; index++) {
|
for (let index = 0; index < libs.length; index++) {
|
||||||
const element = libs[index];
|
const element = libs[index];
|
||||||
const relative = path.relative(libSrc, element);
|
const relative = path.relative(libSrc, element);
|
||||||
minify(element, path.join(libOut, relative));
|
minify(element, path.join(libOut, relative));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const sp of copySpider) {
|
for (const sp of copySpider) {
|
||||||
minify(path.join(src, sp + '.js'), path.join(out, sp + '.js'));
|
minify(path.join(src, sp + '.js'), path.join(out, sp + '.js'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
src2Out();
|
src2Out();
|
||||||
|
|
||||||
fs.copyFileSync(path.join(src, 'config_open.json'), path.join(out, 'config_open.json'));
|
fs.copyFileSync(path.join(src, 'config_open.json'), path.join(out, 'config_open.json'));
|
||||||
|
|
||||||
console.log('done');
|
console.log('done');
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
//bbQ0FUT1BNEGNhaWppLmpzLGFzc2V0czovL2pzL2xpYi9jYXQuanMcX19qc0V2YWxSZXR1cm4CXw5zaXRlS2V5EHNpdGVUeXBlBFVBDmJhc2VVcmwUY2F0ZWdvcmllcwhpbml0EmdldEhlYWRlchJnZXRTdHJpbmcIaG9tZQ5ob21lVm9kEGNhdGVnb3J5DGRldGFpbAhwbGF5DHNlYXJjaN4BTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwOS4wLjAuMCBTYWZhcmkvNTM3LjM2BmNmZwhza2V5CnN0eXBlBmV4dAZ1cmwMaGVhZGVyFFVzZXItQWdlbnQGcmVzBnJlcQ5oZWFkZXJzDmNvbnRlbnQMZmlsdGVyDHJlcVVybA5qc29uU3RyCGRhdGEWY2xhc3Nlc3NBcnIOY2xhc3NlcxJmaWx0ZXJPYmoGb25lCnBhcnNlDmlzRW1wdHkQaW5jbHVkZXMSdHlwZV9uYW1lCHB1c2gOdHlwZV9pZBJzdHJpbmdpZnkOZmlsdGVycwR7fQZ0aWQEcGcMZXh0ZW5kDHZpZGVvcyA/YWM9dmlkZW9saXN0JnQ9CCZwZz0IbGlzdAx2b2RfaWQQdm9kX25hbWUOdm9kX3BpYxZ2b2RfcmVtYXJrcxBwYXJzZUludAhwYWdlEnBhZ2Vjb3VudApsaW1pdAp0b3RhbARpZAZ2b2QkP2FjPXZpZGVvbGlzdCZpZHM9EHZvZF95ZWFyEHZvZF9hcmVhEnZvZF9hY3Rvchh2b2RfZGlyZWN0b3IWdm9kX2NvbnRlbnQadm9kX3BsYXlfZnJvbRh2b2RfcGxheV91cmwIZmxhZwR3ZApxdWljaxw/YWM9ZGV0YWlsJndkPQ+kAwGmAwEAD6gDAAEAqgMADgAGAaABAAAAARAKSwCqAwAMrAMACa4DAQmwAwIJsgMDCbQDBAm2AwUBuAMGAboDBwG8AwgBvgMJAcADCgHCAwsBxAMMAcYDDQGoAw4BCOg0vgBfBgC+AV8HAL4CXwgAvgNfCQC+BF8KAL4FXwsAvgZfDAC+B18NAL4IXw4AvglfDwApv+Cz4QTkAAAA4r9fBAAmAABfBQAppAMBDAEA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
|
//bbQ0FUT1BTEGNhaWppLmpzLGFzc2V0czovL2pzL2xpYi9jYXQuanMcX19qc0V2YWxSZXR1cm4CXw5zaXRlS2V5EHNpdGVUeXBlBFVBDmJhc2VVcmwUY2F0ZWdvcmllcwhpbml0EmdldEhlYWRlchJnZXRTdHJpbmcIaG9tZQ5ob21lVm9kEGNhdGVnb3J5DGRldGFpbAhwbGF5DHNlYXJjaN4BTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwOS4wLjAuMCBTYWZhcmkvNTM3LjM2BmNmZwhza2V5CnN0eXBlBmV4dAZ1cmwMaGVhZGVyFFVzZXItQWdlbnQGcmVzBnJlcQ5oZWFkZXJzDmNvbnRlbnQMZmlsdGVyDHJlcVVybA5qc29uU3RyCGRhdGEWY2xhc3Nlc3NBcnIOY2xhc3NlcxJmaWx0ZXJPYmoaY2F0ZWdvcmllc09iagZvbmUIY2F0ZQJlCnBhcnNlDmlzRW1wdHkQaW5jbHVkZXMSdHlwZV9uYW1lDnR5cGVfaWQQdHlwZV9waWQIcHVzaBJzdHJpbmdpZnkOZmlsdGVycw5jb25zb2xlCmRlYnVnBHt9BnRpZARwZwxleHRlbmQMdmlkZW9zID9hYz12aWRlb2xpc3QmdD0IJnBnPQhsaXN0DHZvZF9pZBB2b2RfbmFtZQ52b2RfcGljFnZvZF9yZW1hcmtzEHBhcnNlSW50CHBhZ2UScGFnZWNvdW50CmxpbWl0CnRvdGFsBGlkBnZvZCQ/YWM9dmlkZW9saXN0Jmlkcz0Qdm9kX3llYXIQdm9kX2FyZWESdm9kX2FjdG9yGHZvZF9kaXJlY3RvchZ2b2RfY29udGVudBp2b2RfcGxheV9mcm9tGHZvZF9wbGF5X3VybAhmbGFnBHdkCnF1aWNrHD9hYz1kZXRhaWwmd2Q9D6QDAaYDAQAPqAMAAQCqAwAOAAYBoAEAAAABEApLAKoDAAysAwAJrgMBCbADAgmyAwMJtAMECbYDBQG4AwYBugMHAbwDCAG+AwkBwAMKAcIDCwHEAwwBxgMNAagDDgEI6DS+AF8GAL4BXwcAvgJfCAC+A18JAL4EXwoAvgVfCwC+Bl8M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
|
1
JN/EXT/OPENJS/open/caiji2.js
Normal file
1
JN/EXT/OPENJS/open/caiji2.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
//bbQ0FUT1BNEGNhaWppLmpzLGFzc2V0czovL2pzL2xpYi9jYXQuanMcX19qc0V2YWxSZXR1cm4CXw5zaXRlS2V5EHNpdGVUeXBlBFVBDmJhc2VVcmwUY2F0ZWdvcmllcwhpbml0EmdldEhlYWRlchJnZXRTdHJpbmcIaG9tZQ5ob21lVm9kEGNhdGVnb3J5DGRldGFpbAhwbGF5DHNlYXJjaN4BTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwOS4wLjAuMCBTYWZhcmkvNTM3LjM2BmNmZwhza2V5CnN0eXBlBmV4dAZ1cmwMaGVhZGVyFFVzZXItQWdlbnQGcmVzBnJlcQ5oZWFkZXJzDmNvbnRlbnQMZmlsdGVyDHJlcVVybA5qc29uU3RyCGRhdGEWY2xhc3Nlc3NBcnIOY2xhc3NlcxJmaWx0ZXJPYmoGb25lCnBhcnNlDmlzRW1wdHkQaW5jbHVkZXMSdHlwZV9uYW1lCHB1c2gOdHlwZV9pZBJzdHJpbmdpZnkOZmlsdGVycwR7fQZ0aWQEcGcMZXh0ZW5kDHZpZGVvcyA/YWM9dmlkZW9saXN0JnQ9CCZwZz0IbGlzdAx2b2RfaWQQdm9kX25hbWUOdm9kX3BpYxZ2b2RfcmVtYXJrcxBwYXJzZUludAhwYWdlEnBhZ2Vjb3VudApsaW1pdAp0b3RhbARpZAZ2b2QkP2FjPXZpZGVvbGlzdCZpZHM9EHZvZF95ZWFyEHZvZF9hcmVhEnZvZF9hY3Rvchh2b2RfZGlyZWN0b3IWdm9kX2NvbnRlbnQadm9kX3BsYXlfZnJvbRh2b2RfcGxheV91cmwIZmxhZwR3ZApxdWljaxw/YWM9ZGV0YWlsJndkPQ+kAwGmAwEAD6gDAAEAqgMADgAGAaABAAAAARAKSwCqAwAMrAMACa4DAQmwAwIJsgMDCbQDBAm2AwUBuAMGAboDBwG8AwgBvgMJAcADCgHCAwsBxAMMAcYDDQGoAw4BCOg0vgBfBgC+AV8HAL4CXwgAvgNfCQC+BF8KAL4FXwsAvgZfDAC+B18NAL4IXw4AvglfDwApv+Cz4QTkAAAA4r9fBAAmAABfBQAppAMBDAEA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
|
1
JN/EXT/OPENJS/open/caiji_open.js
Normal file
1
JN/EXT/OPENJS/open/caiji_open.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
//bbQ0FUT1BMEGNhaWppLmpzGC4vbGliL2NhdC5qcxxfX2pzRXZhbFJldHVybgJfDnNpdGVLZXkQc2l0ZVR5cGUEVUEOYmFzZVVybAhpbml0EmdldEhlYWRlchJnZXRTdHJpbmcIaG9tZQ5ob21lVm9kEGNhdGVnb3J5DGRldGFpbAhwbGF5DHNlYXJjaN4BTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwOS4wLjAuMCBTYWZhcmkvNTM3LjM2BmNmZwhza2V5CnN0eXBlBmV4dAxoZWFkZXIUVXNlci1BZ2VudAZ1cmwGcmVzBnJlcQ5oZWFkZXJzDmNvbnRlbnQMZmlsdGVyDHJlcVVybA5qc29uU3RyCGRhdGEWY2xhc3Nlc3NBcnIOY2xhc3NlcxJmaWx0ZXJPYmoGb25lCnBhcnNlEHR5cGVfcGlkCHB1c2gOdHlwZV9pZBJ0eXBlX25hbWUSc3RyaW5naWZ5DmZpbHRlcnMEe30GdGlkBHBnDGV4dGVuZAx2aWRlb3MgP2FjPXZpZGVvbGlzdCZ0PQgmcGc9CGxpc3QMdm9kX2lkEHZvZF9uYW1lDnZvZF9waWMWdm9kX3JlbWFya3MQcGFyc2VJbnQIcGFnZRJwYWdlY291bnQKbGltaXQKdG90YWwEaWQGdm9kJD9hYz12aWRlb2xpc3QmaWRzPQ5pc0VtcHR5EHZvZF95ZWFyEHZvZF9hcmVhEnZvZF9hY3Rvchh2b2RfZGlyZWN0b3IWdm9kX2NvbnRlbnQadm9kX3BsYXlfZnJvbRh2b2RfcGxheV91cmwIZmxhZwR3ZApxdWljaxw/YWM9ZGV0YWlsJndkPQ+kAwGmAwEADqgDAAEAqgMADgAGAaABAAAAAQ8KRQCqAwAMrAMACa4DAQmwAwIJsgMDCbQDBAG2AwUBuAMGAboDBwG8AwgBvgMJAcADCgHCAwsBxAMMAagDDQEI6DS+AF8FAL4BXwYAvgJfBwC+A18IAL4EXwkAvgVfCgC+Bl8LAL4HXwwAvghfDQC+CV8OACm/4LPhBOMAAADiv18EACmkAwELAQA2Bg0NIQAElgIOYgYBtAMBAAECAwAjAcgDAAEArAMB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
|
File diff suppressed because it is too large
Load Diff
@ -1,241 +1,271 @@
|
|||||||
import { Crypto, load, _ } from './lib/cat.js';
|
// 自动从 地址发布页 获取&跳转url地址
|
||||||
|
import { Crypto, load, _ } from 'assets://js/lib/cat.js';
|
||||||
let key = 'czzy';
|
|
||||||
let url = 'https://cz01.cc';
|
let key = 'czzy';
|
||||||
let siteKey = '';
|
let host = 'https://cz01.vip/'; // 厂长地址发布页
|
||||||
let siteType = 0;
|
let url = '';
|
||||||
|
let siteKey = '';
|
||||||
const 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';
|
let siteType = 0;
|
||||||
|
const 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 cookie = {};
|
const cookie = {};
|
||||||
|
|
||||||
async function request(reqUrl, referer, mth, data, hd) {
|
async function request(reqUrl, referer, mth, data, hd) {
|
||||||
const headers = {
|
const headers = {
|
||||||
'User-Agent': UA,
|
'User-Agent': UA,
|
||||||
Cookie: _.map(cookie, (value, key) => {
|
Cookie: _.map(cookie, (value, key) => {
|
||||||
return `${key}=${value}`;
|
return `${key}=${value}`;
|
||||||
}).join(';'),
|
}).join(';'),
|
||||||
};
|
};
|
||||||
if (referer) headers.referer = encodeURIComponent(referer);
|
if (referer) headers.referer = encodeURIComponent(referer);
|
||||||
let res = await req(reqUrl, {
|
let res = await req(reqUrl, {
|
||||||
method: mth || 'get',
|
method: mth || 'get',
|
||||||
headers: headers,
|
headers: headers,
|
||||||
data: data,
|
data: data,
|
||||||
postType: mth === 'post' ? 'form' : '',
|
postType: mth === 'post' ? 'form' : '',
|
||||||
});
|
});
|
||||||
if (res.headers['set-cookie']) {
|
if (res.headers['set-cookie']) {
|
||||||
const set_cookie = _.isArray(res.headers['set-cookie']) ? res.headers['set-cookie'].join(';') : res.headers['set-cookie'];
|
const set_cookie = _.isArray(res.headers['set-cookie']) ? res.headers['set-cookie'].join(';') : res.headers['set-cookie'];
|
||||||
const cks = set_cookie.split(';');
|
const cks = set_cookie.split(';');
|
||||||
for (const c of cks) {
|
for (const c of cks) {
|
||||||
const tmp = c.trim();
|
const tmp = c.trim();
|
||||||
if (tmp.startsWith('result=')) {
|
if (tmp.startsWith('result=')) {
|
||||||
cookie.result = tmp.substring(7);
|
cookie.result = tmp.substring(7);
|
||||||
return await request(reqUrl, reqUrl, 'post', {
|
return await request(reqUrl, reqUrl, 'post', {
|
||||||
result: cookie.result,
|
result: cookie.result,
|
||||||
});
|
});
|
||||||
} else if (tmp.startsWith('esc_search_captcha=1')) {
|
} else if (tmp.startsWith('esc_search_captcha=1')) {
|
||||||
cookie.esc_search_captcha = 1;
|
cookie.esc_search_captcha = 1;
|
||||||
delete cookie.result;
|
delete cookie.result;
|
||||||
return await request(reqUrl);
|
return await request(reqUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(res.headers['set-cookie']);
|
// console.log(res.headers['set-cookie']);
|
||||||
}
|
}
|
||||||
return res.content;
|
return res.content;
|
||||||
}
|
}
|
||||||
|
|
||||||
// cfg = {skey: siteKey, ext: extend}
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
async function init(cfg) {
|
async function init(cfg) {
|
||||||
siteKey = cfg.skey;
|
siteKey = cfg.skey;
|
||||||
siteType = cfg.stype;
|
siteType = cfg.stype;
|
||||||
}
|
url = await checkValidUrl(cfg.ext);
|
||||||
|
console.debug('厂长跳转地址 =====>' + url); // js_debug.log
|
||||||
async function home(filter) {
|
}
|
||||||
let filterObj = {};
|
|
||||||
const html = await request(url + '/movie_bt');
|
async function checkValidUrl(ext) {
|
||||||
const $ = load(html);
|
let validUrl = ext;
|
||||||
const series = $('div#beautiful-taxonomy-filters-tax-movie_bt_series > a[cat-url*=movie_bt_series]');
|
if (_.isEmpty(ext)) {
|
||||||
const tags = $('div#beautiful-taxonomy-filters-tax-movie_bt_tags > a');
|
let html = await request(host);
|
||||||
let tag = {
|
let matches = html.matchAll(/推荐访问<a href="(.*)"/g);
|
||||||
key: 'tag',
|
for (let match of matches) {
|
||||||
name: '类型',
|
try {
|
||||||
value: _.map(tags, (n) => {
|
let rcmdUrl = match[1];
|
||||||
let v = n.attribs['cat-url'] || '';
|
let res = await req(rcmdUrl, {
|
||||||
v = v.substring(v.lastIndexOf('/') + 1);
|
method: 'get',
|
||||||
return { n: n.children[0].data, v: v };
|
headers: {
|
||||||
}),
|
'User-Agent': UA,
|
||||||
};
|
},
|
||||||
tag['init'] = tag.value[0].v;
|
redirect: 0,
|
||||||
let classes = _.map(series, (s) => {
|
});
|
||||||
let typeId = s.attribs['cat-url'];
|
let location = res.headers['location'];
|
||||||
typeId = typeId.substring(typeId.lastIndexOf('/') + 1);
|
if (!_.isEmpty(location)) {
|
||||||
filterObj[typeId] = [tag];
|
validUrl = location;
|
||||||
return {
|
} else {
|
||||||
type_id: typeId,
|
validUrl = rcmdUrl;
|
||||||
type_name: s.children[0].data,
|
break;
|
||||||
};
|
}
|
||||||
});
|
} catch(e) {
|
||||||
const sortName = ['电影', '电视剧', '国产剧', '美剧', '韩剧', '日剧', '海外剧(其他)', '华语电影', '印度电影', '日本电影', '欧美电影', '韩国电影', '动画', '俄罗斯电影', '加拿大电影'];
|
}
|
||||||
classes = _.sortBy(classes, (c) => {
|
}
|
||||||
const index = sortName.indexOf(c.type_name);
|
}
|
||||||
return index === -1 ? sortName.length : index;
|
return validUrl;
|
||||||
});
|
}
|
||||||
return JSON.stringify({
|
|
||||||
class: classes,
|
async function home(filter) {
|
||||||
filters: filterObj,
|
let filterObj = {};
|
||||||
});
|
const html = await request(url + '/movie_bt');
|
||||||
}
|
const $ = load(html);
|
||||||
|
const tags = $('div#beautiful-taxonomy-filters-tax-movie_bt_tags > a');
|
||||||
async function homeVod() {
|
let tag = {
|
||||||
return '{}';
|
key: 'tag',
|
||||||
}
|
name: '类型',
|
||||||
|
value: _.map(tags, (n) => {
|
||||||
async function category(tid, pg, filter, extend) {
|
let v = n.attribs['cat-url'] || '';
|
||||||
if (pg <= 0) pg = 1;
|
v = v.substring(v.lastIndexOf('/') + 1);
|
||||||
const tag = extend.tag || '';
|
return { n: n.children[0].data, v: v };
|
||||||
const link = url + '/movie_bt' + (tag.length > 0 ? `/movie_bt_tags/${tag}` : '') + '/movie_bt_series/' + tid + (pg > 1 ? `/page/${pg}` : '');
|
}),
|
||||||
const html = await request(link);
|
};
|
||||||
const $ = load(html);
|
tag['init'] = tag.value[0].v;
|
||||||
const items = $('div.mrb > ul > li');
|
const series = $('div#beautiful-taxonomy-filters-tax-movie_bt_series > a[cat-url*=movie_bt_series]');
|
||||||
let videos = _.map(items, (item) => {
|
let classes = _.map(series, (s) => {
|
||||||
const img = $(item).find('img:first')[0];
|
let typeId = s.attribs['cat-url'];
|
||||||
const a = $(item).find('a:first')[0];
|
typeId = typeId.substring(typeId.lastIndexOf('/') + 1);
|
||||||
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
|
filterObj[typeId] = [tag];
|
||||||
const jidi = $($(item).find('div.jidi')[0]).text().trim();
|
return {
|
||||||
return {
|
type_id: typeId,
|
||||||
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
|
type_name: s.children[0].data,
|
||||||
vod_name: img.attribs.alt,
|
};
|
||||||
vod_pic: img.attribs['data-original'],
|
});
|
||||||
vod_remarks: jidi || hdinfo || '',
|
const sortName = ['电影', '电视剧', '国产剧', '美剧', '韩剧', '日剧', '海外剧(其他)', '华语电影', '印度电影', '日本电影', '欧美电影', '韩国电影', '动画', '俄罗斯电影', '加拿大电影'];
|
||||||
};
|
classes = _.sortBy(classes, (c) => {
|
||||||
});
|
const index = sortName.indexOf(c.type_name);
|
||||||
const hasMore = $('div.mrb > div.pagenavi_txt > a:contains(>)').length > 0;
|
return index === -1 ? sortName.length : index;
|
||||||
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
});
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
page: parseInt(pg),
|
class: classes,
|
||||||
pagecount: pgCount,
|
filters: filterObj,
|
||||||
limit: 20,
|
});
|
||||||
total: 20 * pgCount,
|
}
|
||||||
list: videos,
|
|
||||||
});
|
async function homeVod() {
|
||||||
}
|
return '{}';
|
||||||
|
}
|
||||||
function stripHtmlTag(src) {
|
|
||||||
return src
|
async function category(tid, pg, filter, extend) {
|
||||||
.replace(/<\/?[^>]+(>|$)/g, '')
|
if (pg <= 0) pg = 1;
|
||||||
.replace(/&.{1,5};/g, '')
|
const tag = extend.tag || '';
|
||||||
.replace(/\s{2,}/g, ' ');
|
const link = url + '/movie_bt' + (tag.length > 0 ? `/movie_bt_tags/${tag}` : '') + '/movie_bt_series/' + tid + (pg > 1 ? `/page/${pg}` : '');
|
||||||
}
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
async function detail(id) {
|
const items = $('div.mrb > ul > li');
|
||||||
const html = await request(url + '/movie/' + id + '.html');
|
let videos = _.map(items, (item) => {
|
||||||
const $ = load(html);
|
const img = $(item).find('img:first')[0];
|
||||||
const detail = $('ul.moviedteail_list > li');
|
const a = $(item).find('a:first')[0];
|
||||||
let vod = {
|
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
|
||||||
vod_id: id,
|
const jidi = $($(item).find('div.jidi')[0]).text().trim();
|
||||||
vod_name: $('div.moviedteail_tt > h1').text().trim(),
|
return {
|
||||||
vod_pic: $('div.dyimg img:first').attr('src'),
|
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
|
||||||
vod_remarks: '',
|
vod_name: img.attribs.alt,
|
||||||
vod_content: stripHtmlTag($('div.yp_context').html()).trim(),
|
vod_pic: img.attribs['data-original'],
|
||||||
};
|
vod_remarks: jidi || hdinfo || '',
|
||||||
for (const info of detail) {
|
};
|
||||||
const i = $(info).text().trim();
|
});
|
||||||
if (i.startsWith('地区:')) {
|
const hasMore = $('div.mrb > div.pagenavi_txt > a:contains(>)').length > 0;
|
||||||
vod.vod_area = i.substring(3);
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
} else if (i.startsWith('年份:')) {
|
return JSON.stringify({
|
||||||
vod.vod_year = i.substring(3);
|
page: parseInt(pg),
|
||||||
} else if (i.startsWith('导演:')) {
|
pagecount: pgCount,
|
||||||
vod.vod_director = _.map($(info).find('a'), (a) => {
|
limit: 20,
|
||||||
return a.children[0].data;
|
total: 20 * pgCount,
|
||||||
}).join('/');
|
list: videos,
|
||||||
} else if (i.startsWith('主演:')) {
|
});
|
||||||
vod.vod_actor = _.map($(info).find('a'), (a) => {
|
}
|
||||||
return a.children[0].data;
|
|
||||||
}).join('/');
|
function stripHtmlTag(src) {
|
||||||
} else if (i.startsWith('语言:')) {
|
return src
|
||||||
vod.vod_lang = i.substring(3);
|
.replace(/<\/?[^>]+(>|$)/g, '')
|
||||||
}
|
.replace(/&.{1,5};/g, '')
|
||||||
}
|
.replace(/\s{2,}/g, ' ');
|
||||||
const playlist = _.map($('div.paly_list_btn > a'), (a) => {
|
}
|
||||||
return a.children[0].data + '$' + a.attribs.href.replace(/.*?\/v_play\/(.*).html/g, '$1');
|
|
||||||
});
|
async function detail(id) {
|
||||||
vod.vod_play_from = key;
|
const html = await request(url + '/movie/' + id + '.html');
|
||||||
vod.vod_play_url = playlist.join('#');
|
const $ = load(html);
|
||||||
return JSON.stringify({
|
const detail = $('ul.moviedteail_list > li');
|
||||||
list: [vod],
|
let vod = {
|
||||||
});
|
vod_id: id,
|
||||||
}
|
vod_pic: $('div.dyimg img:first').attr('src'),
|
||||||
|
vod_remarks: '',
|
||||||
async function play(flag, id, flags) {
|
vod_content: stripHtmlTag($('div.yp_context').html()).trim(),
|
||||||
const link = url + '/v_play/' + id + '.html';
|
};
|
||||||
const html = await request(link);
|
for (const info of detail) {
|
||||||
const $ = load(html);
|
const i = $(info).text().trim();
|
||||||
const iframe = $('body iframe[src*=Cloud]');
|
if (i.startsWith('地区:')) {
|
||||||
if (iframe.length > 0) {
|
vod.vod_area = i.substring(3);
|
||||||
const iframeHtml = (
|
} else if (i.startsWith('年份:')) {
|
||||||
await req(iframe[0].attribs.src, {
|
vod.vod_year = i.substring(3);
|
||||||
headers: {
|
} else if (i.startsWith('导演:')) {
|
||||||
Referer: link,
|
vod.vod_director = _.map($(info).find('a'), (a) => {
|
||||||
'User-Agent': UA,
|
return a.children[0].data;
|
||||||
},
|
}).join('/');
|
||||||
})
|
} else if (i.startsWith('主演:')) {
|
||||||
).content;
|
vod.vod_actor = _.map($(info).find('a'), (a) => {
|
||||||
let code = iframeHtml
|
return a.children[0].data;
|
||||||
.match(/var url = '(.*?)'/)[1]
|
}).join('/');
|
||||||
.split('')
|
} else if (i.startsWith('语言:')) {
|
||||||
.reverse()
|
vod.vod_lang = i.substring(3);
|
||||||
.join('');
|
}
|
||||||
let temp = '';
|
}
|
||||||
for (let i = 0x0; i < code.length; i = i + 0x2) {
|
const playlist = _.map($('div.paly_list_btn > a'), (a) => {
|
||||||
temp += String.fromCharCode(parseInt(code[i] + code[i + 0x1], 0x10));
|
return a.children[0].data + '$' + a.attribs.href.replace(/.*?\/v_play\/(.*).html/g, '$1');
|
||||||
}
|
});
|
||||||
const playUrl = temp.substring(0x0, (temp.length - 0x7) / 0x2) + temp.substring((temp.length - 0x7) / 0x2 + 0x7);
|
vod.vod_play_from = key;
|
||||||
return JSON.stringify({
|
vod.vod_play_url = playlist.join('#');
|
||||||
parse: 0,
|
return JSON.stringify({
|
||||||
url: playUrl,
|
list: [vod],
|
||||||
});
|
});
|
||||||
} else {
|
}
|
||||||
const js = $('script:contains(window.wp_nonce)').html();
|
|
||||||
const group = js.match(/(var.*)eval\((\w*\(\w*\))\)/);
|
async function play(flag, id, flags) {
|
||||||
const md5 = Crypto;
|
const link = url + '/v_play/' + id + '.html';
|
||||||
const result = eval(group[1] + group[2]);
|
const html = await request(link);
|
||||||
const playUrl = result.match(/url:.*?['"](.*?)['"]/)[1];
|
const $ = load(html);
|
||||||
return JSON.stringify({
|
const iframe = $('body iframe[src*=Cloud]');
|
||||||
parse: 0,
|
if (iframe.length > 0) {
|
||||||
url: playUrl,
|
const iframeHtml = (
|
||||||
});
|
await req(iframe[0].attribs.src, {
|
||||||
}
|
headers: {
|
||||||
}
|
Referer: link,
|
||||||
|
'User-Agent': UA,
|
||||||
async function search(wd, quick) {
|
},
|
||||||
const html = await request(url + '/?s=' + wd);
|
})
|
||||||
const $ = load(html);
|
).content;
|
||||||
const items = $('div.search_list > ul > li');
|
let code = iframeHtml
|
||||||
let videos = _.map(items, (item) => {
|
.match(/var url = '(.*?)'/)[1]
|
||||||
const img = $(item).find('img:first')[0];
|
.split('')
|
||||||
const a = $(item).find('a:first')[0];
|
.reverse()
|
||||||
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
|
.join('');
|
||||||
const jidi = $($(item).find('div.jidi')[0]).text().trim();
|
let temp = '';
|
||||||
return {
|
for (let i = 0x0; i < code.length; i = i + 0x2) {
|
||||||
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
|
temp += String.fromCharCode(parseInt(code[i] + code[i + 0x1], 0x10));
|
||||||
vod_name: img.attribs.alt,
|
}
|
||||||
vod_pic: img.attribs['data-original'],
|
const playUrl = temp.substring(0x0, (temp.length - 0x7) / 0x2) + temp.substring((temp.length - 0x7) / 0x2 + 0x7);
|
||||||
vod_remarks: jidi || hdinfo || '',
|
return JSON.stringify({
|
||||||
};
|
parse: 0,
|
||||||
});
|
url: playUrl,
|
||||||
return JSON.stringify({
|
});
|
||||||
list: videos,
|
} else {
|
||||||
});
|
const js = $('script:contains(window.wp_nonce)').html();
|
||||||
}
|
const group = js.match(/(var.*)eval\((\w*\(\w*\))\)/);
|
||||||
|
const md5 = Crypto;
|
||||||
export function __jsEvalReturn() {
|
const result = eval(group[1] + group[2]);
|
||||||
return {
|
const playUrl = result.match(/url:.*?['"](.*?)['"]/)[1];
|
||||||
init: init,
|
return JSON.stringify({
|
||||||
home: home,
|
parse: 0,
|
||||||
homeVod: homeVod,
|
url: playUrl,
|
||||||
category: category,
|
});
|
||||||
detail: detail,
|
}
|
||||||
play: play,
|
}
|
||||||
search: search,
|
|
||||||
};
|
async function search(wd, quick) {
|
||||||
}
|
const html = await request(url + '/?s=' + wd);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.search_list > ul > li');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const img = $(item).find('img:first')[0];
|
||||||
|
const a = $(item).find('a:first')[0];
|
||||||
|
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
|
||||||
|
const jidi = $($(item).find('div.jidi')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
|
||||||
|
vod_name: img.attribs.alt,
|
||||||
|
vod_pic: img.attribs['data-original'],
|
||||||
|
vod_remarks: jidi || hdinfo || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
return JSON.stringify({
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
239
JN/EXT/OPENJS/open/ddys_open.js
Normal file
239
JN/EXT/OPENJS/open/ddys_open.js
Normal file
@ -0,0 +1,239 @@
|
|||||||
|
import { Crypto, load, _ } from 'assets://js/lib/cat.js';
|
||||||
|
|
||||||
|
const key = 'ddys';
|
||||||
|
let DOMAIN = 'ddys.pro';
|
||||||
|
let HOST = 'https://' + DOMAIN;
|
||||||
|
let PLAY_HOST = 'https://v.' + DOMAIN;
|
||||||
|
const FROM_DIRECT = '直连';
|
||||||
|
const FROM_PARSE = '解析';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const UA = 'Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36';
|
||||||
|
|
||||||
|
async function request(reqUrl) {
|
||||||
|
const res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'Host': HOST.match(/.*\:\/\/(.*)/)[1],
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': HOST,
|
||||||
|
'Accept-Encoding': 'gzip',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
if (cfg.hasOwnProperty('ext')) {
|
||||||
|
if (cfg.ext.hasOwnProperty('domain')) {
|
||||||
|
DOMAIN = cfg.ext.domain;
|
||||||
|
HOST = 'https://' + DOMAIN;
|
||||||
|
PLAY_HOST = 'https://v.' + DOMAIN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
const classes = [{'type_id':'class','type_name':'类型'},{'type_id':'movie','type_name':'电影'},{'type_id':'airing','type_name':'热映中'},{'type_id':'drama','type_name':'剧集'},{'type_id':'anime','type_name':'动画'},{'type_id':'documentary','type_name':'纪录片'},{'type_id':'variety','type_name':'综艺'}];
|
||||||
|
const filterObj = {
|
||||||
|
'class':[{'key':'tag','name':'标签','init':'recommend','value':[{'n':'站长推荐','v':'recommend'},{'n':'动作','v':'action'},{'n':'喜剧','v':'comedy'},{'n':'爱情','v':'romance'},{'n':'科幻','v':'sci-fi'},{'n':'犯罪','v':'crime'},{'n':'悬疑','v':'mystery'},{'n':'恐怖','v':'horror'}]}],
|
||||||
|
'movie':[{'key':'type','name':'分类','init':'','value':[{'n':'全部','v':''},{'n':'欧美电影','v':'western-movie'},{'n':'日韩电影','v':'asian-movie'},{'n':'华语电影','v':'chinese-movie'}]}],
|
||||||
|
'drama':[{'key':'type','name':'分类','init':'','value':[{'n':'全部','v':''},{'n':'欧美剧','v':'western-drama'},{'n':'日剧','v':'jp-drama'},{'n':'韩剧','v':'kr-drama'},{'n':'华语剧','v':'cn-drama'},{'n':'其他地区','v':'other'}]}],
|
||||||
|
'anime':[{'key':'type','name':'分类','init':'','value':[{'n':'全部','v':''},{'n':'本季新番','v':'new-bangumi'}]}]
|
||||||
|
};
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let path = '';
|
||||||
|
if (extend.tag) {
|
||||||
|
path = '/tag/' + extend.tag;
|
||||||
|
} else {
|
||||||
|
path = '/category/' + tid;
|
||||||
|
if (!_.isEmpty(extend.type)) {
|
||||||
|
path += '/' + extend.type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let page = '';
|
||||||
|
if (pg > 1) {
|
||||||
|
page = 'page/' + pg + '/';
|
||||||
|
}
|
||||||
|
const link = HOST + path + '/' + page;
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('.post-box-list article');
|
||||||
|
const videos = _.map(items, (item) => {
|
||||||
|
const $item = $(item);
|
||||||
|
const title = $item.find('.post-box-title a');
|
||||||
|
const name = title.text();
|
||||||
|
const url = title.attr('href');
|
||||||
|
const image = $item.find('.post-box-image').attr('style').replace(/.*url\((.*)\);/g, '$1');
|
||||||
|
const remarks = $item.find('.post-box-meta').text();
|
||||||
|
return {
|
||||||
|
vod_id: url.replace(/.*\/\/.*\/(.*)\//g, '$1'),
|
||||||
|
vod_name: name,
|
||||||
|
vod_pic: image,
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const limit = 28;
|
||||||
|
const hasMore = $('nav.navigation a.next').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: limit,
|
||||||
|
total: limit * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const html = await request(HOST + '/' + id + '/');
|
||||||
|
const $ = load(html);
|
||||||
|
const abstract = $('div.abstract')[0].children;
|
||||||
|
const vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1.post-title').text(),
|
||||||
|
vod_type: findAbstractText(abstract, '类型:'),
|
||||||
|
vod_year: findAbstractText(abstract, '年份:'),
|
||||||
|
vod_area: findAbstractText(abstract, '制片国家/地区:'),
|
||||||
|
vod_director: findAbstractText(abstract, '导演:'),
|
||||||
|
vod_actor: findAbstractText(abstract, '演员:'),
|
||||||
|
vod_pic: $('div.post img:first').attr('data-cfsrc'),
|
||||||
|
vod_remarks : $('span.cat-links').text().trim(),
|
||||||
|
vod_content: findAbstractText(abstract, '简介:'),
|
||||||
|
};
|
||||||
|
const playMap = {};
|
||||||
|
parseAndUpdateUrls($, playMap);
|
||||||
|
const links = $('div.page-links a');
|
||||||
|
if (!_.isEmpty(links)) {
|
||||||
|
const promiseList = _.map(links, (link) => {
|
||||||
|
const url = $(link).attr('href');
|
||||||
|
return request(url);
|
||||||
|
});
|
||||||
|
const respList = await Promise.all(promiseList);
|
||||||
|
_.each(respList, (resp) => {
|
||||||
|
try {
|
||||||
|
const $ = load(resp);
|
||||||
|
parseAndUpdateUrls($, playMap);
|
||||||
|
} catch(e) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
const urls = _.values(playMap);
|
||||||
|
const vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function findAbstractText(children, keyword) {
|
||||||
|
for (const item of children) {
|
||||||
|
if (item.type == 'text' && item.data && item.data.startsWith(keyword)) {
|
||||||
|
return item.data.substring(keyword.length).trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseAndUpdateUrls($, playMap) {
|
||||||
|
const trackText = $('script.wp-playlist-script').text();
|
||||||
|
const tracks = JSON.parse(trackText).tracks;
|
||||||
|
_.each(tracks, (track) => {
|
||||||
|
const title = track.caption;
|
||||||
|
const directUrl = track.src0;
|
||||||
|
if (!playMap.hasOwnProperty(FROM_DIRECT)) {
|
||||||
|
playMap[FROM_DIRECT] = [];
|
||||||
|
}
|
||||||
|
playMap[FROM_DIRECT].push(title + '$' + directUrl);
|
||||||
|
if (!_.isEmpty(track.src1)) {
|
||||||
|
if (!playMap.hasOwnProperty(FROM_PARSE)) {
|
||||||
|
playMap[FROM_PARSE] = [];
|
||||||
|
}
|
||||||
|
playMap[FROM_PARSE].push(title + '$' + track.src1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
let playUrl;
|
||||||
|
if (flag == FROM_PARSE) {
|
||||||
|
const resp = await request(HOST + '/getvddr2/video?id=' + id + '&type=json');
|
||||||
|
playUrl = JSON.parse(resp).url;
|
||||||
|
} else {
|
||||||
|
playUrl = PLAY_HOST + id;
|
||||||
|
}
|
||||||
|
const headers = {
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': HOST,
|
||||||
|
'Icy-MetaData': '1',
|
||||||
|
'Sec-Fetch-Site': 'same-site',
|
||||||
|
'Sec-Fetch-Mode': 'cors',
|
||||||
|
'Sec-Fetch-Dest': 'video',
|
||||||
|
};
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
header: headers,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
let page = '';
|
||||||
|
if (pg > 1) {
|
||||||
|
page = '/page/' + pg;
|
||||||
|
}
|
||||||
|
const html = await request(HOST + page + '/?s=' + wd + '&post_type=post');
|
||||||
|
const $ = load(html);
|
||||||
|
const list = $('div.post-content');
|
||||||
|
const videos = _.map(list, (item) => {
|
||||||
|
const $item = $(item);
|
||||||
|
const title = $item.find('.post-title a');
|
||||||
|
const name = title.text();
|
||||||
|
const url = title.attr('href');
|
||||||
|
const remarks = $item.find('.cat-links').text();
|
||||||
|
return {
|
||||||
|
vod_id: url.replace(/.*\/\/.*\/(.*)\//g, '$1'),
|
||||||
|
vod_name: name,
|
||||||
|
vod_pic: HOST + '/android-chrome-512x512.png',
|
||||||
|
vod_remarks: remarks,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const limit = 100;
|
||||||
|
const hasMore = $('nav.navigation a.next').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: limit,
|
||||||
|
total: limit * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/djwm_open.js
Normal file
1
JN/EXT/OPENJS/open/djwm_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/dnys_open.js
Normal file
1
JN/EXT/OPENJS/open/dnys_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/douban_open.js
Normal file
1
JN/EXT/OPENJS/open/douban_open.js
Normal file
File diff suppressed because one or more lines are too long
233
JN/EXT/OPENJS/open/douyu_open.js
Normal file
233
JN/EXT/OPENJS/open/douyu_open.js
Normal file
File diff suppressed because one or more lines are too long
81
JN/EXT/OPENJS/open/dovx_open.js
Normal file
81
JN/EXT/OPENJS/open/dovx_open.js
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
import { _ } from 'assets://js/lib/cat.js';
|
||||||
|
import { log } from './lib/utils.js';
|
||||||
|
import { initAli, detailContent, playContent } from './lib/ali.js';
|
||||||
|
|
||||||
|
let siteKey = 'dovx';
|
||||||
|
let siteType = 0;
|
||||||
|
let siteUrl = 'https://api.dovx.tk';
|
||||||
|
let patternAli = /(https:\/\/www\.(aliyundrive|alipan)\.com\/s\/[^"]+)/
|
||||||
|
|
||||||
|
async function request(reqUrl) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'Referer': siteUrl,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
try {
|
||||||
|
siteKey = _.isEmpty(cfg.skey) ? '' : cfg.skey;
|
||||||
|
siteType = _.isEmpty(cfg.stype) ? '' : cfg.stype;
|
||||||
|
await initAli(cfg);
|
||||||
|
} catch (e) {
|
||||||
|
await log('init:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
return '{}';
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
return '{}';
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
try {
|
||||||
|
let matches = id.match(patternAli);
|
||||||
|
if (!_.isEmpty(matches)) return await detailContent(matches[0]);
|
||||||
|
return '';
|
||||||
|
} catch (e) {
|
||||||
|
await log('detail:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
try {
|
||||||
|
return await playContent(flag, id, flags);
|
||||||
|
} catch (e) {
|
||||||
|
await log('play:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
let resp = await request(siteUrl + "/ali/search?wd=" + encodeURIComponent(wd));
|
||||||
|
let videos = JSON.parse(resp).list;
|
||||||
|
_.each(videos, (item) => {
|
||||||
|
item.vod_id = item.vod_content;
|
||||||
|
item.vod_content = undefined;
|
||||||
|
});
|
||||||
|
return JSON.stringify({
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/duanju5_open.js
Normal file
1
JN/EXT/OPENJS/open/duanju5_open.js
Normal file
File diff suppressed because one or more lines are too long
@ -2,8 +2,8 @@
|
|||||||
import { load, _ } from './lib/cat.js';
|
import { load, _ } from './lib/cat.js';
|
||||||
|
|
||||||
let key = 'duboku';
|
let key = 'duboku';
|
||||||
let HOST = 'https://www.duboku.tv';
|
let HOST = 'https://u.duboku.io';
|
||||||
// let HOST = 'https://u.duboku.io';
|
// let HOST = 'https://www.duboku.tv';
|
||||||
let siteKey = '';
|
let siteKey = '';
|
||||||
let siteType = 0;
|
let siteType = 0;
|
||||||
|
|
||||||
|
1
JN/EXT/OPENJS/open/dyxs_open.js
Normal file
1
JN/EXT/OPENJS/open/dyxs_open.js
Normal file
File diff suppressed because one or more lines are too long
126
JN/EXT/OPENJS/open/ff_open.js
Normal file
126
JN/EXT/OPENJS/open/ff_open.js
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
import { Crypto, load, _, jinja2 } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'ff';
|
||||||
|
let HOST = 'https://cj.ffzyapi.com';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":1,"type_name":"电影"},{"type_id":2,"type_name":"追剧"},{"type_id":3,"type_name":"综艺"},{"type_id":4,"type_name":"动漫"}];
|
||||||
|
let filterObj = {
|
||||||
|
"2":[{"key":"cateId","name":"类型","value":[{"n":"全部","v":"2"},{"n":"短剧","v":"36"},{"n":"陆剧","v":"13"},{"n":"韩剧","v":"15"},{"n":"欧美剧","v":"16"},{"n":"港剧","v":"14"},{"n":"台剧","v":"21"},{"n":"日剧","v":"22"},{"n":"海外剧","v":"23"},{"n":"泰剧","v":"24"},{"n":"纪录片","v":"20"}]}],
|
||||||
|
"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"}]}],
|
||||||
|
"3":[{"key":"cateId","name":"类型","value":[{"n":"全部","v":"3"},{"n":"国综","v":"25"},{"n":"港综","v":"26"},{"n":"韩日综","v":"27"},{"n":"欧美综","v":"28"}]}],
|
||||||
|
"4":[{"key":"cateId","name":"类型","value":[{"n":"全部","v":"4"},{"n":"国漫","v":"29"},{"n":"日韩动漫","v":"30"},{"n":"欧美动漫","v":"31"},{"n":"港漫","v":"32"},{"n":"海外动漫","v":"33"}]}]
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let data = JSON.parse(await request(HOST + '/index.php/ajax/data?mid=1&tid=' + (extend.cateId || tid) + '&page=' + pg + '&limit=20'));
|
||||||
|
|
||||||
|
let videos = [];
|
||||||
|
for (const vod of data.list) {
|
||||||
|
videos.push({
|
||||||
|
vod_id: vod.vod_id,
|
||||||
|
vod_name: vod.vod_name,
|
||||||
|
vod_pic: vod.vod_pic,
|
||||||
|
vod_remarks: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(data.page),
|
||||||
|
pagecount: data.pagecount,
|
||||||
|
limit: 20,
|
||||||
|
total: data.total,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
var html = await request( HOST + '/index.php/vod/detail/id/' + id + '.html');
|
||||||
|
var $ = load(html);
|
||||||
|
var vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.stui-content__detail p:first a').text(),
|
||||||
|
vod_actor: $('.stui-content__detail p:nth-child(3)').text().replace('主演:',''),
|
||||||
|
vod_pic: $('.stui-content__thumb img:first').attr('data-original'),
|
||||||
|
vod_remarks : $('.stui-content__detail p:nth-child(5)').text() || '',
|
||||||
|
vod_content: $('span.detail-content').text().trim(),
|
||||||
|
};
|
||||||
|
const playlist = _.map($('div.ffm3u8 > li > a[target*=_blank]'), (it) => {
|
||||||
|
return it.attribs.title + '$' + it.attribs.href;
|
||||||
|
});
|
||||||
|
vod.vod_play_from = "非凡直达";
|
||||||
|
vod.vod_play_url = playlist.join('#');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let data = JSON.parse(await request(HOST + '/api.php/provide/vod/?wd=' + wd + '&pg=' +pg + '&ac=detail'));///api.php/provide/vod/?wd=搜索词&pg=翻页&ac=detail
|
||||||
|
|
||||||
|
let videos = [];
|
||||||
|
for (const vod of data.list) {
|
||||||
|
videos.push({
|
||||||
|
vod_id: vod.vod_id,
|
||||||
|
vod_name: vod.vod_name,
|
||||||
|
vod_pic: vod.vod_pic,
|
||||||
|
vod_remarks: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(data.page),
|
||||||
|
pagecount: data.pagecount,
|
||||||
|
limit: 20,
|
||||||
|
total: data.total,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
222
JN/EXT/OPENJS/open/freeok_open.js
Normal file
222
JN/EXT/OPENJS/open/freeok_open.js
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
import { Crypto, load, _ } from 'assets://js/lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'freeok';
|
||||||
|
let HOST = 'https://www.freeok.vip';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
let cookie = '';
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, reqCookie) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': HOST,
|
||||||
|
'cookie': reqCookie
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
if (cfg.hasOwnProperty('ext')) {
|
||||||
|
if (cfg.ext.hasOwnProperty('host')) {
|
||||||
|
HOST = cfg.ext.host;
|
||||||
|
}
|
||||||
|
if (cfg.ext.hasOwnProperty('cookie')) {
|
||||||
|
cookie = cfg.ext.cookie;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"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":"少儿"}];
|
||||||
|
let filterObj = {
|
||||||
|
"1":[{"key":"class","name":"剧情","init":"","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":"其他"}]},{"key":"area","name":"地区","init":"","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":"lang","name":"语言","init":"","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"法语","v":"法语"},{"n":"德语","v":"德语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","init":"","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","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"}]},{"key":"by","name":"排序","init":"","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"2":[{"key":"cateId","name":"类型","init":"2","value":[{"n":"全部","v":"2"},{"n":"国产剧","v":"6"},{"n":"港台剧","v":"7"},{"n":"日韩剧","v":"8"},{"n":"欧美剧","v":"9"},{"n":"海外剧","v":"10"},{"n":"其他剧","v":"11"}]},{"key":"class","name":"剧情","init":"","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":"area","name":"地区","init":"","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":"lang","name":"语言","init":"","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","init":"","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","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"}]},{"key":"by","name":"排序","init":"","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"3":[{"key":"class","name":"剧情","init":"","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":"area","name":"地区","init":"","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":"lang","name":"语言","init":"","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","init":"","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","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"}]},{"key":"by","name":"排序","init":"","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"4":[{"key":"class","name":"剧情","init":"","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":"area","name":"地区","init":"","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":"lang","name":"语言","init":"","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","init":"","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","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"}]},{"key":"by","name":"排序","init":"","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"5":[{"key":"by","name":"排序","init":"","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let page = '';
|
||||||
|
if (pg > 1) {
|
||||||
|
page = pg;
|
||||||
|
}
|
||||||
|
const link = HOST + '/vodshow/' + (extend.cateId || tid) + '-' + (extend.area || '') + '-' + (extend.by || '') + '-' + (extend.class || '') + '-' + (extend.lang || '') + '----' + page + '---' + (extend.year || '') + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('a.module-item');
|
||||||
|
const covers = $('.module-item-cover');
|
||||||
|
let videos = _.map(items, (item, index) => {
|
||||||
|
const cover = $(covers[index]);
|
||||||
|
const img = cover.find('img:first')[0];
|
||||||
|
const remarks = $(cover.find('div.module-item-note')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: item.attribs.href.replace(/.*?\/voddetail\/(.*).html/g, '$1'),
|
||||||
|
vod_name: item.attribs.title,
|
||||||
|
vod_pic: img.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('a.page-next:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const html = await request(HOST + '/voddetail/' + id + '.html');
|
||||||
|
const $ = load(html);
|
||||||
|
const vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text(),
|
||||||
|
vod_type: $('.module-info-tag-link:eq(2) a:first').text().trim(),
|
||||||
|
vod_year: $('.module-info-tag-link:eq(0)').text().trim(),
|
||||||
|
vod_area: $('.module-info-tag-link:eq(1)').text().trim(),
|
||||||
|
vod_director: $('.module-info-item:contains(导演:)').text().trim().substring(3).trim().replace(/\/$/g, ''),
|
||||||
|
vod_actor: $('.module-info-item:contains(主演:)').text().trim().substring(3).trim().replace(/\/$/g, ''),
|
||||||
|
vod_pic: $('.module-info-poster .module-item-pic img:first').attr('data-original'),
|
||||||
|
vod_remarks : $('.module-info-item:contains(集数:)').text().trim().substring(3) || '',
|
||||||
|
vod_content: $('.module-info-introduction-content').text().trim(),
|
||||||
|
};
|
||||||
|
let playMap = {};
|
||||||
|
let tabs = $('.module-tab-items-box .module-tab-item');
|
||||||
|
let playlists = $('.module-play-list');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
let from = tab.children[0].children[0].data;
|
||||||
|
if (from.includes('夸克')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
let title = it.children[0].children[0].data;
|
||||||
|
let playUrl = it.attribs.href.replace(/.*?\/vodplay\/(.*).html/g, '$1');
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push(title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
let urls = _.values(playMap);
|
||||||
|
let vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = HOST + '/vodplay/' + id + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html, true);
|
||||||
|
const js = JSON.parse($('script:contains(player_)').html().replace('var player_aaaa=',''));
|
||||||
|
let playUrl = js.url;
|
||||||
|
if (js.encrypt == 1) {
|
||||||
|
playUrl = unescape(playUrl);
|
||||||
|
} else if (js.encrypt == 2) {
|
||||||
|
playUrl = unescape(base64Decode(playUrl));
|
||||||
|
}
|
||||||
|
let playHtml = await request('https://www.freeok.vip/okplay/?url=' + playUrl);
|
||||||
|
playUrl = decryptUrl(playHtml);
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
header: {
|
||||||
|
'User-Agent': UA,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function decryptUrl(html) {
|
||||||
|
const result = html.match(/var config = {[\w\W]*}[\w\W]*player/);
|
||||||
|
const jsConfig = eval(result[0].replace(/player$/g, ';config'));
|
||||||
|
const url = jsConfig.url;
|
||||||
|
const $ = load(html);
|
||||||
|
const textStr = $('meta[name="viewport"]').attr('id').replace('now_', '');
|
||||||
|
const idStr = $('meta[charset="UTF-8"]').attr('id').replace('now_', '');
|
||||||
|
let keyList = [];
|
||||||
|
let sortedList = [];
|
||||||
|
let keyStr = '';
|
||||||
|
for (let index = 0; index < idStr.length; index++) {
|
||||||
|
keyList.push({
|
||||||
|
'id': idStr[index],
|
||||||
|
'text': textStr[index]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
sortedList = keyList.sort((a, b)=> a.id - b.id);
|
||||||
|
for (const item of sortedList) {
|
||||||
|
keyStr += item.text;
|
||||||
|
}
|
||||||
|
const md5Key = Crypto.MD5(keyStr + '0xd8@pS^vOL$WuOF3').toString();
|
||||||
|
const endStr = Crypto.enc.Utf8.parse(md5Key.substring(16));
|
||||||
|
const iv = Crypto.enc.Utf8.parse(md5Key.substring(0, 16));
|
||||||
|
const decrypted = Crypto.AES.decrypt(url, endStr, {
|
||||||
|
'iv': iv,
|
||||||
|
'mode': Crypto.mode.CBC,
|
||||||
|
'padding': Crypto.pad.Pkcs7,
|
||||||
|
});
|
||||||
|
const decryptedUrl = Crypto.enc.Utf8.stringify(decrypted);
|
||||||
|
return decryptedUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
let html = await request(HOST + '/vod-so/-------------.html?wd=' + wd, cookie);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.module-card-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const title = $(item).find('.module-card-item-title a:first')[0];
|
||||||
|
const cover = $(item).find('.module-item-cover');
|
||||||
|
const img = cover.find('img:first')[0];
|
||||||
|
const remarks = $(cover.find('.module-item-note')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: title.attribs.href.replace(/.*?\/voddetail\/(.*).html/g, '$1'),
|
||||||
|
vod_name: title.children[0].children[0].data,
|
||||||
|
vod_pic: img.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
return JSON.stringify({
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/funletu_open.js
Normal file
1
JN/EXT/OPENJS/open/funletu_open.js
Normal file
File diff suppressed because one or more lines are too long
222
JN/EXT/OPENJS/open/ggys_open.js
Normal file
222
JN/EXT/OPENJS/open/ggys_open.js
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
import { Crypto, load, _ } from 'assets://js/lib/cat.js';
|
||||||
|
|
||||||
|
const key = 'ggys';
|
||||||
|
const HOST = 'https://ggys.me';
|
||||||
|
const TYPE_MOVIE = 'movie';
|
||||||
|
const TYPE_TVSHOW = 'tv-show';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const UA = 'Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36';
|
||||||
|
|
||||||
|
async function request(reqUrl, method, data) {
|
||||||
|
const res = await req(reqUrl, {
|
||||||
|
method: method || 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': HOST,
|
||||||
|
},
|
||||||
|
data: data,
|
||||||
|
postType: method === 'post' ? 'form' : '',
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
if (cfg.hasOwnProperty('ext')) {
|
||||||
|
if (cfg.ext.hasOwnProperty('host')) {
|
||||||
|
HOST = cfg.ext.host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
const classes = [{'type_id':'movies','type_name':'电影'},{'type_id':'tv-shows','type_name':'剧集'}];
|
||||||
|
const filterObj = {
|
||||||
|
'movies':[{'key':'class','name':'类型','init':'','value':[{'n':'全部','v':''},{'n':'欧美电影','v':'tag/欧美电影'},{'n':'华语电影','v':'tag/华语电影'},{'n':'日韩电影','v':'tag/日韩电影'},{'n':'其他地区','v':'tag/其他地区'},{'n':'冒险','v':'genre/冒险'},{'n':'剧情','v':'genre/剧情'},{'n':'动作','v':'genre/动作'},{'n':'动画','v':'genre/动画'},{'n':'历史','v':'genre/历史'},{'n':'喜剧','v':'genre/喜剧'},{'n':'奇幻','v':'genre/奇幻'},{'n':'家庭','v':'genre/家庭'},{'n':'恐怖','v':'genre/恐怖'},{'n':'悬疑','v':'genre/悬疑'},{'n':'惊悚','v':'genre/惊悚'},{'n':'战争','v':'genre/战争'},{'n':'爱情','v':'genre/爱情'},{'n':'犯罪','v':'genre/犯罪'},{'n':'科幻','v':'genre/科幻'},{'n':'纪录','v':'genre/纪录'},{'n':'音乐','v':'genre/音乐'}]}],
|
||||||
|
'tv-shows':[{'key':'class','name':'类型','init':'','value':[{'n':'全部','v':''},{'n':'欧美剧','v':'tag/欧美剧'},{'n':'日韩剧','v':'tag/日韩剧'},{'n':'国产剧','v':'tag/国产剧'},{'n':'其他地区','v':'tag/其他地区'},{'n':'剧情','v':'genre/剧情'},{'n':'动作','v':'genre/动作'},{'n':'动画','v':'genre/动画'},{'n':'喜剧','v':'genre/喜剧'},{'n':'家庭','v':'genre/家庭'},{'n':'悬疑','v':'genre/悬疑'},{'n':'犯罪','v':'genre/犯罪'},{'n':'科幻','v':'genre/科幻'},{'n':'西部','v':'genre/西部'}]}],
|
||||||
|
};
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let path = '';
|
||||||
|
const prefixMap = {
|
||||||
|
'movies': TYPE_MOVIE,
|
||||||
|
'tv-shows': TYPE_TVSHOW,
|
||||||
|
}
|
||||||
|
const prefix = prefixMap[tid];
|
||||||
|
if (extend.class) {
|
||||||
|
path = '/' + prefix + '-' + extend.class;
|
||||||
|
} else {
|
||||||
|
path = '/' + tid;
|
||||||
|
}
|
||||||
|
let page = '';
|
||||||
|
if (pg > 1) {
|
||||||
|
page = 'page/' + pg + '/';
|
||||||
|
}
|
||||||
|
const link = HOST + path + '/' + page;
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const videos = [];
|
||||||
|
parseVideoList($, prefix, false, videos);
|
||||||
|
const limit = 20;
|
||||||
|
const hasMore = $('.page-numbers a.next').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: limit,
|
||||||
|
total: limit * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseVideoList($, prefix, imgSrc, videos) {
|
||||||
|
const items = $('.' + prefix);
|
||||||
|
_.each(items, (item) => {
|
||||||
|
const $item = $(item);
|
||||||
|
const title = $item.find('.' + prefix + '__title:first').text();
|
||||||
|
const url = $item.find('.' + prefix + '__actions a:first').attr('href');
|
||||||
|
const imgAttr = imgSrc ? 'src' : 'data-lazy-src';
|
||||||
|
const image = $item.find('.' + prefix + '__poster img:first').attr(imgAttr);
|
||||||
|
const remarks = $item.find('.' + prefix + '__meta span:last').text();
|
||||||
|
if (!url) return;
|
||||||
|
const videoItem = {
|
||||||
|
vod_id: decodeURIComponent(url.replace(/.*\/\/.*\/(.*\/.*)\//g, '$1')),
|
||||||
|
vod_name: title,
|
||||||
|
vod_pic: image,
|
||||||
|
vod_remarks: remarks,
|
||||||
|
};
|
||||||
|
videos.push(videoItem);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const isMovieType = id.startsWith(TYPE_MOVIE);
|
||||||
|
const html = await request(HOST + '/' + id + '/');
|
||||||
|
const $ = load(html);
|
||||||
|
const prefix = isMovieType ? TYPE_MOVIE : TYPE_TVSHOW;
|
||||||
|
const vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('.' + prefix + '_title').text(),
|
||||||
|
vod_actor: $('.' + prefix + '-casts').text().trim().substring(3).replace(/\s+\/\s+/g, '/'),
|
||||||
|
vod_pic: $('.' + prefix + '__poster img:first').attr('data-lazy-src'),
|
||||||
|
vod_remarks: $('.' + prefix + '__meta span:last').text(),
|
||||||
|
};
|
||||||
|
if (isMovieType) {
|
||||||
|
vod.vod_type = $('.' + prefix + '__meta span:last').text();
|
||||||
|
vod.vod_year = $('.' + prefix + '__meta span:first').text();
|
||||||
|
vod.vod_content = $('.movie__description').text();
|
||||||
|
} else {
|
||||||
|
vod.vod_type = $('.' + prefix + '__meta span:first').text();
|
||||||
|
vod.vod_content = $('.tv-show__info--body').text();
|
||||||
|
}
|
||||||
|
const from = 'ggys';
|
||||||
|
const playMap = {};
|
||||||
|
if (isMovieType) {
|
||||||
|
const playId = $('.ggys-video-player').attr('data-source-id');
|
||||||
|
const playCfg = playId + '@' + TYPE_MOVIE;
|
||||||
|
playMap[from] = [ '全$' + playCfg ];
|
||||||
|
} else {
|
||||||
|
const tabs = $('.tv_show__season-tabs-wrap .nav-item');
|
||||||
|
const episodes = $('.episodes');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
const titlePrefix = $(tab).text().trim();
|
||||||
|
const episodeList = $(episodes[i]).find('.episode__body');
|
||||||
|
_.each(episodeList, (episode) => {
|
||||||
|
const $episode = $(episode);
|
||||||
|
const title = titlePrefix + ' ' + $episode.text().trim();
|
||||||
|
const url = $episode.find('a').attr('href');
|
||||||
|
const playCfg = url + '@' + TYPE_TVSHOW;
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push(title + '$' + playCfg);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
const urls = _.values(playMap);
|
||||||
|
const vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const playCfg = id.split('@');
|
||||||
|
const playType = playCfg[1];
|
||||||
|
let playId = playCfg[0];
|
||||||
|
let playUrl;
|
||||||
|
if (playType == TYPE_TVSHOW) {
|
||||||
|
const html = await request(playId);
|
||||||
|
const $ = load(html);
|
||||||
|
playId = $('.ggys-video-player').attr('data-source-id');
|
||||||
|
}
|
||||||
|
const param = {
|
||||||
|
video_id: playId,
|
||||||
|
};
|
||||||
|
const resp = await request(HOST + '/wp-json/get_addr/v1/get_video_url', 'post', param);
|
||||||
|
playUrl = JSON.parse(resp).video_url;
|
||||||
|
const headers = {
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': HOST,
|
||||||
|
};
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
header: headers,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
let page = '';
|
||||||
|
if (pg > 1) {
|
||||||
|
page = '/page/' + pg;
|
||||||
|
}
|
||||||
|
const url = HOST + '/search/' + wd + page + '/?post_type=';
|
||||||
|
const videos = [];
|
||||||
|
let html = await request(url + 'movie');
|
||||||
|
let $ = load(html);
|
||||||
|
parseVideoList($, TYPE_MOVIE, true, videos);
|
||||||
|
const hasMoreMovie = $('.page-numbers a.next').length > 0;
|
||||||
|
html = await request(url + 'tv_show');
|
||||||
|
$ = load(html);
|
||||||
|
parseVideoList($, TYPE_TVSHOW, true, videos);
|
||||||
|
const hasMoreTVShow = $('.page-numbers a.next').length > 0;
|
||||||
|
const limit = 40;
|
||||||
|
const hasMore = hasMoreMovie || hasMoreTVShow;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: limit,
|
||||||
|
total: limit * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/hsck_open.js
Normal file
1
JN/EXT/OPENJS/open/hsck_open.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
//bbQ0FUT1BmGGhzY2tfb3Blbi5qcyxhc3NldHM6Ly9qcy9saWIvY2F0LmpzHF9fanNFdmFsUmV0dXJuDENyeXB0bwhsb2FkAl8Ga2V5CEhPU1QOc2l0ZUtleRBzaXRlVHlwZRJNT0JJTEVfVUEKUENfVUEOcmVxdWVzdAhpbml0DmNsYXNzZXMSZmlsdGVyT2JqCGhvbWUOaG9tZVZvZBBjYXRlZ29yeQxkZXRhaWwYYmFzZTY0RW5jb2RlGGJhc2U2NERlY29kZQhwbGF5DHNlYXJjaAhoc2Nramh0dHBzOi8vZ2l0aHViLmNvbS9mdXhramQvaHNjay9yYXcvbWFpbi9kaXN0L2FsbC5qc29u9gJNb3ppbGxhLzUuMCAoTGludXg7IEFuZHJvaWQgMTE7IE0yMDA3SjNTQyBCdWlsZC9SS1ExLjIwMDgyNi4wMDI7IHd2KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBWZXJzaW9uLzQuMCBDaHJvbWUvNzcuMC4zODY1LjEyMCBNUVFCcm93c2VyLzYuMiBUQlMvMDQ1NzE0IE1vYmlsZSBTYWZhcmkvNTM3LjM25AFNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvOTUuMC40NjM4LjU0IFNhZmFyaS81MzcuMzYOdHlwZV9pZAn9VqdOxomRmBJ0eXBlX25hbWUNCWdsmi1Oh2VXW1VeDeBlbJotTodlV1tVXgnlZSxn4GVsmgnlZSxnCWdsmgkna45/2JoFbgmoUitvZ1LFYAxyZXFVcmwOYWdlbnRTcAZyZXMGcmVxFFVzZXItQWdlbnQOaGVhZGVycw5jb250ZW50BmNmZwxmaWx0ZXISc3RyaW5naWZ5Bm1hcA5maWx0ZXJzBmNscwhsYW5kCnJhdGlvBHt9BnRpZARwZwxleHRlbmQIanNvbgJkBm51bQJpBGl0DnBnQ291bnQKcGFyc2UWdm9kX3R5cGVfaWQIcHVzaAp0aXRsZRB2b2RfbmFtZQVkJw/+CmhlYXJ0CyAALwAgAD3YQNwGZXllFnZvZF9yZW1hcmtzCnRodW1kDnZvZF9waWMKbWVkaWEMdm9kX2lkEHBhcnNlSW50CHBhZ2UScGFnZWNvdW50CmxpbWl0CnRvdGFsCGxpc3QEaWQGdm9kCHVybHMadm9kX3BsYXlfZnJvbQvLenNTrWQ+ZSQAAiMYdm9kX3BsYXlfdXJsCHRleHQGZW5jDEJhc2U2NAhVdGY4CGZsYWcGdXJsBHdkCnF1aWNrDmZvckVhY2gOaW5kZXhPZgU92FDdCHRpbWULIAAvACAAZCcP/g+kAwGmAwEAFagDAAMAqgMAAawDAAKuAwAOAAYBoAEAAAAIFgvpAQCqAwAMrAMBDK4DAgywAwANsgMBDbQDAg22AwMNuAMEDboDBQ28AwYBvgMHAcADCAnCAwkJxAMKAcYDCwHIAwwBygMNAcwDDgHOAw8B0AMQAdIDEQGoAxIBCOg5vgBfCQC+AV8KAL4CXw0AvgNfDgC+BF8PAL4FXxAAvgZfEQC+B18SAL4IXxMAvglfFAC+Cl8VACkE6gAAAOIE6wAAAF8EAL9fBQCzXwYABOwAAABfBwAE7QAAAF8IAAu7D0zuAAAABO8AAABM8AAAAAu7CUzuAAAABPEAAABM8AAAAAu7CEzuAAAABPIAAABM8AAAAAu7CkzuAAAABPMAAABM8AAAAAu6TO4AAAAE9AAAAEzwAAAAC7sVTO4AAAAE9QAAAEzwAAAAC7sWTO4AAAAE9gAAAEzwAAAAJgcAXwsAC18MACmkAwEUAQA7BiErFxgrAAggAIMBAgAElgIOYgYBvAMCAQIGAQApA+4DAAEA8AMAAQDyAwEAMLoDCAxhAAA4+gAAAM8LC9AR6QUOZQAATPsAAABM/AAAAO6Lx2IAAEH9AAAALqQDCgYSJghEHBIOYgYBvgMBAAEAAgAGAfwDAAEAtAMFDLYDBgww2gAAAACkAxQBBQ5iBgHEAwEAAQcDASwB/gMAAQCuAwIMwAMLCMIDDAg4mAAAAEIAAQAAC2UAAEIBAQAAZQEAvgAkAgBMHgAAAGUCAEwCAQAAJAEALqQDGwcDOgALCDUrDkIGAQABAAECAAERAYYEAAEAz7RDBAEAAM+9AEMFAQAAzyikAx0DAyYrBkjhehSuR/U/DmIGAcYDAAAAAQAABgAEBgEAAC6kAyYBAw5iBgHIAwQGBAgDAIECCo4EAAEAkAQAAQD+AwABAJIEAAEAlAQBACCWBAEBIJgEAAAAmgQAAwCcBAMGIJ4EAQIwvAMJALIDBAzOAxIAYQUAYQEAYQAA0LOk6AO01DiYAAAAQhABAADbZQEA7YskAQDHJgAAyLtkybPKYQQAYgAAfet+AMEEYgQAQREBAADPqehvxtC0nsWapuhdYgEAQhIBAAAL3WIEAEETAQAA7UwUAQAABBUBAABiBABBFgEAAJ0EFwEAAJ1iBABBGAEAAJ1MGQEAAN1iBABBGgEAAO1MGwEAAN1iBABBHAEAAO1MHQEAACQBAA6TA8bQxZqm6QaAAOiBDoM4HgEAANDttJ3BBTiYAAAAQgABAAALOB4BAADQ7UwfAQAAYgUATCABAAC7GEwhAQAAuxhiBQCaTCIBAABiAQBMIwEAACQBAC6kAyoaMCdoGBINPz8wME6uTk4YDRwPIjo6PysmOisOYgYBygMBAgEEAQBWA8gEAAEAygQBACDMBAEBILADAwxhAQBhAAALz0wdAQAAx2IAAGUAAEMnAQAABCgBAADPnSYBAMhiAABiAQBCWwAAAAQpAQAAJAEAQyoBAAA4mAAAAEIAAQAAC2IAACYBAEwjAQAAJAEALqQDTwkhCCEIOjp7OjoOQwYBzAMBAAEFAQArAdYEAAEAqgMADGUAAEEsAQAAQS0BAABCAAEAAGUAAEEsAQAAQS4BAABCEAEAAM8kAQAlAQCkA3MBAw5DBgHOAwEAAQUBACsB1gQAAQCqAwAMZQAAQSwBAABBLgEAAEIAAQAAZQAAQSwBAABBLQEAAEIQAQAAzyQBACUBAKQDdwEDDmIGAdADAwADBAAAGwPeBAABAMgEAAEA2gEAAQA4mAAAAEIAAQAAC7NMEAEAANBMMAEAACQBAC6kA3sEAzohIQ5iBgHSAwICAgQDAksE4gQAAUDkBAABAJQEAAAAlgQBAGDOAxIAvAMJALIDBAxhAQA4mAAAAEIQAQAA3GUCAO2LJAEAxyYAAMjDQjMBAAC+ACQBAA44mAAAAEIAAQAAC2IBAEwjAQAAtEwEAQAAvQFMBQEAACQBAC6kA4IBCxJoGAAGFiE6KyEmDkMGAQABAQEFAwB3ApwEAAEApgQBACDOAwAA4gQAA5YEAQlhAADbz0ETAQAA7cdiAABCNAEAANwkAQCyquhbZQIAQhIBAAALYgAATBQBAAAENQEAAM9BNgEAAJ0ENwEAAJ3PQRYBAACdBBcBAACdz0EYAQAAnUwZAQAA289BGgEAAO1MGwEAANvPQRwBAADtTB0BAAAkAQAOKaQDhwEJEjBTMCvbREQYBkjhehSuR/U/DkMGAagDAAAAAgcAMgC+AwoAxAMNAMYDDgDIAw8AygMQANADEwDSAxQAC9tM3wAAANxM4gAAAN1M4wAAAN5M5AAAAF4EAEzlAAAAXgUATOgAAABeBgBM6QAAACikA5oBCQMIISEhISssKw==
|
1
JN/EXT/OPENJS/open/hula8_open.js
Normal file
1
JN/EXT/OPENJS/open/hula8_open.js
Normal file
File diff suppressed because one or more lines are too long
287
JN/EXT/OPENJS/open/huya_open.js
Normal file
287
JN/EXT/OPENJS/open/huya_open.js
Normal file
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
|||||||
import { Crypto, load, _ } from './lib/cat.js';
|
import { Crypto, load, _ } from './lib/cat.js';
|
||||||
|
|
||||||
let key = 'ikanbot';
|
let key = 'ikanbot';
|
||||||
let url = 'https://www.ikanbot.com';
|
let url = 'https://www.aikanbot.com';
|
||||||
let siteKey = '';
|
let siteKey = '';
|
||||||
let siteType = 0;
|
let siteType = 0;
|
||||||
|
|
||||||
|
278
JN/EXT/OPENJS/open/ikanbot_open2.js
Normal file
278
JN/EXT/OPENJS/open/ikanbot_open2.js
Normal file
@ -0,0 +1,278 @@
|
|||||||
|
import { Crypto, load, _ } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'ikanbot';
|
||||||
|
let url = 'https://www.ikanbot.com';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'referer': url
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getClass($) {
|
||||||
|
const nav = $('ul.nav-pills:eq(1) > li > a');
|
||||||
|
let tags = {
|
||||||
|
key: 'tag',
|
||||||
|
name: '标签',
|
||||||
|
value: _.map(nav, (n) => {
|
||||||
|
return { n: n.children[0].data, v: n.attribs.href };
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
tags['init'] = tags.value[0].v;
|
||||||
|
const title = $('title:first').text().split('-')[0].substring(2);
|
||||||
|
return { cls: { type_id: tags.value[0].v, type_name: title }, tags: [tags] };
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [];
|
||||||
|
let filterObj = {};
|
||||||
|
for (const cate of ['/hot/index-movie-热门.html', '/hot/index-tv-热门.html']) {
|
||||||
|
const html = await request(url + cate);
|
||||||
|
const $ = load(html);
|
||||||
|
const { cls, tags } = getClass($);
|
||||||
|
classes.push(cls);
|
||||||
|
filterObj[cls.type_id] = tags;
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {
|
||||||
|
const html = await request(url);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.v-list a.item');
|
||||||
|
var jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const img = $(item).find('img:first')[0];
|
||||||
|
return {
|
||||||
|
vod_id: item.attribs.href,
|
||||||
|
vod_name: img.attribs.alt,
|
||||||
|
vod_pic: jsBase + base64Encode(img.attribs['data-src']),
|
||||||
|
vod_remarks: '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
return JSON.stringify({
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const link = url + (extend.tag || tid).replace('.html', pg > 1 ? `-p-${pg}.html` : '.html');
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.v-list a.item');
|
||||||
|
var jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const img = $(item).find('img:first')[0];
|
||||||
|
return {
|
||||||
|
vod_id: item.attribs.href,
|
||||||
|
vod_name: img.attribs.alt,
|
||||||
|
vod_pic: jsBase + base64Encode(img.attribs['data-src']),
|
||||||
|
vod_remarks: '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div.page-more > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const html = await request(url + id);
|
||||||
|
const $ = load(html);
|
||||||
|
var jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||||
|
const detail = $('div.detail');
|
||||||
|
const remarks = $('span#line-tips').text();
|
||||||
|
let vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_pic: jsBase + base64Encode($('div.item-root > img')[0].attribs['data-src']),
|
||||||
|
vod_remarks: '',
|
||||||
|
vod_content: remarks || '',
|
||||||
|
vod_name: $(detail).find('h2').text().trim(),
|
||||||
|
vod_year: $(detail).find('h3:nth-child(3)').text(),
|
||||||
|
vod_area: $(detail).find('h3:nth-child(4)').text(),
|
||||||
|
vod_actor: $(detail).find('h3:nth-child(5)').text(),
|
||||||
|
};
|
||||||
|
const token = getToken($);
|
||||||
|
const res = await req(url + '/api/getResN?videoId=' + id.substring(id.lastIndexOf('/') + 1) + '&mtype=1&token=' + token, {
|
||||||
|
headers: {
|
||||||
|
Referer: 'play',
|
||||||
|
'User-Agent': UA,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const list = JSON.parse(res.content).data.list;
|
||||||
|
let playlist = {};
|
||||||
|
let arr = []
|
||||||
|
for (const l of list) {
|
||||||
|
const flagData = JSON.parse(l.resData);
|
||||||
|
for (const f of flagData) {
|
||||||
|
const from = f.flag;
|
||||||
|
const urls = f.url;
|
||||||
|
if (!from || !urls) continue;
|
||||||
|
if (playlist[from]) continue;
|
||||||
|
playlist[from] = urls;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (var key in playlist) {
|
||||||
|
if ('kuaikan' == key) {
|
||||||
|
arr.push({
|
||||||
|
flag: '快看',
|
||||||
|
url: playlist[key],
|
||||||
|
sort: 1
|
||||||
|
})
|
||||||
|
} else if ('bfzym3u8' == key) {
|
||||||
|
arr.push({
|
||||||
|
flag: '暴风',
|
||||||
|
url: playlist[key],
|
||||||
|
sort: 2
|
||||||
|
})
|
||||||
|
} else if ('ffm3u8' == key) {
|
||||||
|
arr.push({
|
||||||
|
flag: '非凡',
|
||||||
|
url: playlist[key],
|
||||||
|
sort: 3
|
||||||
|
})
|
||||||
|
} else if ('lzm3u8' == key) {
|
||||||
|
arr.push({
|
||||||
|
flag: '量子',
|
||||||
|
url: playlist[key],
|
||||||
|
sort: 4
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
arr.push({
|
||||||
|
flag: key,
|
||||||
|
url: playlist[key],
|
||||||
|
sort: 5
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr.sort((a, b) => a.sort - b.sort);
|
||||||
|
let playFrom = [];
|
||||||
|
let playList = [];
|
||||||
|
arr.map(val => {
|
||||||
|
playFrom.push(val.flag);
|
||||||
|
playList.push(val.url);
|
||||||
|
})
|
||||||
|
vod.vod_play_from = playFrom.join("$$$");
|
||||||
|
vod.vod_play_url = playList.join("$$$");
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getToken($) {
|
||||||
|
const currentId = $('#current_id').val();
|
||||||
|
let eToken = $('#e_token').val();
|
||||||
|
if (!currentId || !eToken) return '';
|
||||||
|
const idLength = currentId.length;
|
||||||
|
const subId = currentId.substring(idLength - 4, idLength);
|
||||||
|
let keys = [];
|
||||||
|
for (let i = 0; i < subId.length; i++) {
|
||||||
|
const curInt = parseInt(subId[i]);
|
||||||
|
const splitPos = curInt % 3 + 1;
|
||||||
|
keys[i] = eToken.substring(splitPos, splitPos + 8);
|
||||||
|
eToken = eToken.substring(splitPos + 8, eToken.length);
|
||||||
|
}
|
||||||
|
return keys.join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Encode(text) {
|
||||||
|
return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
async function proxy(segments, headers) {
|
||||||
|
let what = segments[0];
|
||||||
|
let url = base64Decode(segments[1]);
|
||||||
|
if (what == 'img') {
|
||||||
|
var resp = await req(url, {
|
||||||
|
buffer: 2,
|
||||||
|
headers: {
|
||||||
|
Referer: url,
|
||||||
|
'User-Agent': UA,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return JSON.stringify({
|
||||||
|
code: resp.code,
|
||||||
|
buffer: 2,
|
||||||
|
content: resp.content,
|
||||||
|
headers: resp.headers,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
code: 500,
|
||||||
|
content: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
if (pg <= 0 || typeof(pg) == 'undefined') pg = 1;
|
||||||
|
const html = await request(url + '/search?q=' + wd + '&p=' + pg);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.media');
|
||||||
|
var jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const a = $(item).find('a:first')[0];
|
||||||
|
const img = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('span.label')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: a.attribs.href,
|
||||||
|
vod_name: img.attribs.alt,
|
||||||
|
vod_pic: jsBase + base64Encode(img.attribs['data-src']),
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div.page-more > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
proxy: proxy,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
166
JN/EXT/OPENJS/open/jinm_open.js
Normal file
166
JN/EXT/OPENJS/open/jinm_open.js
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
import { Crypto, load, _, jinja2 } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'jinm';
|
||||||
|
let HOST = 'https://jinman.tv';
|
||||||
|
let url = '';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
let html = await request(HOST);
|
||||||
|
url = html.match(/<a href="(.*)" target=.*>点击进入</)[1];
|
||||||
|
console.debug('跟剧跳转地址 =====>' + url); // js_debug.log
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":1,"type_name":"电影"},{"type_id":2,"type_name":"追剧"},{"type_id":4,"type_name":"综艺"},{"type_id":3,"type_name":"动漫"},{"type_id":5,"type_name":"纪录片"},{"type_id":20,"type_name":"电影解说"}];
|
||||||
|
let filterObj = {
|
||||||
|
"1":[{"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/儿童"},{"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/加拿大"},{"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":"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"}]}],
|
||||||
|
"2":[{"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/惊悚"},{"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/其他"}]},{"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":"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"}]}],
|
||||||
|
"3":[{"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/其它/"}]},{"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/俄罗斯"},{"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":"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"}]}],
|
||||||
|
"4":[{"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/真人秀/"}]},{"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/俄罗斯"},{"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":"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"}]}],
|
||||||
|
"5":[{"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/其它/"}]},{"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/俄罗斯"},{"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":"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"}]}],
|
||||||
|
"20":[{"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/儿童"},{"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/加拿大"},{"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":"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"}]}]
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const link = url + '/index.php/vod/show' + (extend.area || '') + (extend.by || '/by/time') + (extend.class || '') + '/id/' + tid + (extend.lang || '') + (extend.letter || '') + '/page/' + pg + (extend.year || '') + '.html';//https://jinmantv.com/index.php/vod/show/area/%E7%BE%8E%E5%9B%BD/by/hits/class/%E5%8A%A8%E4%BD%9C/id/1/lang/%E8%8B%B1%E8%AF%AD/year/2022.html
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.main a.module-poster-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item)[0];
|
||||||
|
const k = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('div.module-item-note')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/.*?\/id\/(.*).html/g, '$1'),
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: k.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div#page > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
var html = await request( url + '/index.php/vod/detail/id/' + id + '.html');
|
||||||
|
var $ = load(html);
|
||||||
|
var vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.module-info-tag a').text(),
|
||||||
|
vod_actor: $('.module-info-items a').text(),
|
||||||
|
vod_pic: $('.video-cover img:first').attr('src'),
|
||||||
|
vod_remarks : $('.stui-content__detail p:nth-child(5)').text() || '',
|
||||||
|
vod_content: $('.show-desc p').text().trim().replace('如果你喜欢', '').replace('记得来金曼TV在线观看。', ''),
|
||||||
|
};
|
||||||
|
var playMap = {};
|
||||||
|
var tabs = $('div.module-tab-items-box div.module-tab-item span');
|
||||||
|
var playlists = $('div.module-play-list-content');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
var from = $(tab).text();
|
||||||
|
var list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
var title = $(it).text();
|
||||||
|
var playUrl = it.attribs.href.replace(/.*?\/id\/(.*).html/g, '$1');
|
||||||
|
if (title.length == 0) title = it.children[0].data.trim();
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push( title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
var urls = _.values(playMap);
|
||||||
|
var vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = url + '/index.php/vod/play/id/' + id + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const js = JSON.parse($('script:contains(player_)').html().replace('var player_aaaa=',''));
|
||||||
|
const playUrl = js.url;
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let data = await request(url + '/index.php/vod/search/page/' + pg + '/wd/' + wd + '.html');//https://fun.tvoled.net/index.php/vod/search/page/2/wd/%E6%88%91.html
|
||||||
|
const $ = load(data);
|
||||||
|
const items = $('div.module-items div.module-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a:first')[0];
|
||||||
|
const k = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('div.module-item-note')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/.*?\/id\/(.*).html/g, '$1'),
|
||||||
|
vod_name: k.attribs.alt,
|
||||||
|
vod_pic: k.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div#page > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
206
JN/EXT/OPENJS/open/jiohub_open.js
Normal file
206
JN/EXT/OPENJS/open/jiohub_open.js
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
import { Crypto, load, _, dayjs } from 'assets://js/lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'jiohub';
|
||||||
|
let url = 'https://jiohub.top';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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 cookie = {};
|
||||||
|
|
||||||
|
async function request(reqUrl, referer, mth, data, hd) {
|
||||||
|
const headers = {
|
||||||
|
'User-Agent': UA,
|
||||||
|
Cookie: _.map(cookie, (value, key) => {
|
||||||
|
return `${key}=${value}`;
|
||||||
|
}).join(';'),
|
||||||
|
};
|
||||||
|
if (referer) headers.referer = encodeURIComponent(referer);
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: mth || 'get',
|
||||||
|
headers: headers,
|
||||||
|
data: data,
|
||||||
|
postType: mth === 'post' ? 'form' : '',
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
const html = await request(url);
|
||||||
|
const $ = load(html);
|
||||||
|
const series = $('.nav-list a[href*=/video]');
|
||||||
|
let classes = _.map(series, (s) => {
|
||||||
|
let typeId = s.attribs['href'];
|
||||||
|
let typeName = typeId.match(/\/video\/(.*)\?/)[1];
|
||||||
|
typeName = decodeURIComponent(typeName);
|
||||||
|
return {
|
||||||
|
type_id: typeName,
|
||||||
|
type_name: typeName,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {
|
||||||
|
return '{}';
|
||||||
|
}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
let page = pg || 1;
|
||||||
|
if (page == 0) page = 1;
|
||||||
|
const link = url + '/video/' + tid + "?page=" + page + '&size=18';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.content-body > a');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const img = $(item).find('img:first')[0].attribs['src'];
|
||||||
|
const a = item.attribs['href'].match(/\/watch\/(.*)/)[1];
|
||||||
|
const n = ($(item).find('p.card-title')[0]).children[0].data;
|
||||||
|
let speed = ($(item).find('p.item-speed')[0]).children[0].data || '';
|
||||||
|
const score = ($(item).find('p.score')[0]).children[0].data || '';
|
||||||
|
if (speed == tid) speed = '';
|
||||||
|
return {
|
||||||
|
vod_id: a,
|
||||||
|
vod_name: n,
|
||||||
|
vod_pic: img,
|
||||||
|
vod_remarks: speed || score || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
let total = 18;
|
||||||
|
const pag = $('ui-pagination');
|
||||||
|
if (pag.length > 0) {
|
||||||
|
try {
|
||||||
|
total = parseInt(pag[0].attribs['total']);
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
page: page,
|
||||||
|
pagecount: _.ceil(total / 18),
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function stripHtmlTag(src) {
|
||||||
|
return src
|
||||||
|
.replace(/<\/?[^>]+(>|$)/g, '')
|
||||||
|
.replace(/&.{1,5};/g, '')
|
||||||
|
.replace(/\s{2,}/g, ' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const html = await request(url + '/watch/' + id);
|
||||||
|
const $ = load(html);
|
||||||
|
const detail = $('div.content-detail > p');
|
||||||
|
let vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_content: stripHtmlTag($('div.content-detail span.detail-sketch').html()).trim(),
|
||||||
|
};
|
||||||
|
for (const info of detail) {
|
||||||
|
const i = $(info).text().trim();
|
||||||
|
if (i.startsWith('地区:')) {
|
||||||
|
vod.vod_area = i.substring(3);
|
||||||
|
} else if (i.startsWith('年份:')) {
|
||||||
|
vod.vod_year = i.substring(3);
|
||||||
|
} else if (i.startsWith('类型:')) {
|
||||||
|
vod.vod_type = i.substring(3);
|
||||||
|
} else if (i.startsWith('导演:')) {
|
||||||
|
vod.vod_director = i.substring(3);
|
||||||
|
} else if (i.startsWith('主演:')) {
|
||||||
|
vod.vod_actor = i.substring(3);
|
||||||
|
} else if (i.startsWith('语言:')) {
|
||||||
|
vod.vod_lang = i.substring(3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const urls = html.match(/let urls = \"(.*)\";/)[1].replace(/_/g, '/').replace(/-/g, '+');
|
||||||
|
var key = Crypto.enc.Utf8.parse("cf2d1a-6a4d-9ef8");
|
||||||
|
var playlist = Crypto.AES.decrypt(urls, key, { iv: key, padding: Crypto.pad.Pkcs7 });
|
||||||
|
playlist = Crypto.enc.Utf8.stringify(playlist).split('\n');
|
||||||
|
vod.vod_play_from = 'JOJO';
|
||||||
|
vod.vod_play_url = playlist.join('#');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function playPid() {
|
||||||
|
var key = Crypto.enc.Utf8.parse('VSmJTRRE'+dayjs().format('YYYYMMDD'));
|
||||||
|
var iv = Crypto.enc.Hex.parse("00000000000000000000000000000000");
|
||||||
|
var pid = Crypto.AES.encrypt(dayjs().format('YYYY-MM-DD HH:mm'), key, { iv: iv, padding: Crypto.pad.Pkcs7 });
|
||||||
|
pid = pid.toString().replace(/\+/g, '-');
|
||||||
|
return pid;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: id + '?pid=' + playPid(),
|
||||||
|
header: {
|
||||||
|
'User-Agent': UA,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
let page = pg || 1;
|
||||||
|
if (page == 0) page = 1;
|
||||||
|
const link = url + '/video/search?q=' + wd + "&page=" + page + '&size=18&pid=' + playPid();
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.content-body > a');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const img = $(item).find('img:first')[0].attribs['src'];
|
||||||
|
const a = item.attribs['href'].match(/\/watch\/(.*)/)[1];
|
||||||
|
const n = ($(item).find('p.card-title')[0]).children[0].data;
|
||||||
|
let speed = ($(item).find('p.item-speed')[0]).children[0].data || '';
|
||||||
|
const score = ($(item).find('p.score')[0]).children[0].data || '';
|
||||||
|
if (speed == '电影') speed = '';
|
||||||
|
return {
|
||||||
|
vod_id: a,
|
||||||
|
vod_name: n,
|
||||||
|
vod_pic: img,
|
||||||
|
vod_remarks: speed || score || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
let total = 18;
|
||||||
|
const pag = $('ui-pagination');
|
||||||
|
if (pag.length > 0) {
|
||||||
|
try {
|
||||||
|
total = parseInt(pag[0].attribs['total']);
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
page: page,
|
||||||
|
pagecount: _.ceil(total / 18),
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
8
JN/EXT/OPENJS/open/kkys_open2.js
Normal file
8
JN/EXT/OPENJS/open/kkys_open2.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import{Crypto,dayjs,jinja2,_}from"assets://js/lib/cat.js";let key="kkys",url="https://api1.baibaipei.com:8899",device={},siteKey="",siteType=0;async function request(reqUrl,postData,agentSp,get){var ts=dayjs().valueOf().toString(),rand=randStr(32),sign=Crypto.MD5("abcdexxxdd2daklmn25129_"+ts+"_"+rand).toString().toLowerCase(),agentSp={"user-agent":agentSp||device.ua},sign=(reqUrl.includes("baibaipei")&&(agentSp["device-id"]=device.id,agentSp["push-token"]="",agentSp.sign=sign,agentSp.time=ts,agentSp.md5=rand,agentSp.version="2.1.3",agentSp["system-model"]=device.model,agentSp["system-brand"]=device.brand,agentSp["system-version"]=device.release),await req(reqUrl,{method:get?"get":"post",headers:agentSp,data:postData||{},postType:get?"":"form"}));return sign.content}async function init(cfg){siteKey=cfg.skey,siteType=cfg.stype;cfg=await local.get(key,"device");if(0<cfg.length)try{device=JSON.parse(cfg)}catch(error){}_.isEmpty(device)&&((device=randDevice()).id=randStr(33).toLowerCase(),device.ua="okhttp/4.1.0",await local.set(key,"device",JSON.stringify(device)))}async function home(filter){var classes=[],filterObj={};for(const type of JSON.parse(await request(url+"/api.php/Index/getTopVideoCategory")).data){var typeName=type.nav_name;if("推荐"!=typeName){var typeId=type.nav_type_id.toString();if(classes.push({type_id:typeId,type_name:typeName}),filter)try{var key,filterAll=[],filterData=JSON.parse(await request(url+"/api.php/Video/getFilterType",{type:typeId})).data;for(key of Object.keys(filterData)){var itemValues=filterData[key];"plot"===key&&(key="class");let typeExtendName="";switch(key){case"class":typeExtendName="类型";break;case"area":typeExtendName="地区";break;case"lang":typeExtendName="语言";break;case"year":typeExtendName="年代";break;case"sort":typeExtendName="排序"}if(0!==typeExtendName.length){var newTypeExtend={key:key,name:typeExtendName},newTypeExtendKV=[];for(let j=0;j<itemValues.length;j++){var name=itemValues[j],value="sort"===key?j+"":"全部"===name?"0":name;newTypeExtendKV.push({n:name,v:value})}newTypeExtend.init="sort"===key?"1":newTypeExtendKV[0].v,newTypeExtend.value=newTypeExtendKV,filterAll.push(newTypeExtend)}}_.isEmpty(filterAll)||(filterObj[typeId]=filterAll)}catch(e){console.log(e)}}}return JSON.stringify({class:classes,filters:filterObj})}async function homeVod(){var videos=[];for(const item of JSON.parse(await request(url+"/api.php/Index/getHomePage",{type:1,p:1})).data.video)if(0===item.title.styleType)for(const vObj of item.list)videos.push({vod_id:vObj.vod_id,vod_name:vObj.vod_name,vod_pic:vObj.vod_pic,vod_remarks:vObj.vod_remarks||vObj.vod_score||""});return JSON.stringify({list:videos})}async function category(tid,pg,filter,extend){0==pg&&(pg=1);var reqUrl=url+"/api.php/Video/getFilterVideoList",extend=JSON.parse(jinja2(`{
|
||||||
|
"type": "{{tid}}",
|
||||||
|
"p": "{{pg}}",
|
||||||
|
"area": "{{ext.area|default(0)}}",
|
||||||
|
"year": "{{ext.year|default(0)}}",
|
||||||
|
"sort": "{{ext.sort|default(0)}}",
|
||||||
|
"class": "{{ext.class|default(0)}}"
|
||||||
|
}`,{ext:extend,tid:tid,pg:pg})),tid=(console.log(extend),JSON.parse(await request(reqUrl,extend)).data),videos=[];for(const vod of tid.data)videos.push({vod_id:vod.vod_id,vod_name:vod.vod_name,vod_pic:vod.vod_pic,vod_remarks:vod.vod_remarks||vod.vod_score||""});return JSON.stringify({page:parseInt(tid.current_page),pagecount:parseInt(tid.last_page),limit:parseInt(tid.per_page),total:parseInt(tid.total),list:videos})}async function detail(id){var id=JSON.parse(await request(url+"/api.php/Video/getVideoInfo",{video_id:id})).data.video,vod={vod_id:id.vod_id,vod_name:id.vod_name,vod_pic:id.vod_pic,type_name:id.vod_class,vod_year:id.vod_year,vod_area:id.vod_area,vod_remarks:id.vod_remarks||"",vod_actor:id.vod_actor,vod_director:id.vod_director,vod_content:id.vod_content.trim()},playlist={};for(const item of id.vod_play){var from=item.playerForm;if("jp"!==from&&"xg"!==from){let urls=[];for(const u of item.url)urls.push(formatPlayUrl(vod.vod_name,u.title)+"$"+u.play_url);!playlist.hasOwnProperty(from)&&0<urls.length&&(playlist[from]=urls)}}parse=id.parse||[],vod.vod_play_from=_.keys(playlist).join("$$$");var vod_play_url=[];for(const urlist of _.values(playlist))vod_play_url.push(urlist.join("#"));return vod.vod_play_url=vod_play_url.join("$$$"),JSON.stringify({list:[vod]})}var parse=[];async function play(flag,id,flags){try{if((0<=id.indexOf("youku")||0<=id.indexOf("iqiyi")||0<=id.indexOf("v.qq.com")||0<=id.indexOf("pptv")||0<=id.indexOf("le.com")||0<=id.indexOf("1905.com")||0<=id.indexOf("mgtv"))&&0<parse.length)for(let index=0;index<parse.length;index++)try{var p=parse[index];let res=await req(p+id,{headers:{"user-agent":"okhttp/4.1.0"}});if((result=jsonParse(id,JSON.parse(res.content))).url)return result.parse=0,JSON.stringify(result)}catch(error){}if(0<=id.indexOf("jqq-")){var jqqHeader=await request(url+"/jqqheader.json",null,null,!0),jqqHeaders=JSON.parse(jqqHeader),ids=id.split("-"),jxJqq=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+ids[1]+"&episodeSid="+ids[2]+"&quality=LD",{headers:jqqHeaders}),jqqInfo=JSON.parse(jxJqq.content);if(jqqInfo.data.playInfo.url)return JSON.stringify({parse:0,playUrl:"",url:jqqInfo.data.playInfo.url})}var result,res=await request(url+"/video.php",{url:id});return(result=jsonParse(id,JSON.parse(res).data)).url?(result.parse=0,JSON.stringify(result)):JSON.stringify({parse:0,playUrl:"",url:id})}catch(e){return console.log(e),JSON.stringify({parse:0,url:id})}}async function search(wd,quick){var videos=[];for(const vod of JSON.parse(await request(url+"/api.php/Search/getSearch",{key:wd,type_id:0,p:1})).data.data)videos.push({vod_id:vod.vod_id,vod_name:vod.vod_name,vod_pic:vod.vod_pic,vod_remarks:vod.vod_remarks||vod.vod_score||""});return JSON.stringify({list:videos})}const charStr="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function randStr(len,withNum){for(var _str="",containsNum=void 0===withNum||withNum,i=0;i<len;i++){var idx=_.random(0,containsNum?charStr.length-1:charStr.length-11);_str+=charStr[idx]}return _str}function randDevice(){return{brand:"Huawei",model:"HUAWEI Mate 20",release:"10",buildId:randStr(3,!1).toUpperCase()+_.random(11,99)+randStr(1,!1).toUpperCase()}}function formatPlayUrl(src,name){return name.trim().replaceAll(src,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}function jsonParse(input,json){try{let url=json.url??"";if(!(url=url.startsWith("//")?"https:"+url:url).startsWith("http"))return{};let headers=json.headers||{};var ua=(json["user-agent"]||"").trim(),referer=(0<ua.length&&(headers["User-Agent"]=ua),(json.referer||"").trim());return 0<referer.length&&(headers.Referer=referer),_.keys(headers).forEach(hk=>{headers[hk]||delete headers[hk]}),{header:headers,url:url}}catch(error){console.log(error)}return{}}function __jsEvalReturn(){return{init:init,home:home,homeVod:homeVod,category:category,detail:detail,play:play,search:search}}export{__jsEvalReturn};
|
159
JN/EXT/OPENJS/open/klm_open.js
Normal file
159
JN/EXT/OPENJS/open/klm_open.js
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
import { Crypto, load, _, jinja2 } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'klm';
|
||||||
|
let HOST = 'https://www.ksksl.com';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":"dy","type_name":"电影"},{"type_id":"tv","type_name":"追剧"},{"type_id":"zy","type_name":"综艺"},{"type_id":"dm","type_name":"动漫"},{"type_id":"jl","type_name":"纪录片"}];
|
||||||
|
let filterObj = {
|
||||||
|
"dy":[{"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/法国"}]},{"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/农村"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||||
|
"tv":[{"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/法国"}]},{"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/都市"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||||
|
"zy":[{"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/法国"}]},{"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/资讯"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||||
|
"dm":[{"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/法国"}]},{"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/竞技"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||||
|
"jl":[{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"/area/中国大陆"},{"n":"日本","v":"/area/日本"},{"n":"美国","v":"/area/美国"},{"n":"国外","v":"/area/国外"},{"n":"其他","v":"/area/其他"}]},{"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/记录"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}]
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const link = HOST + '/show/' + tid + (extend.area || '') + (extend.by || '/by/time') + (extend.class || '') + '/page/' + pg + (extend.year || '') + '.html';//https://www.ksksl.com/show/dy/area/%E7%BE%8E%E5%9B%BD/class/%E5%8A%A8%E4%BD%9C/page/2.html
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('ul.dx-list > li');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a:first')[0];
|
||||||
|
const remarks = $($(item).find('span.vod_remarks')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/.*?\/voddetail\/(.*).html/g, '$1'),
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: it.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div.page_info> ul > a').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
var html = await request( HOST + '/voddetail/' + id + '.html');
|
||||||
|
var $ = load(html);
|
||||||
|
var vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.video-info-actor:eq(1)').text(),
|
||||||
|
vod_actor: $('.info-main a').text(),
|
||||||
|
vod_pic: $('.video-cover img:first').attr('src'),
|
||||||
|
vod_remarks : $('.stui-content__detail p:nth-child(5)').text() || '',
|
||||||
|
vod_content: $('.vod_content').text().trim(),
|
||||||
|
};
|
||||||
|
var playMap = {};
|
||||||
|
var tabs = $('div.player_info h2');
|
||||||
|
var playlists = $('div.play_li');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
var from = tab.children[0].data;
|
||||||
|
var list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
var title = it.children[0].data;
|
||||||
|
var playUrl = it.attribs.href.replace(/.*?\/vodplay\/(.*).html/g, '$1');
|
||||||
|
if (title.length == 0) title = it.children[0].data.trim();
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push( title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
var urls = _.values(playMap);
|
||||||
|
var vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = HOST + '/vodplay/' + id + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const js = JSON.parse($('script:contains(player_)').html().replace('var player_aaaa=',''));
|
||||||
|
const playUrl = js.url;
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let data = await request(HOST + '/ch/page/' + pg + '/wd/' + wd + '.html');//https://www.ksksl.com/ch/page/2/wd/%E6%88%91.html
|
||||||
|
const $ = load(data);
|
||||||
|
const items = $('ul.dx-list > li');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a:first')[0];
|
||||||
|
const remarks = $($(item).find('span.vod_remarks')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/\/voddetail\/(.*).html/g, '$1'),
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: it.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div.page_info > ul > a').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/kunyu77_open2.js
Normal file
1
JN/EXT/OPENJS/open/kunyu77_open2.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/kuwo_open.js
Normal file
1
JN/EXT/OPENJS/open/kuwo_open.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
//bbQ0FUT1BgGGt1d29fb3Blbi5qcyxhc3NldHM6Ly9qcy9saWIvY2F0LmpzHF9fanNFdmFsUmV0dXJuAl8Ga2V5CEhPU1QOc2l0ZUtleRBzaXRlVHlwZRJNT0JJTEVfVUEOcmVxdWVzdAhpbml0CGhvbWUOaG9tZVZvZBBjYXRlZ29yeQxkZXRhaWwIcGxheQxzZWFyY2gHd5Htd2dSJmh0dHA6Ly93YXBpLmt1d28uY26WAk1vemlsbGEvNS4wIChpUGhvbmU7IENQVSBpUGhvbmUgT1MgMTNfMl8zIGxpa2UgTWFjIE9TIFgpIEFwcGxlV2ViS2l0LzYwNS4xLjE1IChLSFRNTCwgbGlrZSBHZWNrbykgVmVyc2lvbi8xMy4wLjMgTW9iaWxlLzE1RTE0OCBTYWZhcmkvNjA0LjEMcmVxVXJsDmFnZW50U3AGcmVzBnJlcQxtZXRob2QUVXNlci1BZ2VudA5oZWFkZXJzDmNvbnRlbnQGY2ZnCHNrZXkKc3R5cGUMZmlsdGVyDmNsYXNzZXMSZmlsdGVyT2JqDnR5cGVfaWQJHHNgT/NgC3cSdHlwZV9uYW1lCR9Xc1QxcsVgCfRmGlm+fGlfDziXU5A7YMGIhHa6Th91CViNf1pTX1OQCytvK2/9j7tZ740JtlutXsVgH2ESc3RyaW5naWZ5DmZpbHRlcnMEe30GdGlkBHBnDGV4dGVuZAhsaW5rBGpvDHZpZGVvc1ovb3BlbmFwaS92MS9zaG9ydHBsYXkvbW9kdWxlTW9yZT9jdXJyZW50UGFnZT0UJm1vZHVsZUlkPQwmcm49MTIKcGFyc2UIZGF0YQhsaXN0DmZvckVhY2gQcGFyc2VJbnQIcGFnZRBuZXh0UGFnZRJwYWdlY291bnQQcGFnZVNpemUKbGltaXQKdG90YWwEaXQIcHVzaAZ1cmwMdm9kX2lkCnRpdGxlEHZvZF9uYW1lBmltZw52b2RfcGljGGN1cnJyZW50RGVzYxZ2b2RfcmVtYXJrcwRpZAZ2b2QOcGxheVVybFAvb3BlbmFwaS92MS9zaG9ydHBsYXkvdmlkZW9MaXN0P2FsYnVtSWQ9EnNob3J0aW5mbwpjb3ZlcgIjCVOQf5UoV79+GnZvZF9wbGF5X2Zyb20Ydm9kX3BsYXlfdXJsAiQSbXZwYXlpbmZvBnZpZAhmbGFn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
|
167
JN/EXT/OPENJS/open/l0l_open.js
Normal file
167
JN/EXT/OPENJS/open/l0l_open.js
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
import { Crypto, load, _ } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'dyxs';
|
||||||
|
let HOST = 'https://www.l0l.tv';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13E230 Safari/601.1';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":1,"type_name":"电影"},{"type_id":2,"type_name":"追剧"},{"type_id":3,"type_name":"综艺"},{"type_id":4,"type_name":"动漫"}];
|
||||||
|
let filterObj = {
|
||||||
|
"1":[{"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":"历史"}]},{"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":"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"2":[{"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":"其他"}]},{"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":"其他"}]},{"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","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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"3":[{"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":"求职"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"内地","v":"内地"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"}]},{"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","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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"4":[{"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":"其他"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"国产","v":"国产"},{"n":"日本","v":"日本"},{"n":"欧美","v":"欧美"},{"n":"其他","v":"其他"}]},{"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","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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}]
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const link = HOST + '/vodshow/' + tid + '-' + (extend.area || '') + '-' + (extend.by || 'time') + '-' + (extend.class || '') + '-----' + pg + '---' + (extend.year || '') + '/';//https://www.l0l.tv/vodshow/1-%E7%BE%8E%E5%9B%BD-hits-%E5%8A%A8%E4%BD%9C-%E8%8B%B1%E8%AF%AD-------2022.html
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.module-items div.module-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a')[0];
|
||||||
|
const k = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('div.module-item-text')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href,
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: k.attribs['data-src'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div#page > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const html = await request( HOST + id);
|
||||||
|
const $ = load(html);
|
||||||
|
const vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.video-info-aux a').text(),
|
||||||
|
vod_actor: $('.video-info-main a').text(),
|
||||||
|
vod_pic: $('.module-item-pic img:first').attr('data-src'),
|
||||||
|
vod_remarks : $('.stui-content__detail p:nth-child(5)').text() || '',
|
||||||
|
vod_content: $('.video-info-content span').text().trim(),
|
||||||
|
};
|
||||||
|
let playMap = {};
|
||||||
|
const tabs = $('div.module-tab-content > div.module-tab-item > span');
|
||||||
|
const playlists = $('div.sort-item');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
const from = tab.children[0].data;
|
||||||
|
let list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
const title = $(it).text();
|
||||||
|
const playUrl = it.attribs.href;
|
||||||
|
if (title.length == 0) title = it.children[0].data.trim();
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push( title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
const urls = _.values(playMap);
|
||||||
|
let vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = HOST + id;
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const js = JSON.parse($('script:contains(player_)').html().replace('var player_aaaa=',''));
|
||||||
|
const playUrl = unescape(js.url);
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Encode(text) {
|
||||||
|
return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let data = await request(HOST + '/vodsearch/' + wd + '----------' + pg + '---' + '.html');//https://www.l0l.tv/vodsearch/%E6%88%91----------2---.html
|
||||||
|
const $ = load(data);
|
||||||
|
const items = $('div.module-items div.module-search-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a')[0];
|
||||||
|
const k = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('div.video-serial')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href,
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: k.attribs['data-src'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div#page > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/lbgs_book_open.js
Normal file
1
JN/EXT/OPENJS/open/lbgs_book_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/lbgs_book_open2.js
Normal file
1
JN/EXT/OPENJS/open/lbgs_book_open2.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/lz_open.js
Normal file
1
JN/EXT/OPENJS/open/lz_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/mayiya_open.js
Normal file
1
JN/EXT/OPENJS/open/mayiya_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/mfk_open.js
Normal file
1
JN/EXT/OPENJS/open/mfk_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/mgys_open.js
Normal file
1
JN/EXT/OPENJS/open/mgys_open.js
Normal file
File diff suppressed because one or more lines are too long
191
JN/EXT/OPENJS/open/mgys_open2.js
Normal file
191
JN/EXT/OPENJS/open/mgys_open2.js
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
import { Crypto, load, _ } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'mgys';
|
||||||
|
let HOST = 'https://www.moguys.xyz';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, timeout = 60000) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
timeout: timeout,
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":"1","type_name":"电影"},{"type_id":"2","type_name":"电视剧"},{"type_id":"3","type_name":"动漫"},{"type_id":"4","type_name":"综艺"}];
|
||||||
|
let filterObj = {
|
||||||
|
"1":[{"key":"class","name":"剧情","init":"","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":"奇幻"}]},{"key":"area","name":"地区","init":"","value":[{"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":"年份","init":"","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","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"}]},{"key":"lang","name":"语言","init":"","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"法语","v":"法语"},{"n":"德语","v":"德语"},{"n":"其它","v":"其它"}]},{"key":"by","name":"排序","init":"","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"2":[{"key":"class","name":"剧情","init":"","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":"area","name":"地区","init":"","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"韩国","v":"韩国"},{"n":"美国","v":"美国"}]},{"key":"year","name":"年份","init":"","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","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"}]},{"key":"lang","name":"语言","init":"","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"by","name":"排序","init":"","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"3":[{"key":"class","name":"剧情","init":"","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":"area","name":"地区","init":"","value":[{"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":"年份","init":"","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","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"}]},{"key":"lang","name":"语言","init":"","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"by","name":"排序","init":"","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"4":[{"key":"class","name":"剧情","init":"","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":"area","name":"地区","init":"","value":[{"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":"年份","init":"","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","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"}]},{"key":"lang","name":"语言","init":"","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"by","name":"排序","init":"","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}]
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let page = '';
|
||||||
|
if (pg > 1) {
|
||||||
|
page = pg;
|
||||||
|
}
|
||||||
|
const link = HOST + '/vodshow/' + tid + '-' + (extend.area || '') + '-' + (extend.by || '') + '-' + (extend.class || '') + '-' + (extend.lang || '') + '----' + page + '---' + (extend.year || '') + '.html';//https://www.moguys.xyz/vodshow/1-%E5%A4%A7%E9%99%86-time-%E5%8A%A8%E4%BD%9C-%E5%9B%BD%E8%AF%AD----2---2023.html
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('.leo-video-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a:first')[0];
|
||||||
|
const img = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('div.leo-video-remark')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/.*?\/voddetail\/(.*).html/g, '$1'),
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: img.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('a.leo-page-elem:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const html = await request(HOST + '/voddetail/' + id + '.html');
|
||||||
|
const $ = load(html);
|
||||||
|
const vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('font.leo-col-6').text(),
|
||||||
|
vod_type: $('.leo-detail-media li:contains(分类:) a:eq(1)').text().trim(),
|
||||||
|
vod_year: $('.leo-detail-media li:contains(年代:) a:first').text().trim(),
|
||||||
|
vod_area: $('.leo-detail-media li:contains(地区:) a:first').text().trim(),
|
||||||
|
vod_director: $('.leo-detail-media li:contains(导演:)').text().trim().substring(3),
|
||||||
|
vod_actor: $('.leo-detail-media li:contains(主演:)').text().trim().substring(3),
|
||||||
|
vod_pic: $('.leo-detail-cover').attr('data-original'),
|
||||||
|
vod_remarks : $('.leo-detail-media h1:first').text().split('|')[1] || '',
|
||||||
|
vod_content: $('#leo-detail-info').text().trim().substring(5).trim(),
|
||||||
|
};
|
||||||
|
let playMap = {};
|
||||||
|
let tabs = $('.leo-source-cho li');
|
||||||
|
let playlists = $('.leo-play-num');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
let from = tab.children[1].data;
|
||||||
|
let list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
let title = 'HD';
|
||||||
|
if (it.children.length > 0) {
|
||||||
|
title = it.children[0].data.trim();
|
||||||
|
}
|
||||||
|
let playUrl = it.attribs.href.replace(/.*?\/vodplay\/(.*).html/g, '$1');
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push(title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
let urls = _.values(playMap);
|
||||||
|
let vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = HOST + '/vodplay/' + id + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
let json = $('script:contains(player_aaaa)').text().replace('var player_aaaa=','');
|
||||||
|
let js = JSON.parse(json);
|
||||||
|
let playUrl = js.url;
|
||||||
|
if (js.encrypt == 1) {
|
||||||
|
playUrl = unescape(playUrl);
|
||||||
|
} else if (js.encrypt == 2) {
|
||||||
|
playUrl = unescape(base64Decode(playUrl));
|
||||||
|
}
|
||||||
|
let playHtml = await request('https://player.moguys.work/player/ec.php?code=pl&if=1&url=' + playUrl);
|
||||||
|
json = playHtml.match(/let ConFig = {([\w\W]*)},box/)[1];
|
||||||
|
const jsConfig = JSON.parse('{' + json.trim() + '}');
|
||||||
|
playUrl = decryptUrl(jsConfig);
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
header: {
|
||||||
|
'User-Agent': UA,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function decryptUrl(jsConfig) {
|
||||||
|
const key = Crypto.enc.Utf8.parse('2890' + jsConfig.config.uid + 'tB959C');
|
||||||
|
const iv = Crypto.enc.Utf8.parse('2F131BE91247866E');
|
||||||
|
const mode = Crypto.mode.CBC;
|
||||||
|
const padding = Crypto.pad.Pkcs7;
|
||||||
|
const decrypted = Crypto.AES.decrypt(jsConfig.url, key, {
|
||||||
|
'iv': iv,
|
||||||
|
'mode': mode,
|
||||||
|
'padding': padding
|
||||||
|
});
|
||||||
|
const decryptedUrl = Crypto.enc.Utf8.stringify(decrypted);
|
||||||
|
return decryptedUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
let data = JSON.parse(await request(HOST + '/index.php/ajax/suggest?mid=1&limit=50&wd=' + wd)).list;
|
||||||
|
let videos = [];
|
||||||
|
for (const vod of data) {
|
||||||
|
videos.push({
|
||||||
|
vod_id: vod.id,
|
||||||
|
vod_name: vod.name,
|
||||||
|
vod_pic: vod.pic,
|
||||||
|
vod_remarks: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
144
JN/EXT/OPENJS/open/mimiju_open.js
Normal file
144
JN/EXT/OPENJS/open/mimiju_open.js
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
import { Crypto, load, _, jinja2 } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'mimiju';
|
||||||
|
let url = 'https://mimiju.com';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'Referer': url
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":20,"type_name":"短剧"}, {"type_id":21,"type_name":"电视剧"}];
|
||||||
|
let filterObj = {
|
||||||
|
"20": [{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||||
|
"21": [{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}]};
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0 || typeof(pg) == 'undefined') pg = 1;
|
||||||
|
const link = url + '/vodshow/' + tid + '--' + (extend.by || 'time') + '---' + '---' + pg + '---' + '.html';//https://mimiju.com/vodshow/20--hits---------.html
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('ul.hl-vod-list > li');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a:first')[0];
|
||||||
|
const remarks = $($(item).find('span.hl-lc-1')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/.*?\/voddetail\/(.*).html/g, '$1'),
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: url + it.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',};
|
||||||
|
});
|
||||||
|
const hasMore = $('ul.hl-page-wrap > li > a >span:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 20,
|
||||||
|
total: 20 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
var html = await request(url + '/voddetail/' + id + '.html');
|
||||||
|
var $ = load(html);
|
||||||
|
var vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.stui-content__detail p:first a').text(),
|
||||||
|
vod_actor: $('.stui-content__detail p:nth-child(3)').text().replace('主演:', ''),
|
||||||
|
vod_pic: $('.stui-content__thumb img:first').attr('data-original'),
|
||||||
|
vod_remarks: $('.stui-content__detail p:nth-child(5)').text() || '',
|
||||||
|
vod_content: $('span.detail-content').text().trim(),
|
||||||
|
};
|
||||||
|
var playMap = {};
|
||||||
|
var tabs = $('ul.hl-from-list > li >span');
|
||||||
|
var playlists = $('ul#hl-plays-list');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
var from = tab.children[0].data;
|
||||||
|
var list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
var title = it.children[0].data;
|
||||||
|
var playUrl = it.attribs.href.replace(/\/vodplay\/(.*).html/g, '$1');
|
||||||
|
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push(title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
var urls = _.values(playMap);
|
||||||
|
var vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = url + '/vodplay/' + id + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const js = JSON.parse($('script:contains(player_a)').html().replace('var player_aaaa=', ''));
|
||||||
|
const playUrl = js.url;
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick) {
|
||||||
|
let data = JSON.parse(await request(url + '/index.php/ajax/suggest?mid=1&wd=' + wd)).list;
|
||||||
|
let videos = [];
|
||||||
|
for (const vod of data) {
|
||||||
|
videos.push({
|
||||||
|
vod_id: vod.id,
|
||||||
|
vod_name: vod.name,
|
||||||
|
vod_pic: vod.pic,
|
||||||
|
vod_remarks: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import { Crypto, _ } from './lib/cat.js';
|
import { Crypto, _ } from './lib/cat.js';
|
||||||
|
|
||||||
let key = 'mtsp';
|
let key = 'mtsp';
|
||||||
let main = 'http://mt77.top';
|
let main = 'https://mt7886.sbs/';
|
||||||
let url = '';
|
let url = '';
|
||||||
let siteKey = '';
|
let siteKey = '';
|
||||||
let siteType = 0;
|
let siteType = 0;
|
||||||
|
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/mysp_open.js
Normal file
1
JN/EXT/OPENJS/open/mysp_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/ng_open2.js
Normal file
1
JN/EXT/OPENJS/open/ng_open2.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
207
JN/EXT/OPENJS/open/nkvod_open.js
Normal file
207
JN/EXT/OPENJS/open/nkvod_open.js
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
import { Crypto, load, _ } from 'assets://js/lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'nkvod';
|
||||||
|
let HOST = 'https://nkvod.pro';
|
||||||
|
let parseMap = {};
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
await initParseMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function initParseMap() {
|
||||||
|
const date = new Date();
|
||||||
|
const t = '' + date.getFullYear() + (date.getMonth() + 1) + date.getDate();
|
||||||
|
const js = await request(HOST + '/static/js/playerconfig.js?t=' + t);
|
||||||
|
try {
|
||||||
|
const jsEval = js + '\nMacPlayerConfig';
|
||||||
|
const playerList = eval(jsEval).player_list;
|
||||||
|
const players = _.values(playerList);
|
||||||
|
_.each(players, (item) => {
|
||||||
|
if (!item.ps || item.ps == '0') return;
|
||||||
|
if (_.isEmpty(item.parse)) return;
|
||||||
|
parseMap[item.show] = item.parse;
|
||||||
|
});
|
||||||
|
} catch(e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
const classes = [{'type_id':'1','type_name':'电影'},{'type_id':'2','type_name':'电视剧'},{'type_id':'3','type_name':'综艺'},{'type_id':'4','type_name':'动漫'}];
|
||||||
|
const filterObj = {
|
||||||
|
'1':[{'key':'cateId','name':'类型','init':'1','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'}]},{'key':'year','name':'年代','init':'','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','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'}]},{'key':'by','name':'排序','value':[{'n':'时间','v':'time'},{'n':'人气','v':'hits'},{'n':'评分','v':'score'}]}],
|
||||||
|
'2':[{'key':'cateId','name':'类型','init':'2','value':[{'n':'全部','v':'2'},{'n':'国产剧','v':'13'},{'n':'港台剧','v':'14'},{'n':'日韩剧','v':'15'},{'n':'欧美剧','v':'16'},{'n':'其他剧','v':'20'}]},{'key':'year','name':'年代','init':'','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','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'}]},{'key':'by','name':'排序','value':[{'n':'时间','v':'time'},{'n':'人气','v':'hits'},{'n':'评分','v':'score'}]}],
|
||||||
|
'3':[{'key':'year','name':'年代','init':'','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','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'}]},{'key':'by','name':'排序','value':[{'n':'时间','v':'time'},{'n':'人气','v':'hits'},{'n':'评分','v':'score'}]}],
|
||||||
|
'4':[{'key':'year','name':'年代','init':'','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','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'}]},{'key':'by','name':'排序','value':[{'n':'时间','v':'time'},{'n':'人气','v':'hits'},{'n':'评分','v':'score'}]}]
|
||||||
|
};
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const link = HOST + '/show/' + (extend.cateId || tid) + '--' + (extend.by || '') + '-' + (extend.class || '') + '--' + (extend.letter || '') + '---' + pg + '---' + (extend.year || '') + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('a.module-item');
|
||||||
|
const videos = _.map(items, (item) => {
|
||||||
|
const $item = $(item);
|
||||||
|
const a = $item;
|
||||||
|
const img = $item.find('img:first');
|
||||||
|
const remarks = $item.find('div.module-item-note').text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: a.attr('href').replace(/.*?\/detail\/(.*).html/g, '$1'),
|
||||||
|
vod_name: a.attr('title'),
|
||||||
|
vod_pic: img.attr('data-original'),
|
||||||
|
vod_remarks: remarks,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const limit = 72;
|
||||||
|
const hasMore = $('div#page > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: limit,
|
||||||
|
total: limit * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const html = await request(HOST + '/detail/' + id + '.html');
|
||||||
|
const $ = load(html);
|
||||||
|
const vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.module-info-tag a:eq(2)').text().trim(),
|
||||||
|
vod_year: $('.module-info-tag a:eq(0)').text().trim(),
|
||||||
|
vod_area: $('.module-info-tag a:eq(1)').text().trim(),
|
||||||
|
vod_actor: $('.module-info-item:contains(主演:)').text().trim().substring(3).replace(/\/$/, ''),
|
||||||
|
vod_director: $('.module-info-item:contains(导演:)').text().trim().substring(3).replace(/\/$/, ''),
|
||||||
|
vod_pic: $('.module-info-poster img:first').attr('data-original'),
|
||||||
|
vod_remarks : $('.module-info-item:contains(备注:)').text(),
|
||||||
|
vod_content: $('.module-info-introduction-content').text().trim(),
|
||||||
|
};
|
||||||
|
const playMap = {};
|
||||||
|
const tabs = $('.module-tab .module-tab-item span');
|
||||||
|
const playlists = $('.module-play-list');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
const $tab = $(tab);
|
||||||
|
const from = $tab.text().trim();
|
||||||
|
let list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
const $it = $(it);
|
||||||
|
let title = $it.find('span').text();
|
||||||
|
const playUrl = $it.attr('href');
|
||||||
|
if (_.isEmpty(title)) title = $it.text();
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push(title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
const urls = _.values(playMap);
|
||||||
|
const vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = HOST + id;
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const js = JSON.parse($('script:contains(player_)').html().replace('var player_aaaa=',''));
|
||||||
|
let playUrl = js.url;
|
||||||
|
if (js.encrypt == 1) {
|
||||||
|
playUrl = unescape(playUrl);
|
||||||
|
} else if (js.encrypt == 2) {
|
||||||
|
playUrl = unescape(base64Decode(playUrl));
|
||||||
|
}
|
||||||
|
const parseUrl = parseMap[flag];
|
||||||
|
if (parseUrl) {
|
||||||
|
const reqUrl = parseUrl + playUrl;
|
||||||
|
const parseHtml = await request(reqUrl);
|
||||||
|
const matches = parseHtml.match(/let ConFig = {([\w\W]*)},box/);
|
||||||
|
if (!_.isEmpty(matches)) {
|
||||||
|
const configJson = '{' + matches[1].trim() + '}';
|
||||||
|
const config = JSON.parse(configJson);
|
||||||
|
playUrl = decryptUrl(config);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
header: {
|
||||||
|
'User-Agent': UA,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function decryptUrl(jsConfig) {
|
||||||
|
const key = Crypto.enc.Utf8.parse('2890' + jsConfig.config.uid + 'tB959C');
|
||||||
|
const iv = Crypto.enc.Utf8.parse('GZ4JgN2BdSqVWJ1z');
|
||||||
|
const mode = Crypto.mode.CBC;
|
||||||
|
const padding = Crypto.pad.Pkcs7;
|
||||||
|
const decrypted = Crypto.AES.decrypt(jsConfig.url, key, {
|
||||||
|
iv: iv,
|
||||||
|
mode: mode,
|
||||||
|
padding: padding
|
||||||
|
});
|
||||||
|
const decryptedUrl = Crypto.enc.Utf8.stringify(decrypted);
|
||||||
|
return decryptedUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick) {
|
||||||
|
const data = JSON.parse(await request(HOST + '/index.php/ajax/suggest?mid=1&limit=50&wd=' + wd)).list;
|
||||||
|
const videos = _.map(data, (vod) => {
|
||||||
|
return {
|
||||||
|
vod_id: vod.id,
|
||||||
|
vod_name: vod.name,
|
||||||
|
vod_pic: vod.pic,
|
||||||
|
vod_remarks: '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
return JSON.stringify({
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/nmddd_open.js
Normal file
1
JN/EXT/OPENJS/open/nmddd_open.js
Normal file
File diff suppressed because one or more lines are too long
204
JN/EXT/OPENJS/open/pan99_open.js
Normal file
204
JN/EXT/OPENJS/open/pan99_open.js
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
import { Crypto, load, _ } from 'assets://js/lib/cat.js';
|
||||||
|
import { log } from './lib/utils.js';
|
||||||
|
import { initAli, detailContentVodPlayFrom, detailContentVodPlayUrl, playContent } from './lib/ali.js';
|
||||||
|
|
||||||
|
let siteKey = 'pan99';
|
||||||
|
let siteType = 0;
|
||||||
|
const siteUrl = 'https://pan99.xyz';
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl) {
|
||||||
|
const res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': siteUrl,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
try {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
await initAli(cfg.ext);
|
||||||
|
} catch (e) {
|
||||||
|
await log('init:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
const classes = [{'type_id':'dy','type_name':'电影'},{'type_id':'tv','type_name':'完结剧集'},{'type_id':'tv/geng','type_name':'追更剧集'},{'type_id':'tv/netflix','type_name':'Netflix'}];
|
||||||
|
const filterObj = {};
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
let page = '';
|
||||||
|
if (pg > 1) {
|
||||||
|
page = 'page/' + pg + '/';
|
||||||
|
}
|
||||||
|
const cateUrl = siteUrl + '/category/' + tid + '/' + page;
|
||||||
|
const html = await request(cateUrl);
|
||||||
|
const $ = load(html);
|
||||||
|
const list = $('.post-item');
|
||||||
|
const jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||||
|
const videos = _.map(list, (vid) => {
|
||||||
|
const $vid = $(vid);
|
||||||
|
const $link = $vid.find('.media-img');
|
||||||
|
const $entry = $vid.find('.entry-cat-dot');
|
||||||
|
return {
|
||||||
|
vod_id: decodeURIComponent($link.attr('href').replace(/.*\/\/.*\/(.*\/.*)\//g, '$1')),
|
||||||
|
vod_name: $link.attr('title'),
|
||||||
|
vod_pic: jsBase + base64Encode($link.attr("data-bg")),
|
||||||
|
vod_remarks: $entry.text().trim(),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const limit = 50;
|
||||||
|
const curPage = parseInt(pg);
|
||||||
|
const hasMore = videos.length == limit;
|
||||||
|
const pgCount = hasMore ? curPage + 1 : curPage;
|
||||||
|
return JSON.stringify({
|
||||||
|
page: curPage,
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: limit,
|
||||||
|
total: limit * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
const detailUrl = siteUrl + '/' + id;
|
||||||
|
const html = await request(detailUrl);
|
||||||
|
const $ = load(html);
|
||||||
|
const $cards = $('.card p a:not([href*=quark])');
|
||||||
|
const shareLinks = _.map($cards, (card) => {
|
||||||
|
return $(card).attr('href').trim();
|
||||||
|
});
|
||||||
|
const content = $('.post-content').text();
|
||||||
|
const jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||||
|
const vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('.post-title.mb-2.mb-lg-3').text().trim(),
|
||||||
|
vod_director: matchDetailContent(content, /◎导 演([\w\W]*?)◎/),
|
||||||
|
vod_actor: matchDetailContent(content, /◎演 员([\w\W]*?)◎/),
|
||||||
|
vod_year: matchDetailContent(content, /◎年 代(.*)/),
|
||||||
|
vod_area: matchDetailContent(content, /◎产 地(.*)/),
|
||||||
|
vod_type: matchDetailContent(content, /◎类 别(.*)/),
|
||||||
|
vod_pic: jsBase + base64Encode($('img.alignnone.size-medium').attr('src')),
|
||||||
|
vod_content: matchDetailContent(content, /◎简 介([\w\W]*)资源失效/),
|
||||||
|
vod_remarks: $('.meta-cat-dot').text().trim(),
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
vod.vod_play_from = detailContentVodPlayFrom(shareLinks);
|
||||||
|
vod.vod_play_url = await detailContentVodPlayUrl(shareLinks);
|
||||||
|
} catch (e) {
|
||||||
|
await log('detail:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function matchDetailContent(contentText, regex) {
|
||||||
|
const matches = contentText.match(regex);
|
||||||
|
if (!_.isEmpty(matches)) {
|
||||||
|
const index = matches.length - 1;
|
||||||
|
return matches[index].trim();
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Encode(text) {
|
||||||
|
return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64Decode(text) {
|
||||||
|
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
async function proxy(segments, headers) {
|
||||||
|
const what = segments[0];
|
||||||
|
const url = base64Decode(segments[1]);
|
||||||
|
if (what == 'img') {
|
||||||
|
const resp = await req(url, {
|
||||||
|
buffer: 2,
|
||||||
|
headers: {
|
||||||
|
'Referer': 'https://api.douban.com/',
|
||||||
|
'User-Agent': UA,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return JSON.stringify({
|
||||||
|
code: resp.code,
|
||||||
|
buffer: 2,
|
||||||
|
content: resp.content,
|
||||||
|
headers: resp.headers,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return JSON.stringify({
|
||||||
|
code: 500,
|
||||||
|
content: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
try {
|
||||||
|
return await playContent(flag, id, flags);
|
||||||
|
} catch (e) {
|
||||||
|
await log('play:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
let page = '';
|
||||||
|
if (pg > 1) {
|
||||||
|
page = 'page/' + pg + '/';
|
||||||
|
}
|
||||||
|
const searchUrl = siteUrl + '/' + page + '?cat=&s=' + encodeURIComponent(wd);
|
||||||
|
const html = await request(searchUrl);
|
||||||
|
const $ = load(html);
|
||||||
|
const list = $('.post-item');
|
||||||
|
const jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||||
|
const videos = _.map(list, (vid) => {
|
||||||
|
const $vid = $(vid);
|
||||||
|
const $link = $vid.find('.media-img');
|
||||||
|
const $entry = $vid.find('.entry-cat-dot');
|
||||||
|
return {
|
||||||
|
vod_id: decodeURIComponent($link.attr('href').replace(/.*\/\/.*\/(.*\/.*)\//g, '$1')),
|
||||||
|
vod_name: $link.attr('title'),
|
||||||
|
vod_pic: jsBase + base64Encode($link.attr("data-bg")),
|
||||||
|
vod_remarks: $entry.text().trim(),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const limit = 50;
|
||||||
|
const curPage = parseInt(pg);
|
||||||
|
const hasMore = videos.length == limit;
|
||||||
|
const pgCount = hasMore ? curPage + 1 : curPage;
|
||||||
|
return JSON.stringify({
|
||||||
|
page: curPage,
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: limit,
|
||||||
|
total: limit * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
proxy: proxy,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/panghu_open.js
Normal file
1
JN/EXT/OPENJS/open/panghu_open.js
Normal file
File diff suppressed because one or more lines are too long
150
JN/EXT/OPENJS/open/pansearch_open.js
Normal file
150
JN/EXT/OPENJS/open/pansearch_open.js
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
import { load, _ } from 'assets://js/lib/cat.js';
|
||||||
|
import { log } from './lib/utils.js';
|
||||||
|
import { initAli, detailContent, playContent } from './lib/ali.js';
|
||||||
|
|
||||||
|
let siteKey = 'pansearch';
|
||||||
|
let siteType = 0;
|
||||||
|
let siteUrl = 'https://www.pansearch.me';
|
||||||
|
let patternAli = /(https:\/\/www\.(aliyundrive|alipan)\.com\/s\/[^"]+)/
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function requestRaw(reqUrl, headers) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: headers || {
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': siteUrl,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function request(reqUrl) {
|
||||||
|
let resRaw = await requestRaw(reqUrl)
|
||||||
|
return resRaw.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
try {
|
||||||
|
siteKey = _.isEmpty(cfg.skey) ? '' : cfg.skey;
|
||||||
|
siteType = _.isEmpty(cfg.stype) ? '' : cfg.stype;
|
||||||
|
await initAli(cfg);
|
||||||
|
} catch (e) {
|
||||||
|
await log('init:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
return '{}';
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
return '{}';
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
try {
|
||||||
|
let matches = id.match(patternAli);
|
||||||
|
if (!_.isEmpty(matches)) return await detailContent(matches[0]);
|
||||||
|
return '';
|
||||||
|
} catch (e) {
|
||||||
|
await log('detail:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
try {
|
||||||
|
return await playContent(flag, id, flags);
|
||||||
|
} catch (e) {
|
||||||
|
await log('play:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const limit = 10;
|
||||||
|
let offsetParam = '';
|
||||||
|
const offset = (pg - 1) * limit;
|
||||||
|
if (offset > 0) {
|
||||||
|
offsetParam = '&offset=' + offset;
|
||||||
|
}
|
||||||
|
const html = await request(siteUrl);
|
||||||
|
const $ = load(html);
|
||||||
|
const script = $('script#__NEXT_DATA__')[0];
|
||||||
|
const data = script.children[0].data;
|
||||||
|
const buildId = JSON.parse(data).buildId;
|
||||||
|
const url = siteUrl + "/_next/data/" + buildId + "/search.json?keyword=" + encodeURIComponent(wd) + offsetParam + "&pan=aliyundrive";
|
||||||
|
const result = await requestRaw(url, getSearchHeader());
|
||||||
|
const json = JSON.parse(result.content).pageProps.data;
|
||||||
|
const total = json.total;
|
||||||
|
const videoIdSet = new Set();
|
||||||
|
const videos = [];
|
||||||
|
for (const item of json.data) {
|
||||||
|
const content = item.content;
|
||||||
|
const img = item.image || siteUrl + "/favicon.png";
|
||||||
|
const splits = content.split('\n');
|
||||||
|
if (_.isEmpty(splits)) continue;
|
||||||
|
if (content.includes('1、')) {
|
||||||
|
for (const line of splits) {
|
||||||
|
if (_.isEmpty(line)) continue;
|
||||||
|
const vodId = parseVideo(line, videoIdSet);
|
||||||
|
if (!vodId) continue;
|
||||||
|
videos.push({
|
||||||
|
vod_id: vodId,
|
||||||
|
vod_name: line.replaceAll(/<\/?[^>]+>/g, "").replace(/[0-9]*、/g, '').replace(/:http.*/g, ''),
|
||||||
|
vod_pic: img,
|
||||||
|
vod_remarks: item.time
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const vodId = parseVideo(content, videoIdSet);
|
||||||
|
if (!vodId) continue;
|
||||||
|
videos.push({
|
||||||
|
vod_id: vodId,
|
||||||
|
vod_name: splits[0].replaceAll(/<\/?[^>]+>/g, "").replace('名称:', ''),
|
||||||
|
vod_pic: img,
|
||||||
|
vod_remarks: item.time
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const pgCount = parseInt(total / limit) + 1;
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: limit,
|
||||||
|
total: total,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseVideo(content, videoIdSet) {
|
||||||
|
const matches = content.match(patternAli);
|
||||||
|
if (_.isEmpty(matches)) return;
|
||||||
|
const vodId = matches[1];
|
||||||
|
if (videoIdSet.has(vodId)) return;
|
||||||
|
videoIdSet.add(vodId);
|
||||||
|
return vodId;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSearchHeader() {
|
||||||
|
return {
|
||||||
|
"x-nextjs-data": "1",
|
||||||
|
"Referer": siteUrl,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
123
JN/EXT/OPENJS/open/pansou_open.js
Normal file
123
JN/EXT/OPENJS/open/pansou_open.js
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
import { load, _ } from 'assets://js/lib/cat.js';
|
||||||
|
import { log } from './lib/utils.js';
|
||||||
|
import { initAli, detailContent, playContent } from './lib/ali.js';
|
||||||
|
|
||||||
|
let siteKey = 'pansou';
|
||||||
|
let siteType = 0;
|
||||||
|
let siteUrl = 'https://www.alipansou.com';
|
||||||
|
let patternAli = /(https:\/\/www\.(aliyundrive|alipan)\.com\/s\/[^"]+)/
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function requestRaw(reqUrl, headers, redirect) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: headers || {
|
||||||
|
'User-Agent': UA,
|
||||||
|
'Referer': siteUrl,
|
||||||
|
},
|
||||||
|
redirect: redirect,
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function request(reqUrl) {
|
||||||
|
let resRaw = await requestRaw(reqUrl);
|
||||||
|
return resRaw.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
try {
|
||||||
|
siteKey = _.isEmpty(cfg.skey) ? '' : cfg.skey;
|
||||||
|
siteType = _.isEmpty(cfg.stype) ? '' : cfg.stype;
|
||||||
|
await initAli(cfg);
|
||||||
|
} catch (e) {
|
||||||
|
await log('init:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
return '{}';
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
return '{}';
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
try {
|
||||||
|
let matches = id.match(patternAli);
|
||||||
|
if (!_.isEmpty(matches)) return await detailContent(matches[0]);
|
||||||
|
let url = siteUrl + id.replace("/s/", "/cv/");
|
||||||
|
const data = await requestRaw(url, getHeaders(id), 0);
|
||||||
|
const headers = data.headers;
|
||||||
|
const resp = data.content;
|
||||||
|
if (headers.hasOwnProperty('location')) {
|
||||||
|
url = headers['location'].replace('/redirect?visit=', 'https://www.aliyundrive.com/s/');
|
||||||
|
return await detailContent(url);
|
||||||
|
} else if (!_.isEmpty(resp)) {
|
||||||
|
const $ = load(resp);
|
||||||
|
url = $('a:first').attr('href').replace('/redirect?visit=', 'https://www.aliyundrive.com/s/');
|
||||||
|
return await detailContent(url);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
} catch (e) {
|
||||||
|
await log('detail:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHeaders(id) {
|
||||||
|
return {
|
||||||
|
"User-Agent": UA,
|
||||||
|
"Referer": siteUrl + id,
|
||||||
|
"_bid": "6d14a5dd6c07980d9dc089a693805ad8",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
try {
|
||||||
|
return await playContent(flag, id, flags);
|
||||||
|
} catch (e) {
|
||||||
|
await log('play:' + e.message + ' line:' + e.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const limit = 10;
|
||||||
|
const html = await request(siteUrl + "/search?k=" + encodeURIComponent(wd) + "&page=" + pg + "&s=0&t=-1");
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('van-row > a');
|
||||||
|
const videos = _.map(items, (item) => {
|
||||||
|
let title = $(item).find('template:first').text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: item.attribs.href,
|
||||||
|
vod_name: title,
|
||||||
|
vod_pic: 'https://inews.gtimg.com/newsapp_bt/0/13263837859/1000',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const pageCount = $('van-pagination').attr('page-count') || pg;
|
||||||
|
const pgCount = parseInt(pageCount);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: limit,
|
||||||
|
total: limit * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/push_open.js
Normal file
1
JN/EXT/OPENJS/open/push_open.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
(function(_0x5502de,_0x28ce57){const _0x3d8968=_0x1d20,_0x3846a8=_0x5502de();while(!![]){try{const _0x6da132=-parseInt(_0x3d8968(0xff))/0x1+-parseInt(_0x3d8968(0xec))/0x2+-parseInt(_0x3d8968(0xf2))/0x3+parseInt(_0x3d8968(0xea))/0x4*(-parseInt(_0x3d8968(0xf9))/0x5)+-parseInt(_0x3d8968(0xf6))/0x6+parseInt(_0x3d8968(0xf5))/0x7+parseInt(_0x3d8968(0xe4))/0x8;if(_0x6da132===_0x28ce57)break;else _0x3846a8['push'](_0x3846a8['shift']());}catch(_0x3bf5ae){_0x3846a8['push'](_0x3846a8['shift']());}}}(_0x23d9,0x242d0));const _0x989826=(function(){let _0x48deae=!![];return function(_0x299763,_0x2277f6){const _0x5f5716=_0x48deae?function(){if(_0x2277f6){const _0x217adc=_0x2277f6['apply'](_0x299763,arguments);return _0x2277f6=null,_0x217adc;}}:function(){};return _0x48deae=![],_0x5f5716;};}()),_0x17f8da=_0x989826(this,function(){const _0x34e035=_0x1d20;let _0x313e96;try{const _0x1ace3f=Function(_0x34e035(0xf4)+_0x34e035(0xeb)+(_0x34e035(0x100)+'ctor(\x22retu'+_0x34e035(0xef)+'\x20)')+');');_0x313e96=_0x1ace3f();}catch(_0x45e725){_0x313e96=window;}const _0x3fb422=_0x313e96[_0x34e035(0xf8)]=_0x313e96[_0x34e035(0xf8)]||{},_0xece77b=['log',_0x34e035(0xe6),_0x34e035(0xf1),_0x34e035(0xfc),_0x34e035(0x108),'table',_0x34e035(0xf3)];for(let _0x33f9b0=0x0;_0x33f9b0<_0xece77b['length'];_0x33f9b0++){const _0x55a52a=_0x989826[_0x34e035(0x103)+'r'][_0x34e035(0xed)][_0x34e035(0xe5)](_0x989826),_0x49eb74=_0xece77b[_0x33f9b0],_0x1e3c4b=_0x3fb422[_0x49eb74]||_0x55a52a;_0x55a52a[_0x34e035(0xf7)]=_0x989826[_0x34e035(0xe5)](_0x989826),_0x55a52a[_0x34e035(0xf0)]=_0x1e3c4b[_0x34e035(0xf0)][_0x34e035(0xe5)](_0x1e3c4b),_0x3fb422[_0x49eb74]=_0x55a52a;}});_0x17f8da();import{_}from'assets://js/lib/cat.js';import*as _0x210159 from'./lib/ali.js';import*as _0x432f53 from'./lib/quark.js';let siteKey='push_agent',siteType=0x0;async function init(_0x19d74a){const _0x523839=_0x1d20;try{siteKey=_0x19d74a[_0x523839(0xe3)],siteType=_0x19d74a['stype'];let _0x1aff0a=_0x19d74a['ext'];typeof _0x1aff0a==_0x523839(0xfa)&&_0x1aff0a[_0x523839(0xee)]('{')&&(_0x1aff0a=JSON['parse'](_0x1aff0a));let _0x13aacd=_0x1aff0a[_0x523839(0x102)],_0x4e1794=_0x1aff0a[_0x523839(0xfd)];await _0x210159['initAli'](_0x13aacd),await _0x432f53[_0x523839(0xe9)](_0x4e1794);}catch(_0x333994){console['debug'](_0x333994);}}async function support(_0x348c76){const _0x300331=_0x1d20;if(!_['isEmpty'](_0x348c76[_0x300331(0x101)](_0x210159[_0x300331(0x107)]))||!_[_0x300331(0xe8)](_0x348c76[_0x300331(0x101)](_0x432f53[_0x300331(0xe7)+'rn'])))return!![];return![];}async function detail(_0x3af4de){const _0x2bf575=_0x1d20;if(!_['isEmpty'](_0x3af4de[_0x2bf575(0x101)](_0x210159[_0x2bf575(0x107)])))return await _0x210159[_0x2bf575(0xe1)+_0x2bf575(0xe2)](_0x3af4de);if(!_[_0x2bf575(0xe8)](_0x3af4de[_0x2bf575(0x101)](_0x432f53[_0x2bf575(0xe7)+'rn'])))return await _0x432f53['detailCont'+_0x2bf575(0xe2)](_0x3af4de);return'{}';}function _0x23d9(){const _0x32888f=['265VXRnLB','string','detail','error','cookie','init','196130ZNashF','{}.constru','match','token','constructo','search','play','support','aliPattern','exception','detailCont','ent','skey','5549256yMZltv','bind','warn','quarkPatte','isEmpty','initQuark','20164Diufks','nction()\x20','122892uhCkuX','prototype','startsWith','rn\x20this\x22)(','toString','info','212574VZCmlY','trace','return\x20(fu','1147909UjKeSz','683166hmvbbu','__proto__','console'];_0x23d9=function(){return _0x32888f;};return _0x23d9();}function _0x1d20(_0x4c5477,_0x30049e){const _0x392059=_0x23d9();return _0x1d20=function(_0x17f8da,_0x989826){_0x17f8da=_0x17f8da-0xe1;let _0x14831b=_0x392059[_0x17f8da];return _0x14831b;},_0x1d20(_0x4c5477,_0x30049e);}async function play(_0x30754e,_0x35a4ec,_0x31bae4){if(_0x30754e['indexOf']('夸克')>-0x1)return await _0x432f53['playConten'+'t'](_0x30754e,_0x35a4ec,_0x31bae4);return await _0x210159['playConten'+'t'](_0x30754e,_0x35a4ec,_0x31bae4);}async function search(_0x3bf45f,_0x17ece4){return'{}';}export function __jsEvalReturn(){const _0x5514bd=_0x1d20,_0x8f8cb={};return _0x8f8cb[_0x5514bd(0xfe)]=init,_0x8f8cb[_0x5514bd(0x106)]=support,_0x8f8cb[_0x5514bd(0xfb)]=detail,_0x8f8cb[_0x5514bd(0x105)]=play,_0x8f8cb[_0x5514bd(0x104)]=search,_0x8f8cb;}
|
160
JN/EXT/OPENJS/open/qfys_open.js
Normal file
160
JN/EXT/OPENJS/open/qfys_open.js
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
import { Crypto, load, _, jinja2 } from './lib/cat.js';
|
||||||
|
|
||||||
|
let key = 'qfys';
|
||||||
|
let HOST = 'https://fun.tvoled.net';
|
||||||
|
let siteKey = '';
|
||||||
|
let siteType = 0;
|
||||||
|
|
||||||
|
const 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';
|
||||||
|
|
||||||
|
async function request(reqUrl, agentSp) {
|
||||||
|
let res = await req(reqUrl, {
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': agentSp || UA,
|
||||||
|
'Referer': HOST
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return res.content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cfg = {skey: siteKey, ext: extend}
|
||||||
|
async function init(cfg) {
|
||||||
|
siteKey = cfg.skey;
|
||||||
|
siteType = cfg.stype;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function home(filter) {
|
||||||
|
let classes = [{"type_id":1,"type_name":"电影"},{"type_id":2,"type_name":"追剧"},{"type_id":3,"type_name":"综艺"},{"type_id":4,"type_name":"动漫"}];
|
||||||
|
let filterObj = {
|
||||||
|
"1":[{"key":"cateId","name":"类型","value":[{"n":"全部","v":"1"},{"n":"灾难片","v":"20"},{"n":"冒险片","v":"21"},{"n":"同性片","v":"22"},{"n":"惊悚片","v":"23"},{"n":"悬疑片","v":"25"},{"n":"经典片","v":"26"},{"n":"犯罪片","v":"27"},{"n":"动作片","v":"6"},{"n":"喜剧片","v":"7"},{"n":"爱情片","v":"8"},{"n":"科幻片","v":"9"},{"n":"恐怖片","v":"10"},{"n":"剧情片","v":"11"},{"n":"战争片","v":"12"}]},{"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/儿童"}]},{"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":"year","name":"年份","value":[{"n":"全部","v":""},{"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":"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"}]},{"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":"24"},{"n":"国产剧","v":"13"},{"n":"港台剧","v":"14"},{"n":"日韩剧","v":"15"},{"n":"欧美剧","v":"16"}]},{"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/短剧"}]},{"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":"year","name":"年份","value":[{"n":"全部","v":""},{"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":"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||||
|
"3":[{"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/求职"}]},{"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/其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"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":"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||||
|
"4":[{"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/其他"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"国产","v":"/area/国产"},{"n":"日本","v":"/area/日本"},{"n":"欧美","v":"/area/欧美"},{"n":"其他","v":"/area/其他"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"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":"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"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}]
|
||||||
|
};
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
class: classes,
|
||||||
|
filters: filterObj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function homeVod() {}
|
||||||
|
|
||||||
|
async function category(tid, pg, filter, extend) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
const link = HOST + '/index.php/vod/show' + (extend.area || '') + (extend.by || '/by/time') + (extend.class || '') + '/id/' + (extend.cateId || tid) + '/page/' + pg + (extend.year || '') + '.html';//https://fun.tvoled.net/index.php/vod/show/area/%E5%A4%A7%E9%99%86/by/hits/class/%E5%8F%A4%E8%A3%85/id/13/year/2022.html
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const items = $('div.module a.module-poster-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item)[0];
|
||||||
|
const k = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('div.module-item-note')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/.*?\/id\/(.*).html/g, '$1'),
|
||||||
|
vod_name: it.attribs.title,
|
||||||
|
vod_pic: k.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div#page > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function detail(id) {
|
||||||
|
var html = await request( HOST + '/index.php/vod/detail/id/' + id + '.html');
|
||||||
|
var $ = load(html);
|
||||||
|
var vod = {
|
||||||
|
vod_id: id,
|
||||||
|
vod_name: $('h1:first').text().trim(),
|
||||||
|
vod_type: $('.module-info-tag a').text(),
|
||||||
|
vod_actor: $('.module-info-items a').text(),
|
||||||
|
vod_pic: $('.video-cover img:first').attr('src'),
|
||||||
|
vod_remarks : $('.stui-content__detail p:nth-child(5)').text() || '',
|
||||||
|
vod_content: $('.show-desc p').text().trim(),
|
||||||
|
};
|
||||||
|
var playMap = {};
|
||||||
|
var tabs = $('div.module-tab-items-box div.module-tab-item');
|
||||||
|
var playlists = $('div.module-play-list-content');
|
||||||
|
_.each(tabs, (tab, i) => {
|
||||||
|
var from = $(tab).text();
|
||||||
|
var list = playlists[i];
|
||||||
|
list = $(list).find('a');
|
||||||
|
_.each(list, (it) => {
|
||||||
|
var title = $(it).text();
|
||||||
|
var playUrl = it.attribs.href.replace(/.*?\/id\/(.*).html/g, '$1');
|
||||||
|
if (title.length == 0) title = it.children[0].data.trim();
|
||||||
|
if (!playMap.hasOwnProperty(from)) {
|
||||||
|
playMap[from] = [];
|
||||||
|
}
|
||||||
|
playMap[from].push( title + '$' + playUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
vod.vod_play_from = _.keys(playMap).join('$$$');
|
||||||
|
var urls = _.values(playMap);
|
||||||
|
var vod_play_url = _.map(urls, (urlist) => {
|
||||||
|
return urlist.join('#');
|
||||||
|
});
|
||||||
|
vod.vod_play_url = vod_play_url.join('$$$');
|
||||||
|
return JSON.stringify({
|
||||||
|
list: [vod],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function play(flag, id, flags) {
|
||||||
|
const link = HOST + '/index.php/vod/play/id/' + id + '.html';
|
||||||
|
const html = await request(link);
|
||||||
|
const $ = load(html);
|
||||||
|
const js = JSON.parse($('script:contains(player_)').html().replace('var player_aaaa=',''));
|
||||||
|
const playUrl = js.url;
|
||||||
|
return JSON.stringify({
|
||||||
|
parse: 0,
|
||||||
|
url: playUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function search(wd, quick, pg) {
|
||||||
|
if (pg <= 0) pg = 1;
|
||||||
|
let data = await request(HOST + '/index.php/vod/search/page/' + pg + '/wd/' + wd + '.html');//https://fun.tvoled.net/index.php/vod/search/page/2/wd/%E6%88%91.html
|
||||||
|
const $ = load(data);
|
||||||
|
const items = $('div.module-items div.module-item');
|
||||||
|
let videos = _.map(items, (item) => {
|
||||||
|
const it = $(item).find('a:first')[0];
|
||||||
|
const k = $(item).find('img:first')[0];
|
||||||
|
const remarks = $($(item).find('div.module-item-note')[0]).text().trim();
|
||||||
|
return {
|
||||||
|
vod_id: it.attribs.href.replace(/.*?\/id\/(.*).html/g, '$1'),
|
||||||
|
vod_name: k.attribs.alt,
|
||||||
|
vod_pic: k.attribs['data-original'],
|
||||||
|
vod_remarks: remarks || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const hasMore = $('div#page > a:contains(下一页)').length > 0;
|
||||||
|
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||||
|
return JSON.stringify({
|
||||||
|
page: parseInt(pg),
|
||||||
|
pagecount: pgCount,
|
||||||
|
limit: 24,
|
||||||
|
total: 24 * pgCount,
|
||||||
|
list: videos,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function __jsEvalReturn() {
|
||||||
|
return {
|
||||||
|
init: init,
|
||||||
|
home: home,
|
||||||
|
homeVod: homeVod,
|
||||||
|
category: category,
|
||||||
|
detail: detail,
|
||||||
|
play: play,
|
||||||
|
search: search,
|
||||||
|
};
|
||||||
|
}
|
1
JN/EXT/OPENJS/open/rbk_open.js
Normal file
1
JN/EXT/OPENJS/open/rbk_open.js
Normal file
File diff suppressed because one or more lines are too long
1
JN/EXT/OPENJS/open/rbzj_open.js
Normal file
1
JN/EXT/OPENJS/open/rbzj_open.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user