mirror of
https://github.com/lxhfans/cat.git
synced 2025-10-26 00:22:27 +00:00
Add files via upload
This commit is contained in:
149
js/1080kk_open.js
Normal file
149
js/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,
|
||||
};
|
||||
}
|
||||
149
js/108kk_open.js
Normal file
149
js/108kk_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,
|
||||
};
|
||||
}
|
||||
1
js/18av_open.js
Normal file
1
js/18av_open.js
Normal file
File diff suppressed because one or more lines are too long
171
js/1free_open.js
Normal file
171
js/1free_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,
|
||||
};
|
||||
}
|
||||
261
js/230ts_book_open.js
Normal file
261
js/230ts_book_open.js
Normal file
@@ -0,0 +1,261 @@
|
||||
// 网站搜索异常
|
||||
import { load, _ } from './lib/cat.js';
|
||||
|
||||
let key = '爱上你听书网';
|
||||
let HOST = 'https://wap.230ts.net';
|
||||
let siteKey = '';
|
||||
let siteType = 0;
|
||||
const MOBILE_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, agentSp) {
|
||||
let res = await req(reqUrl, {
|
||||
method: 'get',
|
||||
headers: {
|
||||
'User-Agent': agentSp || MOBILE_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) {
|
||||
const html = await request(HOST + '/sort/');
|
||||
const $ = load(html);
|
||||
let filterObj = {};
|
||||
const class_parse = $('dl.pd-class:first > dd > a[href*=sort]');
|
||||
let classes = [];
|
||||
classes = _.map(class_parse, (cls) => {
|
||||
let typeId = cls.attribs['href'];
|
||||
typeId = typeId.replace(/.*?\/sort\/(.*).html/g, '$1');
|
||||
return {
|
||||
type_id: typeId,
|
||||
type_name: cls.children[0].data,
|
||||
};
|
||||
});
|
||||
const sortName = ['玄幻有声', '灵异有声', '综艺娱乐', '长篇评书', '都市有声', '军事有声', '职场有声', '其他有声'];
|
||||
classes = _.sortBy(classes, (c) => {
|
||||
const index = sortName.indexOf(c.type_name);
|
||||
return index === -1 ? sortName.length : index;
|
||||
});
|
||||
return JSON.stringify({
|
||||
class: classes,
|
||||
filters: filterObj,
|
||||
});
|
||||
}
|
||||
|
||||
async function homeVod() {
|
||||
const link = HOST + '/top/lastupdate/1.html';
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const items = $('ul.list-ul > li');
|
||||
let videos = _.map(items, (item) => {
|
||||
const it = $(item).find('a:first')[0];
|
||||
const img = $(item).find('img:first')[0];
|
||||
const remarks = $($(item).find('p.module-slide-author')[0]).text().trim();
|
||||
return {
|
||||
vod_id: it.attribs.href.replace(/.*?\/tingshu\/(.*)/g, '$1'),
|
||||
vod_name: it.attribs.title.replace('有声小说',''),
|
||||
vod_pic: HOST + img.attribs['data-original'],
|
||||
vod_remarks: remarks || '',
|
||||
};
|
||||
});
|
||||
return JSON.stringify({
|
||||
list: videos,
|
||||
});
|
||||
}
|
||||
|
||||
async function category(tid, pg, filter, extend) {
|
||||
if (pg <= 0) pg = 1;
|
||||
const link = HOST + '/sort/' + tid +'/' + (`${pg}`) + '.html';
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const items = $('ul.book-ol > li');
|
||||
let videos = _.map(items, (item) => {
|
||||
const it = $(item).find('a:first')[0];
|
||||
const img = $(item).find('img:first')[0];
|
||||
const remarks = $($(item).find('div.book-meta')[0]).text().trim();
|
||||
return {
|
||||
book_id: it.attribs.href.replace(/.*?\/tingshu\/(.*)/g, '$1'),
|
||||
book_name: it.attribs.title.replace('有声小说',''),
|
||||
book_pic: HOST + img.attribs['data-original'],
|
||||
book_remarks: remarks.replace('佚名(著)','').replace('佚名(播)','').replace('未知(著)','').replace('未知(播)','') || '',
|
||||
};
|
||||
});
|
||||
const hasMore = $('div.paging > 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 + '/tingshu/' + id);
|
||||
const $ = load(html);
|
||||
const detail = $('div.book-cell:first > div');
|
||||
let vod = {
|
||||
book_id: id,
|
||||
type_name: $('h1:first').text().trim().replace('有声小说',''),
|
||||
// vod_pic: HOST + $('div.myui-content__thumb img:first').attr('data-original'),
|
||||
// vod_content: $('div.ellipsis').text().trim(),
|
||||
book_year: '',
|
||||
book_area: '',
|
||||
book_remarks: '',
|
||||
book_actor: '',
|
||||
book_director: '',
|
||||
book_content: '',
|
||||
};
|
||||
// for (const info of detail) {
|
||||
// const i = $(info).text().trim();
|
||||
// if (i.startsWith('类型:')) {
|
||||
// vod.vod_type = _.map($(info).find('a'), (a) => {
|
||||
// return a.children[0].data;
|
||||
// }).join('/');
|
||||
// } else if (i.startsWith('作者:')) {
|
||||
// vod.vod_director = _.map($(info).find('a'), (a) => {
|
||||
// return a.children[0].data;
|
||||
// }).join('/');
|
||||
// } else if (i.startsWith('演播:')) {
|
||||
// vod.vod_actor = _.map($(info).find('a'), (a) => {
|
||||
// return a.children[0].data;
|
||||
// }).join('/');
|
||||
// } else if (i.startsWith('连载中')) {
|
||||
// vod.vod_remarks = i.substring(3);
|
||||
// }
|
||||
// }
|
||||
const playlist = _.map($('#playlist > ul > li > a'), (it) => {
|
||||
return it.children[0].data + '$' + it.attribs.href.replace(/\/mp3\/(.*).html/g, '$1');
|
||||
}).join("#");
|
||||
vod.volumes = '道长在线';
|
||||
vod.urls = playlist;
|
||||
// vod.vod_play_from = '道长在线';
|
||||
// vod.vod_play_url = playlist.join('#');
|
||||
return JSON.stringify({
|
||||
list: [vod],
|
||||
});
|
||||
}
|
||||
|
||||
async function play(flag, id, flags) {
|
||||
const link = HOST + '/mp3/' + id + '.html';
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const iframe = $('body iframe[src*=player]');
|
||||
const iframeHtml = (
|
||||
await req(HOST + iframe[0].attribs.src, {
|
||||
headers: {
|
||||
'Referer': link,
|
||||
'User-Agent': MOBILE_UA,
|
||||
},
|
||||
})
|
||||
).content;
|
||||
const playUrl = iframeHtml.match(/mp3:'(.*?)'/)[1];
|
||||
if (playUrl.indexOf('m4a') >= 0 || playUrl.indexOf('mp3') >= 0 ) {
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl,
|
||||
});
|
||||
} else {
|
||||
try {
|
||||
const iframeHtml = (
|
||||
await req(HOST + iframe[0].attribs.src, {
|
||||
headers: {
|
||||
'Referer': link,
|
||||
'User-Agent': MOBILE_UA,
|
||||
},
|
||||
})
|
||||
).content;
|
||||
const playUrl = playUrl + '.m4a' + iframeHtml.match(/(\?.*?)'/)[1];
|
||||
if (playUrl.indexOf('http') >= 0) {
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl,
|
||||
});
|
||||
} else {
|
||||
const iframeHtml = (
|
||||
await req(HOST + iframe[0].attribs.src, {
|
||||
headers: {
|
||||
'Referer': link,
|
||||
'User-Agent': MOBILE_UA,
|
||||
},
|
||||
})
|
||||
).content;
|
||||
const playUrl2 = iframeHtml.match(/url[\s\S]*?(http.*?)'/)[1];
|
||||
if (playUrl2.indexOf('\?') >= 0) {
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl2,
|
||||
});
|
||||
} else {
|
||||
const playUrl3 = playUrl2 + playUrl
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl3,
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
if (playUrl.indexOf('http') >= 0) {
|
||||
const playUrl = playUrl + '.m4a';
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl,
|
||||
});
|
||||
} else {
|
||||
const iframeHtml = (
|
||||
await req(HOST + iframe[0].attribs.src, {
|
||||
headers: {
|
||||
'Referer': link,
|
||||
'User-Agent': MOBILE_UA,
|
||||
},
|
||||
})
|
||||
).content;
|
||||
const playUrl4 = iframeHtml.match(/url[\s\S]*?(http.*?)'/)[1];
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl4 + '.m4a',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function search(wd, quick) {
|
||||
const link = HOST + '/search.html?searchtype=name&searchword=' + wd +'&page=1';
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const items = $('ul.book-ol > li');
|
||||
let videos = _.map(items, (item) => {
|
||||
const it = $(item).find('a:first')[0];
|
||||
const img = $(item).find('img:first')[0];
|
||||
const remarks = $($(item).find('div.book-meta')[0]).text().trim();
|
||||
return {
|
||||
book_id: it.attribs.href.replace(/.*?\/tingshu\/(.*)/g, '$1'),
|
||||
book_name: it.attribs.title.replace('有声小说',''),
|
||||
book_pic: img.attribs['data-original'],
|
||||
book_remarks: remarks.replace('佚名(著)','').replace('佚名(播)','').replace('未知(著)','').replace('未知(播)','') || '',
|
||||
};
|
||||
});
|
||||
return JSON.stringify({
|
||||
list: videos,
|
||||
});
|
||||
}
|
||||
|
||||
export function __jsEvalReturn() {
|
||||
return {
|
||||
init: init,
|
||||
home: home,
|
||||
homeVod: homeVod,
|
||||
category: category,
|
||||
detail: detail,
|
||||
play: play,
|
||||
search: search,
|
||||
};
|
||||
}
|
||||
253
js/230ts_open.js
Normal file
253
js/230ts_open.js
Normal file
@@ -0,0 +1,253 @@
|
||||
// 网站搜索异常
|
||||
import { load, _ } from './lib/cat.js';
|
||||
|
||||
let key = '爱上你听书网';
|
||||
let HOST = 'https://wap.230ts.net';
|
||||
let siteKey = '';
|
||||
let siteType = 0;
|
||||
const MOBILE_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, agentSp) {
|
||||
let res = await req(reqUrl, {
|
||||
method: 'get',
|
||||
headers: {
|
||||
'User-Agent': agentSp || MOBILE_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) {
|
||||
const html = await request(HOST + '/sort/');
|
||||
const $ = load(html);
|
||||
let filterObj = {};
|
||||
const class_parse = $('dl.pd-class:first > dd > a[href*=sort]');
|
||||
let classes = [];
|
||||
classes = _.map(class_parse, (cls) => {
|
||||
let typeId = cls.attribs['href'];
|
||||
typeId = typeId.replace(/.*?\/sort\/(.*).html/g, '$1');
|
||||
return {
|
||||
type_id: typeId,
|
||||
type_name: cls.children[0].data,
|
||||
};
|
||||
});
|
||||
const sortName = ['玄幻有声', '灵异有声', '综艺娱乐', '长篇评书', '都市有声', '军事有声', '职场有声', '其他有声'];
|
||||
classes = _.sortBy(classes, (c) => {
|
||||
const index = sortName.indexOf(c.type_name);
|
||||
return index === -1 ? sortName.length : index;
|
||||
});
|
||||
return JSON.stringify({
|
||||
class: classes,
|
||||
filters: filterObj,
|
||||
});
|
||||
}
|
||||
|
||||
async function homeVod() {
|
||||
const link = HOST + '/top/lastupdate/1.html';
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const items = $('ul.list-ul > li');
|
||||
let videos = _.map(items, (item) => {
|
||||
const it = $(item).find('a:first')[0];
|
||||
const img = $(item).find('img:first')[0];
|
||||
const remarks = $($(item).find('p.module-slide-author')[0]).text().trim();
|
||||
return {
|
||||
vod_id: it.attribs.href.replace(/.*?\/tingshu\/(.*)/g, '$1'),
|
||||
vod_name: it.attribs.title.replace('有声小说',''),
|
||||
vod_pic: HOST + img.attribs['data-original'],
|
||||
vod_remarks: remarks || '',
|
||||
};
|
||||
});
|
||||
return JSON.stringify({
|
||||
list: videos,
|
||||
});
|
||||
}
|
||||
|
||||
async function category(tid, pg, filter, extend) {
|
||||
if (pg <= 0) pg = 1;
|
||||
const link = HOST + '/sort/' + tid +'/' + (`${pg}`) + '.html';
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const items = $('ul.book-ol > li');
|
||||
let videos = _.map(items, (item) => {
|
||||
const it = $(item).find('a:first')[0];
|
||||
const img = $(item).find('img:first')[0];
|
||||
const remarks = $($(item).find('div.book-meta')[0]).text().trim();
|
||||
return {
|
||||
vod_id: it.attribs.href.replace(/.*?\/tingshu\/(.*)/g, '$1'),
|
||||
vod_name: it.attribs.title.replace('有声小说',''),
|
||||
vod_pic: HOST + img.attribs['data-original'],
|
||||
vod_remarks: remarks.replace('佚名(著)','').replace('佚名(播)','').replace('未知(著)','').replace('未知(播)','') || '',
|
||||
};
|
||||
});
|
||||
const hasMore = $('div.paging > 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 + '/tingshu/' + id);
|
||||
const $ = load(html);
|
||||
const detail = $('div.book-cell:first > div');
|
||||
let vod = {
|
||||
vod_id: id,
|
||||
vod_name: $('h1:first').text().trim().replace('有声小说',''),
|
||||
vod_pic: HOST + $('div.myui-content__thumb img:first').attr('data-original'),
|
||||
vod_content: $('div.ellipsis').text().trim(),
|
||||
};
|
||||
for (const info of detail) {
|
||||
const i = $(info).text().trim();
|
||||
if (i.startsWith('类型:')) {
|
||||
vod.vod_type = _.map($(info).find('a'), (a) => {
|
||||
return a.children[0].data;
|
||||
}).join('/');
|
||||
} else if (i.startsWith('作者:')) {
|
||||
vod.vod_director = _.map($(info).find('a'), (a) => {
|
||||
return a.children[0].data;
|
||||
}).join('/');
|
||||
} else if (i.startsWith('演播:')) {
|
||||
vod.vod_actor = _.map($(info).find('a'), (a) => {
|
||||
return a.children[0].data;
|
||||
}).join('/');
|
||||
} else if (i.startsWith('连载中')) {
|
||||
vod.vod_remarks = i.substring(3);
|
||||
}
|
||||
}
|
||||
const playlist = _.map($('#playlist > ul > li > a'), (it) => {
|
||||
return it.children[0].data + '$' + it.attribs.href.replace(/\/mp3\/(.*).html/g, '$1');
|
||||
});
|
||||
vod.vod_play_from = '道长在线';
|
||||
vod.vod_play_url = playlist.join('#');
|
||||
return JSON.stringify({
|
||||
list: [vod],
|
||||
});
|
||||
}
|
||||
|
||||
async function play(flag, id, flags) {
|
||||
const link = HOST + '/mp3/' + id + '.html';
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const iframe = $('body iframe[src*=player]');
|
||||
const iframeHtml = (
|
||||
await req(HOST + iframe[0].attribs.src, {
|
||||
headers: {
|
||||
'Referer': link,
|
||||
'User-Agent': MOBILE_UA,
|
||||
},
|
||||
})
|
||||
).content;
|
||||
const playUrl = iframeHtml.match(/mp3:'(.*?)'/)[1];
|
||||
if (playUrl.indexOf('m4a') >= 0 || playUrl.indexOf('mp3') >= 0 ) {
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl,
|
||||
});
|
||||
} else {
|
||||
try {
|
||||
const iframeHtml = (
|
||||
await req(HOST + iframe[0].attribs.src, {
|
||||
headers: {
|
||||
'Referer': link,
|
||||
'User-Agent': MOBILE_UA,
|
||||
},
|
||||
})
|
||||
).content;
|
||||
const playUrl = playUrl + '.m4a' + iframeHtml.match(/(\?.*?)'/)[1];
|
||||
if (playUrl.indexOf('http') >= 0) {
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl,
|
||||
});
|
||||
} else {
|
||||
const iframeHtml = (
|
||||
await req(HOST + iframe[0].attribs.src, {
|
||||
headers: {
|
||||
'Referer': link,
|
||||
'User-Agent': MOBILE_UA,
|
||||
},
|
||||
})
|
||||
).content;
|
||||
const playUrl2 = iframeHtml.match(/url[\s\S]*?(http.*?)'/)[1];
|
||||
if (playUrl2.indexOf('\?') >= 0) {
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl2,
|
||||
});
|
||||
} else {
|
||||
const playUrl3 = playUrl2 + playUrl
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl3,
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
if (playUrl.indexOf('http') >= 0) {
|
||||
const playUrl = playUrl + '.m4a';
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl,
|
||||
});
|
||||
} else {
|
||||
const iframeHtml = (
|
||||
await req(HOST + iframe[0].attribs.src, {
|
||||
headers: {
|
||||
'Referer': link,
|
||||
'User-Agent': MOBILE_UA,
|
||||
},
|
||||
})
|
||||
).content;
|
||||
const playUrl4 = iframeHtml.match(/url[\s\S]*?(http.*?)'/)[1];
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: playUrl4 + '.m4a',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function search(wd, quick) {
|
||||
const link = HOST + '/search.html?searchtype=name&searchword=' + wd +'&page=1';
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const items = $('ul.book-ol > li');
|
||||
let videos = _.map(items, (item) => {
|
||||
const it = $(item).find('a:first')[0];
|
||||
const img = $(item).find('img:first')[0];
|
||||
const remarks = $($(item).find('div.book-meta')[0]).text().trim();
|
||||
return {
|
||||
vod_id: it.attribs.href.replace(/.*?\/tingshu\/(.*)/g, '$1'),
|
||||
vod_name: it.attribs.title.replace('有声小说',''),
|
||||
vod_pic: img.attribs['data-original'],
|
||||
vod_remarks: remarks.replace('佚名(著)','').replace('佚名(播)','').replace('未知(著)','').replace('未知(播)','') || '',
|
||||
};
|
||||
});
|
||||
return JSON.stringify({
|
||||
list: videos,
|
||||
});
|
||||
}
|
||||
|
||||
export function __jsEvalReturn() {
|
||||
return {
|
||||
init: init,
|
||||
home: home,
|
||||
homeVod: homeVod,
|
||||
category: category,
|
||||
detail: detail,
|
||||
play: play,
|
||||
search: search,
|
||||
};
|
||||
}
|
||||
1
js/4kys_open.js
Normal file
1
js/4kys_open.js
Normal file
File diff suppressed because one or more lines are too long
1
js/52ju_open.js
Normal file
1
js/52ju_open.js
Normal file
File diff suppressed because one or more lines are too long
1
js/555dy_open.js
Normal file
1
js/555dy_open.js
Normal file
File diff suppressed because one or more lines are too long
1
js/58dm_open.js
Normal file
1
js/58dm_open.js
Normal file
File diff suppressed because one or more lines are too long
1
js/91doutu_open.js
Normal file
1
js/91doutu_open.js
Normal file
File diff suppressed because one or more lines are too long
171
js/91free_open.js
Normal file
171
js/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
js/abu_open.js
Normal file
1
js/abu_open.js
Normal file
File diff suppressed because one or more lines are too long
1
js/adm_open.js
Normal file
1
js/adm_open.js
Normal file
File diff suppressed because one or more lines are too long
275
js/alist_open.js
Normal file
275
js/alist_open.js
Normal file
@@ -0,0 +1,275 @@
|
||||
import { _ } from './lib/cat.js';
|
||||
import { findBestLCS } from './lib/similarity.js';
|
||||
|
||||
const http = async function (url, options = {}) {
|
||||
if (options.method == 'POST' && options.data) {
|
||||
options.body = JSON.stringify(options.data);
|
||||
options.headers = Object.assign({ 'content-type': 'application/json' }, options.headers);
|
||||
}
|
||||
const res = await req(url, options);
|
||||
res.json = () => (res.content ? JSON.parse(res.content) : null);
|
||||
res.text = () => res.content;
|
||||
return res;
|
||||
};
|
||||
['get', 'post'].forEach((method) => {
|
||||
http[method] = function (url, options = {}) {
|
||||
return http(url, Object.assign(options, { method: method.toUpperCase() }));
|
||||
};
|
||||
});
|
||||
|
||||
const __drives = {};
|
||||
const __subtitle_cache = {};
|
||||
|
||||
async function get_drives_path(tid) {
|
||||
const index = tid.indexOf('/', 1);
|
||||
const name = tid.substring(1, index);
|
||||
const path = tid.substring(index);
|
||||
return { drives: await get_drives(name), path };
|
||||
}
|
||||
|
||||
async function get_drives(name) {
|
||||
const { settings, api, server } = __drives[name];
|
||||
if (settings.v3 == null) {
|
||||
//获取 设置
|
||||
settings.v3 = false;
|
||||
const data = (await http.get(server + '/api/public/settings')).json().data;
|
||||
if (_.isArray(data)) {
|
||||
settings.title = data.find((x) => x.key == 'title')?.value;
|
||||
settings.v3 = false;
|
||||
settings.version = data.find((x) => x.key == 'version')?.value;
|
||||
settings.enableSearch = data.find((x) => x.key == 'enable search')?.value == 'true';
|
||||
} else {
|
||||
settings.title = data.title;
|
||||
settings.v3 = true;
|
||||
settings.version = data.version;
|
||||
settings.enableSearch = false; //v3 没有找到 搜索配置
|
||||
}
|
||||
//不同版本 接口不一样
|
||||
api.path = settings.v3 ? '/api/fs/list' : '/api/public/path';
|
||||
api.file = settings.v3 ? '/api/fs/get' : '/api/public/path';
|
||||
api.search = settings.v3 ? '/api/public/search' : '/api/public/search';
|
||||
api.other = settings.v3 ? '/api/fs/other' : null;
|
||||
}
|
||||
return __drives[name];
|
||||
}
|
||||
|
||||
let siteKey = '';
|
||||
let siteType = 0;
|
||||
|
||||
function init(cfg) {
|
||||
siteKey = cfg.skey;
|
||||
siteType = cfg.stype;
|
||||
cfg.ext.forEach(
|
||||
(item) =>
|
||||
(__drives[item.name] = {
|
||||
name: item.name,
|
||||
server: item.server.endsWith('/') ? item.server.substring(0, item.server.length - 1) : item.server,
|
||||
startPage: item.startPage || '/', //首页
|
||||
showAll: item.showAll === true, //默认只显示 视频和文件夹,如果想显示全部 showAll 设置true
|
||||
params: item.params || {},
|
||||
_path_param: item.params
|
||||
? _.sortBy(Object.keys(item.params), function (x) {
|
||||
return -x.length;
|
||||
})
|
||||
: [],
|
||||
settings: {},
|
||||
api: {},
|
||||
getParams(path) {
|
||||
const key = this._path_param.find((x) => path.startsWith(x));
|
||||
return Object.assign({}, this.params[key], { path });
|
||||
},
|
||||
async getPath(path) {
|
||||
const res = (await http.post(this.server + this.api.path, { data: this.getParams(path) })).json();
|
||||
return this.settings.v3 ? res.data.content : res.data.files;
|
||||
},
|
||||
async getFile(path) {
|
||||
const res = (await http.post(this.server + this.api.file, { data: this.getParams(path) })).json();
|
||||
const data = this.settings.v3 ? res.data : res.data.files[0];
|
||||
if (!this.settings.v3) data.raw_url = data.url; //v2 的url和v3不一样
|
||||
return data;
|
||||
},
|
||||
async getOther(method, path) {
|
||||
const data = this.getParams(path);
|
||||
data.method = method;
|
||||
const res = (await http.post(this.server + this.api.other, { data: data })).json();
|
||||
return res;
|
||||
},
|
||||
isFolder(data) {
|
||||
return data.type == 1;
|
||||
},
|
||||
isVideo(data) {
|
||||
//判断是否是 视频文件
|
||||
return this.settings.v3 ? data.type == 2 : data.type == 3;
|
||||
},
|
||||
isSubtitle(data) {
|
||||
if (data.type == 1) return false;
|
||||
const ext = ['.srt', '.ass', '.scc', '.stl', '.ttml'];
|
||||
return ext.some((x) => data.name.endsWith(x));
|
||||
},
|
||||
getType(data) {
|
||||
const isVideo = this.isVideo(data);
|
||||
return this.isFolder(data) ? 0 : isVideo ? 10 : 1;
|
||||
},
|
||||
getPic(data) {
|
||||
let pic = this.settings.v3 ? data.thumb : data.thumbnail;
|
||||
return pic || (this.isFolder(data) ? 'http://img1.3png.com/281e284a670865a71d91515866552b5f172b.png' : '');
|
||||
},
|
||||
getSize(data) {
|
||||
let sz = data.size || 0;
|
||||
if (sz <= 0) return '';
|
||||
let filesize = '';
|
||||
if (sz > 1024 * 1024 * 1024 * 1024.0) {
|
||||
sz /= 1024 * 1024 * 1024 * 1024.0;
|
||||
filesize = 'TB';
|
||||
} else if (sz > 1024 * 1024 * 1024.0) {
|
||||
sz /= 1024 * 1024 * 1024.0;
|
||||
filesize = 'GB';
|
||||
} else if (sz > 1024 * 1024.0) {
|
||||
sz /= 1024 * 1024.0;
|
||||
filesize = 'MB';
|
||||
} else {
|
||||
sz /= 1024.0;
|
||||
filesize = 'KB';
|
||||
}
|
||||
return sz.toFixed(2) + filesize;
|
||||
},
|
||||
getRemark(data) {
|
||||
return '';
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
async function dir(dir, pg) {
|
||||
for (const k in __subtitle_cache) {
|
||||
delete __subtitle_cache[k];
|
||||
}
|
||||
pg = pg || 1;
|
||||
if (pg == 0) pg == 1;
|
||||
if (dir === '/' || dir === '') {
|
||||
const result = _.map(__drives, function (d) {
|
||||
return { name: d.name, path: '/' + d.name + d.startPage, type: 0, thumb: '' };
|
||||
});
|
||||
return JSON.stringify({
|
||||
parent: '',
|
||||
page: pg,
|
||||
pagecount: pg,
|
||||
list: result,
|
||||
});
|
||||
}
|
||||
|
||||
let { drives, path } = await get_drives_path(dir);
|
||||
const id = dir.endsWith('/') ? dir : dir + '/';
|
||||
const list = await drives.getPath(path);
|
||||
let subtList = [];
|
||||
let videos = [];
|
||||
let allList = [];
|
||||
list.forEach((item) => {
|
||||
if (drives.isSubtitle(item)) subtList.push(item.name);
|
||||
const isVideo = drives.isVideo(item);
|
||||
if (!drives.showAll && !drives.isFolder(item) && !isVideo) return;
|
||||
const file = {
|
||||
name: item.name.replaceAll('$', '_').replaceAll('#', '_'),
|
||||
path: id + item.name + (drives.isFolder(item) ? '/' : ''),
|
||||
thumb: drives.getPic(item),
|
||||
type: drives.getType(item),
|
||||
size: drives.getSize(item),
|
||||
remark: drives.getRemark(item),
|
||||
};
|
||||
if (drives.isVideo(item)) videos.push(file);
|
||||
allList.push(file);
|
||||
});
|
||||
if (subtList.length > 0) {
|
||||
videos.forEach((item) => {
|
||||
var sbust = findBestLCS(item.name, subtList);
|
||||
if (sbust.bestMatch) __subtitle_cache[item.path] = [id + sbust.bestMatch.target];
|
||||
});
|
||||
}
|
||||
return JSON.stringify({
|
||||
parent: id,
|
||||
page: pg,
|
||||
pagecount: pg,
|
||||
list: allList,
|
||||
});
|
||||
}
|
||||
|
||||
async function file(file) {
|
||||
let { drives, path } = await get_drives_path(file);
|
||||
const item = await drives.getFile(path);
|
||||
const subs = [];
|
||||
if (__subtitle_cache[file]) {
|
||||
for (const sub of __subtitle_cache[file]) {
|
||||
try {
|
||||
let subP = await get_drives_path(sub);
|
||||
const subItem = await drives.getFile(subP.path);
|
||||
subs.push(subItem.raw_url);
|
||||
} catch (error) {}
|
||||
}
|
||||
}
|
||||
if (item.provider === 'AliyundriveShare2Open' && drives.api.other) {
|
||||
const urls = ['原画', item.raw_url];
|
||||
try {
|
||||
const res = await drives.getOther('video_preview', path);
|
||||
for (const live of res.data.video_preview_play_info.live_transcoding_task_list) {
|
||||
if (live.status === 'finished') {
|
||||
urls.push(live.template_id);
|
||||
urls.push(live.url);
|
||||
}
|
||||
}
|
||||
} catch (error) {}
|
||||
const result = {
|
||||
name: item.name,
|
||||
url: urls,
|
||||
size: drives.getSize(item),
|
||||
remark: drives.getRemark(item),
|
||||
header: {},
|
||||
extra: {
|
||||
subt: subs,
|
||||
},
|
||||
};
|
||||
return JSON.stringify(result);
|
||||
} else if (item.provider === '123Pan') {
|
||||
let url = item.raw_url;
|
||||
try {
|
||||
url = (await http.get(url)).json().data.redirect_url;
|
||||
} catch (error) {}
|
||||
const result = {
|
||||
name: item.name,
|
||||
url: url,
|
||||
size: drives.getSize(item),
|
||||
remark: drives.getRemark(item),
|
||||
header: {},
|
||||
extra: {
|
||||
subt: subs,
|
||||
},
|
||||
};
|
||||
return JSON.stringify(result);
|
||||
} else {
|
||||
const result = {
|
||||
name: item.name,
|
||||
url: item.raw_url,
|
||||
size: drives.getSize(item),
|
||||
remark: drives.getRemark(item),
|
||||
header: {},
|
||||
extra: {
|
||||
subt: subs,
|
||||
},
|
||||
};
|
||||
return JSON.stringify(result);
|
||||
}
|
||||
}
|
||||
|
||||
function search(wd) {
|
||||
return JSON.stringify({
|
||||
list: [],
|
||||
});
|
||||
}
|
||||
|
||||
export function __jsEvalReturn() {
|
||||
return {
|
||||
init: init,
|
||||
dir: dir,
|
||||
file: file,
|
||||
search: search,
|
||||
};
|
||||
}
|
||||
157
js/anfun_open.js
Normal file
157
js/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,
|
||||
};
|
||||
}
|
||||
8
js/app.js
Normal file
8
js/app.js
Normal file
@@ -0,0 +1,8 @@
|
||||
function __jsEvalReturn() {
|
||||
return {
|
||||
isVideoFormat: function (url) {
|
||||
return !0;
|
||||
},
|
||||
};
|
||||
}
|
||||
export { __jsEvalReturn };
|
||||
1
js/apptov5_open.js
Normal file
1
js/apptov5_open.js
Normal file
File diff suppressed because one or more lines are too long
1
js/appv2.js
Normal file
1
js/appv2.js
Normal file
File diff suppressed because one or more lines are too long
894
js/appysv1.js
Normal file
894
js/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
js/appysv2.js
Normal file
1
js/appysv2.js
Normal file
File diff suppressed because one or more lines are too long
1
js/bb_douban_open.js
Normal file
1
js/bb_douban_open.js
Normal file
File diff suppressed because one or more lines are too long
621
js/bili_open.js
Normal file
621
js/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
js/bili_open2.js
Normal file
618
js/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
js/bili_open3.js
Normal file
618
js/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
js/bilibili.js
Normal file
1
js/bilibili.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
js/bilibili_open.js
Normal file
1
js/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
js/bililive_open.js
Normal file
1
js/bililive_open.js
Normal file
File diff suppressed because one or more lines are too long
136
js/bookan_book_open.js
Normal file
136
js/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,
|
||||
};
|
||||
}
|
||||
136
js/bookan_open.js
Normal file
136
js/bookan_open.js
Normal file
@@ -0,0 +1,136 @@
|
||||
import { _ } from 'assets://js/lib/cat.js';
|
||||
|
||||
let key = 'bookkan';
|
||||
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,
|
||||
book_type: '',
|
||||
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,
|
||||
};
|
||||
}
|
||||
190
js/boosj_open.js
Normal file
190
js/boosj_open.js
Normal file
@@ -0,0 +1,190 @@
|
||||
import { load, _ } from './lib/cat.js';
|
||||
|
||||
let key = '童趣';
|
||||
let HOST = 'https://www.boosj.com';
|
||||
let siteKey = '';
|
||||
let siteType = 0;
|
||||
|
||||
const MOBILE_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, agentSp) {
|
||||
let res = await req(reqUrl, {
|
||||
method: 'get',
|
||||
headers: {
|
||||
'User-Agent': agentSp || MOBILE_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) {
|
||||
const classes = [{ type_id: '', type_name: '全部' }, { type_id: 28, type_name: '辅食' }, { type_id: 582, type_name: '动画' }, { type_id: 3364, type_name: '儿童舞蹈' }, { type_id: 3366, type_name: '少儿英语' }, { type_id: 3367, type_name: '儿童歌曲' }, { type_id: 3622, type_name: '才艺' }, { type_id: 3782, type_name: '播视自制' }, { type_id: 3822, type_name: '故事' }, { type_id: 3842, type_name: '亲子教育' }, { type_id: 4402, type_name: '美术' }, { type_id: 4583, type_name: '其他' }, { type_id: 4762, type_name: '儿童游戏' }, { type_id: 4842, type_name: '识物' }, { type_id: 4843, type_name: '绘本' }, { type_id: 4844, type_name: '古诗' }, { type_id: 4845, type_name: '科普' }, { type_id: 5102, type_name: '儿童玩具' }, { type_id: 5142, type_name: '播视童趣儿童玩具' }];
|
||||
const filterObj = {};
|
||||
const jsonData = [
|
||||
{
|
||||
key: 'age',
|
||||
name: '年龄段',
|
||||
value: [
|
||||
{ n: '全部', v: '' },
|
||||
{ n: '6岁以上', v: '?p367=370' },
|
||||
{ n: '3~6岁', v: '?p367=369' },
|
||||
{ n: '0~3岁', v: '?p367=368' },
|
||||
],
|
||||
init: '',
|
||||
},
|
||||
{
|
||||
key: 'by',
|
||||
name: '排序',
|
||||
value: [
|
||||
{ n: '全部', v: '' },
|
||||
{ n: '最新发布', v: 'lately' },
|
||||
{ n: '最多播放', v: 'pop' },
|
||||
{ n: '最多评论', v: 'view' },
|
||||
],
|
||||
init: '',
|
||||
},
|
||||
];
|
||||
return JSON.stringify({
|
||||
class: _.map(classes, (cls) => {
|
||||
cls.land = 1;
|
||||
cls.ratio = 1.78;
|
||||
filterObj[cls.type_id] = jsonData;
|
||||
return cls;
|
||||
}),
|
||||
filters: filterObj,
|
||||
});
|
||||
}
|
||||
|
||||
async function homeVod() {
|
||||
const link = HOST + '/search_res_3362__3364_1_.html';
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const items = $('body div.bj-col4:has(h3)');
|
||||
let videos = _.map(items, (it) => {
|
||||
const a = $(it).find('a:first')[0];
|
||||
const img = $(it).find('img:first')[0];
|
||||
const remarks = $(it).find('span.played')[0];
|
||||
return {
|
||||
vod_id: a.attribs.href,
|
||||
vod_name: a.attribs.title,
|
||||
vod_pic: img.attribs['data-original'],
|
||||
vod_remarks: remarks.children[0].data || '',
|
||||
};
|
||||
});
|
||||
return JSON.stringify({
|
||||
list: videos,
|
||||
});
|
||||
}
|
||||
|
||||
async function category(tid, pg, filter, extend) {
|
||||
if (pg <= 0 || typeof (pg) == 'undefined') pg = 1;
|
||||
const link = HOST + '/search_res_3362__' + tid + '_' + pg + '_' + (extend.by || '') + '.html' + (extend.age || '');
|
||||
const html = await request(link);
|
||||
const $ = load(html);
|
||||
const items = $('body div.bj-col4:has(h3)');
|
||||
let videos = _.map(items, (it) => {
|
||||
const a = $(it).find('a:first')[0];
|
||||
const img = $(it).find('img:first')[0];
|
||||
const remarks = $(it).find('span.played')[0];
|
||||
return {
|
||||
vod_id: a.attribs.href,
|
||||
vod_name: a.attribs.title,
|
||||
vod_pic: img.attribs['data-original'],
|
||||
vod_remarks: remarks.children[0].data || '',
|
||||
};
|
||||
});
|
||||
const hasMore = $('div.pub_paging > a:contains(下一页)').length > 0;
|
||||
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||
return JSON.stringify({
|
||||
page: parseInt(pg),
|
||||
pagecount: pgCount,
|
||||
limit: 30,
|
||||
total: 30 * pgCount,
|
||||
list: videos,
|
||||
});
|
||||
}
|
||||
|
||||
async function detail(id) {
|
||||
const vod = {
|
||||
vod_id: id,
|
||||
vod_remarks: "",
|
||||
};
|
||||
const playlist = ["点击播放" + "$" + vod.vod_id];
|
||||
vod.vod_play_from = "道长在线";
|
||||
vod.vod_play_url = playlist.join("#");
|
||||
return JSON.stringify({
|
||||
list: [vod],
|
||||
});
|
||||
}
|
||||
|
||||
async function play(flag, id, flags) {
|
||||
const body = JSON.parse(await request('https://gslb.boosj.com/ipv2.json'));
|
||||
body._id = id.match(/\d+/)[0];
|
||||
const json = JSON.parse(await request(buildUrl(body.gslb, body)));
|
||||
const purl = json.url + '?' + json.t
|
||||
// console.debug('童趣purl =====>' + purl); // js_debug.log
|
||||
let headers = {
|
||||
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 9; 22081212C Build/PQ3B.190801.002)',
|
||||
};
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: purl,
|
||||
header: headers,
|
||||
});
|
||||
}
|
||||
|
||||
async function search(wd, quick) {
|
||||
var data = JSON.parse(await request('https://search.boosj.com/m_ajax?q=' + wd + '&p=' + pg + '&typeId=3362')).body;
|
||||
let videos = _.map(data.result, (it) => {
|
||||
return {
|
||||
vod_id: it.playUrl,
|
||||
vod_name: it.resourceName,
|
||||
vod_pic: it.imageUrl,
|
||||
vod_remarks: it.clickNumStr || '',
|
||||
}
|
||||
});
|
||||
return JSON.stringify({
|
||||
page: parseInt(pg),
|
||||
pagecount: data.pageCount,
|
||||
limit: 30,
|
||||
total: data.rowCount,
|
||||
list: videos,
|
||||
});
|
||||
}
|
||||
|
||||
function buildUrl(url, obj) {
|
||||
obj = obj || {};
|
||||
if (url.indexOf('?') < 0) {
|
||||
url += '?'
|
||||
}
|
||||
let param_list = [];
|
||||
let keys = Object.keys(obj);
|
||||
keys.forEach(it => {
|
||||
param_list.push(it + '=' + obj[it])
|
||||
});
|
||||
let prs = param_list.join('&');
|
||||
if (keys.length > 0 && !url.endsWith('?')) {
|
||||
url += '&'
|
||||
}
|
||||
url += prs;
|
||||
return url
|
||||
}
|
||||
|
||||
export function __jsEvalReturn() {
|
||||
return {
|
||||
init: init,
|
||||
home: home,
|
||||
homeVod: homeVod,
|
||||
category: category,
|
||||
detail: detail,
|
||||
play: play,
|
||||
search: search,
|
||||
};
|
||||
}
|
||||
61
js/build.js
Normal file
61
js/build.js
Normal file
@@ -0,0 +1,61 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'path';
|
||||
import uglifyjs from 'uglify-js';
|
||||
|
||||
const copySpider = ['app', 'kunyu77_open', 'alist_open'];
|
||||
|
||||
const root = process.cwd();
|
||||
|
||||
const src = path.join(root);
|
||||
const out = path.join(root, 'dist');
|
||||
|
||||
function minify(s, d) {
|
||||
var jsContent = fs.readFileSync(s).toString();
|
||||
jsContent = jsContent.replace('./lib/cat.js', 'assets://js/lib/cat.js');
|
||||
jsContent = jsContent.replace('./cat.js', 'assets://js/lib/cat.js');
|
||||
jsContent = uglifyjs.minify(jsContent, {
|
||||
mangle: false,
|
||||
});
|
||||
fs.writeFileSync(d, jsContent.code);
|
||||
}
|
||||
|
||||
function listAllFiles(dirPath, arrayOfFiles) {
|
||||
var files = fs.readdirSync(dirPath);
|
||||
|
||||
arrayOfFiles = arrayOfFiles || [];
|
||||
|
||||
files.forEach(function (file) {
|
||||
if (fs.statSync(dirPath + '/' + file).isDirectory()) {
|
||||
arrayOfFiles = listAllFiles(dirPath + '/' + file, arrayOfFiles);
|
||||
} else {
|
||||
arrayOfFiles.push(path.join(dirPath, '/', file));
|
||||
}
|
||||
});
|
||||
|
||||
return arrayOfFiles;
|
||||
}
|
||||
|
||||
function src2Out() {
|
||||
if (fs.existsSync(out)) fs.rmSync(out, { recursive: true, force: true });
|
||||
|
||||
fs.mkdirSync(out, { recursive: true });
|
||||
const libSrc = path.join(src, 'lib');
|
||||
const libOut = path.join(out, 'lib');
|
||||
fs.mkdirSync(libOut, { recursive: true });
|
||||
const libs = listAllFiles(libSrc);
|
||||
for (let index = 0; index < libs.length; index++) {
|
||||
const element = libs[index];
|
||||
const relative = path.relative(libSrc, element);
|
||||
minify(element, path.join(libOut, relative));
|
||||
}
|
||||
|
||||
for (const sp of copySpider) {
|
||||
minify(path.join(src, sp + '.js'), path.join(out, sp + '.js'));
|
||||
}
|
||||
}
|
||||
|
||||
src2Out();
|
||||
|
||||
fs.copyFileSync(path.join(src, 'config_open.json'), path.join(out, 'config_open.json'));
|
||||
|
||||
console.log('done');
|
||||
1
js/bulei_open.js
Normal file
1
js/bulei_open.js
Normal file
File diff suppressed because one or more lines are too long
1
js/caiji.js
Normal file
1
js/caiji.js
Normal file
@@ -0,0 +1 @@
|
||||
//bbQ0FUT1BTEGNhaWppLmpzLGFzc2V0czovL2pzL2xpYi9jYXQuanMcX19qc0V2YWxSZXR1cm4CXw5zaXRlS2V5EHNpdGVUeXBlBFVBDmJhc2VVcmwUY2F0ZWdvcmllcwhpbml0EmdldEhlYWRlchJnZXRTdHJpbmcIaG9tZQ5ob21lVm9kEGNhdGVnb3J5DGRldGFpbAhwbGF5DHNlYXJjaN4BTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwOS4wLjAuMCBTYWZhcmkvNTM3LjM2BmNmZwhza2V5CnN0eXBlBmV4dAZ1cmwMaGVhZGVyFFVzZXItQWdlbnQGcmVzBnJlcQ5oZWFkZXJzDmNvbnRlbnQMZmlsdGVyDHJlcVVybA5qc29uU3RyCGRhdGEWY2xhc3Nlc3NBcnIOY2xhc3NlcxJmaWx0ZXJPYmoaY2F0ZWdvcmllc09iagZvbmUIY2F0ZQJlCnBhcnNlDmlzRW1wdHkQaW5jbHVkZXMSdHlwZV9uYW1lDnR5cGVfaWQQdHlwZV9waWQIcHVzaBJzdHJpbmdpZnkOZmlsdGVycw5jb25zb2xlCmRlYnVnBHt9BnRpZARwZwxleHRlbmQMdmlkZW9zID9hYz12aWRlb2xpc3QmdD0IJnBnPQhsaXN0DHZvZF9pZBB2b2RfbmFtZQ52b2RfcGljFnZvZF9yZW1hcmtzEHBhcnNlSW50CHBhZ2UScGFnZWNvdW50CmxpbWl0CnRvdGFsBGlkBnZvZCQ/YWM9dmlkZW9saXN0Jmlkcz0Qdm9kX3llYXIQdm9kX2FyZWESdm9kX2FjdG9yGHZvZF9kaXJlY3RvchZ2b2RfY29udGVudBp2b2RfcGxheV9mcm9tGHZvZF9wbGF5X3VybAhmbGFnBHdkCnF1aWNrHD9hYz1kZXRhaWwmd2Q9D6QDAaYDAQAPqAMAAQCqAwAOAAYBoAEAAAABEApLAKoDAAysAwAJrgMBCbADAgmyAwMJtAMECbYDBQG4AwYBugMHAbwDCAG+AwkBwAMKAcIDCwHEAwwBxgMNAagDDgEI6DS+AF8GAL4BXwcAvgJfCAC+A18JAL4EXwoAvgVfCwC+Bl8MAL4HXw0AvghfDgC+CV8PACm/4LPhBOQAAADiv18EACYAAF8FACmkAwEMAQA2Bg0NIRcABswCDmIGAbYDAQABAgQAYwHKAwABAKwDAQiuAwIIsgMECLQDBQjPQeYAAAARZgAADs9B5wAAABFmAQAOz0HoAAAAlwRIAAAAqegOz0HoAAAAEWYCAA7qMM9B6AAAAJcESQAAAKnoIc9B6AAAAEHpAAAAEWYCAA7PQegAAABB2gAAABFmAwAOBi6kAwkIAzo6TjpYU1QOQwYBuAMAAQADAQAWAdQDAQAgsAMDCGEAAAvHYgAABOsAAABxZQAASWIAACikAxQDEg1EDmIGAboDAQEBBAEAHQLSAwABANgDAQAguAMHAGEAADjtAAAAzwvb7EzuAAAA7ovHYgAAQe8AAAAupAMaBBImJhIOYgYBvAMBCgEJBACaAwvgAwABAOIDAQAw5AMBATDmAwICMOgDAgMw6gMCBCDsAwIFIO4DAgYg8AMDByDyAxEHIPQDFQIDsgMECLoDCACqAwAMtAMFCGEBAGEAAGUAAMfcYgAA7YvIbGsBAABhBgBhBQBhBABhAwBhAgA4mAAAAEL7AAAAYgEAJAEAyWICAEEeAAAAyiYAAMEEC8EFC8EGYQcAYgMAfeuwAMEHZQIAQvwAAABlAwAkAQCW6DBlAwBC/QAAAGIHAEH+AAAAJAEAaYcAAABiBgBiBwBB/gAAAHFiBwBB/wAAAEnqbWIHAEEAAQAAOEUAAACq6DZiBwBBAAEAALOq6FFiBABCAQEAAAtiBwBB/wAAAEz/AAAAYgcAQf4AAABM/gAAACQBAA7qKGIEAEIBAQAAC2IHAEH/AAAATP8AAABiBwBB/gAAAEz+AAAAJAEADoAAaU////8Og2UCAEL8AAAAZQMAJAEAluhCYQgAZQMAfeozwQhiBgBiCABHOEUAAACq6CJiBABCAQEAAAtiBgBiCABHTP8AAABiCABM/gAAACQBAA6AAOjLDoM4mAAAAEICAQAAC2IEAEweAAAAYgUATAMBAAAkAQAPLsEJbBcAAAA4BAEAAEIFAQAAwAkkAQAODuoCLwYupAMiICEXJmdYMBwSEj9Ye20NUz/HDcgwWDpOqSI6KysXK1MXDmIGAb4DAAAAAQAABgAEBgEAAC6kA0oBAw5iBgHAAwQFBAcCAPUBCY4EAAEAkAQAAQDgAwABAJIEAAEA4gMBADDkAwEBMOYDAQIwlAQBAyDwAwMEILIDBAi6AwgAYQMAYQIAYQEAYQAA0DhFAAAAqRHpBQ7Qs6ToA7TUZQAABAsBAACdz50EDAEAAJ3QncfcYgAA7YvIOJgAAABC+wAAAGIBACQBAMkmAADKYQQAYgIAQQ0BAAB96kTBBGIDAEIBAQAAC2IEAEEOAQAATA4BAABiBABBDwEAAEwPAQAAYgQAQRABAABMEAEAAGIEAEERAQAATBEBAAAkAQAOgADoug6DOJgAAABCAgEAAAs4EgEAANDtTBMBAABiAgBBFAEAAEwUAQAAOBIBAABiAgBBFQEAAO1MFQEAAGICAEEWAQAATBYBAABiAwBMDQEAACQBAC6kA08UP11nJlgXUzBEREREFyM6P0RiRCsOYgYBwgMBBQEEAwCcAgauBAABAOIDAQAw5AMBATDmAwECMPADAQMwsAQBBCCyAwQIugMIAKoDAAxhBABhAwBhAgBhAQBhAABlAAAEGQEAAJ3PncfcYgAA7YvIOJgAAABC+wAAAGIBACQBAMliAgBBDQEAALNHymUCAEL8AAAAYgMAJAEA6AcEBgEAAC4LYgMAQQ4BAABMDgEAAGIDAEEPAQAATA8BAABiAwBB/gAAAEz+AAAAYgMAQRABAABMEAEAAGIDAEEaAQAATBoBAABiAwBBGwEAAEwbAQAAYgMAQRwBAAAR6QMOv0wcAQAAYgMAQR0BAAAR6QMOv0wdAQAAYgMAQREBAAAR6QMOv0wRAQAAYgMAQR4BAABMHgEAAGIDAEEfAQAATB8BAABiAwBBIAEAAEwgAQAAwQQ4mAAAAEICAQAAC2IEACYBAEwNAQAAJAEALqQDaBhOPyZYOlMcCAhERERERERdXV1EREQOOjoOYgYBxAMDAAMEAAAbA8IEAAEArgQAAQDaAQABADiYAAAAQgIBAAALs0z7AAAA0EzpAAAAJAEALqQDhQEEAzohIQ5iBgHGAwMFAwcCANwBCMQEAAEAxgQAAQCQBAABAOIDAQAw5AMBATDmAwECMJQEAQMgsAQDBDCyAwQIugMIAGEDAGECAGEBAGEAANE4RQAAAKkR6QUO0bOk6AO01WUAAAQkAQAAnc+dBAwBAACd0Z3H3GIAAO2LyDiYAAAAQvsAAABiAQAkAQDJJgAAymEEAGICAEENAQAAfepEwQRiAwBCAQEAAAtiBABBDgEAAEwOAQAAYgQAQQ8BAABMDwEAAGIEAEEQAQAATBABAABiBABBEQEAAEwRAQAAJAEADoAA6LoOgziYAAAAQgIBAAALOBIBAABiAgBBEwEAAO1MEwEAAGICAEEUAQAATBQBAABiAwBMDQEAACQBAC6kA40BEj9dZyZYF1MwRERERBciOmJEKw5DBgGoAwAAAAIHADIAtgMGALwDCQC+AwoAwAMLAMIDDADEAw0AxgMOAAvbTNsAAADcTN4AAADdTN8AAADeTOAAAABeBABM4QAAAF4FAEziAAAAXgYATOMAAAAopAOjAQkDCCEhISErKys=
|
||||
1
js/caiji2.js
Normal file
1
js/caiji2.js
Normal file
@@ -0,0 +1 @@
|
||||
//bbQ0FUT1BNEGNhaWppLmpzLGFzc2V0czovL2pzL2xpYi9jYXQuanMcX19qc0V2YWxSZXR1cm4CXw5zaXRlS2V5EHNpdGVUeXBlBFVBDmJhc2VVcmwUY2F0ZWdvcmllcwhpbml0EmdldEhlYWRlchJnZXRTdHJpbmcIaG9tZQ5ob21lVm9kEGNhdGVnb3J5DGRldGFpbAhwbGF5DHNlYXJjaN4BTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwOS4wLjAuMCBTYWZhcmkvNTM3LjM2BmNmZwhza2V5CnN0eXBlBmV4dAZ1cmwMaGVhZGVyFFVzZXItQWdlbnQGcmVzBnJlcQ5oZWFkZXJzDmNvbnRlbnQMZmlsdGVyDHJlcVVybA5qc29uU3RyCGRhdGEWY2xhc3Nlc3NBcnIOY2xhc3NlcxJmaWx0ZXJPYmoGb25lCnBhcnNlDmlzRW1wdHkQaW5jbHVkZXMSdHlwZV9uYW1lCHB1c2gOdHlwZV9pZBJzdHJpbmdpZnkOZmlsdGVycwR7fQZ0aWQEcGcMZXh0ZW5kDHZpZGVvcyA/YWM9dmlkZW9saXN0JnQ9CCZwZz0IbGlzdAx2b2RfaWQQdm9kX25hbWUOdm9kX3BpYxZ2b2RfcmVtYXJrcxBwYXJzZUludAhwYWdlEnBhZ2Vjb3VudApsaW1pdAp0b3RhbARpZAZ2b2QkP2FjPXZpZGVvbGlzdCZpZHM9EHZvZF95ZWFyEHZvZF9hcmVhEnZvZF9hY3Rvchh2b2RfZGlyZWN0b3IWdm9kX2NvbnRlbnQadm9kX3BsYXlfZnJvbRh2b2RfcGxheV91cmwIZmxhZwR3ZApxdWljaxw/YWM9ZGV0YWlsJndkPQ+kAwGmAwEAD6gDAAEAqgMADgAGAaABAAAAARAKSwCqAwAMrAMACa4DAQmwAwIJsgMDCbQDBAm2AwUBuAMGAboDBwG8AwgBvgMJAcADCgHCAwsBxAMMAcYDDQGoAw4BCOg0vgBfBgC+AV8HAL4CXwgAvgNfCQC+BF8KAL4FXwsAvgZfDAC+B18NAL4IXw4AvglfDwApv+Cz4QTkAAAA4r9fBAAmAABfBQAppAMBDAEANgYNDSEXAAaoAg5iBgG2AwEAAQIEAGMBygMAAQCsAwEIrgMCCLIDBAi0AwUIz0HmAAAAEWYAAA7PQecAAAARZgEADs9B6AAAAJcESAAAAKnoDs9B6AAAABFmAgAO6jDPQegAAACXBEkAAACp6CHPQegAAABB6QAAABFmAgAOz0HoAAAAQdoAAAARZgMADgYupAMJCAM6Ok46WFNUDkMGAbgDAAEAAwEAFgHUAwEAILADAwhhAAALx2IAAATrAAAAcWUAAEliAAAopAMUAxINRA5iBgG6AwEBAQQBAB0C0gMAAQDYAwEAILgDBwBhAAA47QAAAM8L2+xM7gAAAO6Lx2IAAEHvAAAALqQDGgQSJiYSDmIGAbwDAQcBBwQA5QEI4AMAAQDiAwEAMOQDAQEw5gMBAjDoAwEDMOoDAQQg7AMBBSDuAwIGILIDBAi6AwgAqgMADLQDBQhhBQBhBABhAwBhAgBhAQBhAABlAADH3GIAAO2LyDiYAAAAQvgAAABiAQAkAQDJYgIAQR4AAADKJgAAwQQLwQVhBgBiAwB96nnBBmUCAEL5AAAAZQMAJAEAlug/ZQMAQvoAAABiBgBB+wAAACQBAOhRYgQAQvwAAAALYgYAQf0AAABM/QAAAGIGAEH7AAAATPsAAAAkAQAO6ihiBABC/AAAAAtiBgBB/QAAAEz9AAAAYgYAQfsAAABM+wAAACQBAA6AAOiFDoM4mAAAAEL+AAAAC2IEAEweAAAAYgUATP8AAAAkAQAupAMiEV0XJlgwHBI6WGzHDcchOisrDmIGAb4DAAAAAQAABgAEAAEAAC6kAzgBAw5iBgHAAwQFBAcCAPUBCYIEAAEAhAQAAQDgAwABAIYEAAEA4gMBADDkAwEBMOYDAQIwiAQBAyDuAwMEILIDBAi6AwgAYQMAYQIAYQEAYQAA0DhFAAAAqRHpBQ7Qs6ToA7TUZQAABAUBAACdz50EBgEAAJ3QncfcYgAA7YvIOJgAAABC+AAAAGIBACQBAMkmAADKYQQAYgIAQQcBAAB96kTBBGIDAEL8AAAAC2IEAEEIAQAATAgBAABiBABBCQEAAEwJAQAAYgQAQQoBAABMCgEAAGIEAEELAQAATAsBAAAkAQAOgADoug6DOJgAAABC/gAAAAs4DAEAANDtTA0BAABiAgBBDgEAAEwOAQAAOAwBAABiAgBBDwEAAO1MDwEAAGICAEEQAQAATBABAABiAwBMBwEAACQBAC6kAz0UP11nJlgXUzBEREREFyM6P0RiRCsOYgYBwgMBBQEEAwCcAgaiBAABAOIDAQAw5AMBATDmAwECMO4DAQMwpAQBBCCyAwQIugMIAKoDAAxhBABhAwBhAgBhAQBhAABlAAAEEwEAAJ3PncfcYgAA7YvIOJgAAABC+AAAAGIBACQBAMliAgBBBwEAALNHymUCAEL5AAAAYgMAJAEA6AcEAAEAAC4LYgMAQQgBAABMCAEAAGIDAEEJAQAATAkBAABiAwBB+wAAAEz7AAAAYgMAQQoBAABMCgEAAGIDAEEUAQAATBQBAABiAwBBFQEAAEwVAQAAYgMAQRYBAAAR6QMOv0wWAQAAYgMAQRcBAAAR6QMOv0wXAQAAYgMAQQsBAAAR6QMOv0wLAQAAYgMAQRgBAABMGAEAAGIDAEEZAQAATBkBAABiAwBBGgEAAEwaAQAAwQQ4mAAAAEL+AAAAC2IEACYBAEwHAQAAJAEALqQDVhhOPyZYOlMcCAhERERERERdXV1EREQOOjoOYgYBxAMDAAMEAAAbA7YEAAEAogQAAQDaAQABADiYAAAAQv4AAAALs0z4AAAA0EzpAAAAJAEALqQDcwQDOiEhDmIGAcYDAwUDBwIA3AEIuAQAAQC6BAABAIQEAAEA4gMBADDkAwEBMOYDAQIwiAQBAyCkBAMEMLIDBAi6AwgAYQMAYQIAYQEAYQAA0ThFAAAAqRHpBQ7Rs6ToA7TVZQAABB4BAACdz50EBgEAAJ3RncfcYgAA7YvIOJgAAABC+AAAAGIBACQBAMkmAADKYQQAYgIAQQcBAAB96kTBBGIDAEL8AAAAC2IEAEEIAQAATAgBAABiBABBCQEAAEwJAQAAYgQAQQoBAABMCgEAAGIEAEELAQAATAsBAAAkAQAOgADoug6DOJgAAABC/gAAAAs4DAEAAGICAEENAQAA7UwNAQAAYgIAQQ4BAABMDgEAAGIDAEwHAQAAJAEALqQDexI/XWcmWBdTMEREREQXIjpiRCsOQwYBqAMAAAACBwAyALYDBgC8AwkAvgMKAMADCwDCAwwAxAMNAMYDDgAL20zbAAAA3EzeAAAA3UzfAAAA3kzgAAAAXgQATOEAAABeBQBM4gAAAF4GAEzjAAAAKKQDkQEJAwghISEhKysr
|
||||
1
js/caiji_open.js
Normal file
1
js/caiji_open.js
Normal file
@@ -0,0 +1 @@
|
||||
//bbQ0FUT1BMEGNhaWppLmpzGC4vbGliL2NhdC5qcxxfX2pzRXZhbFJldHVybgJfDnNpdGVLZXkQc2l0ZVR5cGUEVUEOYmFzZVVybAhpbml0EmdldEhlYWRlchJnZXRTdHJpbmcIaG9tZQ5ob21lVm9kEGNhdGVnb3J5DGRldGFpbAhwbGF5DHNlYXJjaN4BTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwOS4wLjAuMCBTYWZhcmkvNTM3LjM2BmNmZwhza2V5CnN0eXBlBmV4dAxoZWFkZXIUVXNlci1BZ2VudAZ1cmwGcmVzBnJlcQ5oZWFkZXJzDmNvbnRlbnQMZmlsdGVyDHJlcVVybA5qc29uU3RyCGRhdGEWY2xhc3Nlc3NBcnIOY2xhc3NlcxJmaWx0ZXJPYmoGb25lCnBhcnNlEHR5cGVfcGlkCHB1c2gOdHlwZV9pZBJ0eXBlX25hbWUSc3RyaW5naWZ5DmZpbHRlcnMEe30GdGlkBHBnDGV4dGVuZAx2aWRlb3MgP2FjPXZpZGVvbGlzdCZ0PQgmcGc9CGxpc3QMdm9kX2lkEHZvZF9uYW1lDnZvZF9waWMWdm9kX3JlbWFya3MQcGFyc2VJbnQIcGFnZRJwYWdlY291bnQKbGltaXQKdG90YWwEaWQGdm9kJD9hYz12aWRlb2xpc3QmaWRzPQ5pc0VtcHR5EHZvZF95ZWFyEHZvZF9hcmVhEnZvZF9hY3Rvchh2b2RfZGlyZWN0b3IWdm9kX2NvbnRlbnQadm9kX3BsYXlfZnJvbRh2b2RfcGxheV91cmwIZmxhZwR3ZApxdWljaxw/YWM9ZGV0YWlsJndkPQ+kAwGmAwEADqgDAAEAqgMADgAGAaABAAAAAQ8KRQCqAwAMrAMACa4DAQmwAwIJsgMDCbQDBAG2AwUBuAMGAboDBwG8AwgBvgMJAcADCgHCAwsBxAMMAagDDQEI6DS+AF8FAL4BXwYAvgJfBwC+A18IAL4EXwkAvgVfCgC+Bl8LAL4HXwwAvghfDQC+CV8OACm/4LPhBOMAAADiv18EACmkAwELAQA2Bg0NIQAElgIOYgYBtAMBAAECAwAjAcgDAAEArAMBCK4DAgiyAwQIz0HlAAAAEWYAAA7PQeYAAAARZgEADs9B5wAAABFmAgAOBi6kAwgEAzo6Og5DBgG2AwABAAMBABYB0AMBACCwAwMIYQAAC8diAAAE6QAAAHFlAABJYgAAKKQDDgMSDUQOYgYBuAMBAQEEAQAdAtQDAAEA1gMBACC2AwYAYQAAOOwAAADPC9vsTO0AAADui8diAABB7gAAAC6kAxQEEiYmEg5iBgG6AwEHAQcCAKIBCN4DAAEA4AMBADDiAwEBMOQDAQIw5gMBAzDoAwEEIOoDAQUg7AMCBiCyAwQIuAMHAGEFAGEEAGEDAGECAGEBAGEAAGUAAMfcYgAA7YvIOJgAAABC9wAAAGIBACQBAMliAgBBHgAAAMomAADBBAvBBWEGAGIDAH3qNsEGYgYAQfgAAACzqugoYgQAQvkAAAALYgYAQfoAAABM+gAAAGIGAEH7AAAATPsAAAAkAQAOgADoyA6DOJgAAABC/AAAAAtiBABMHgAAAGIFAEz9AAAAJAEALqQDHA5dFyZYMBwSOj/HITorKw5iBgG8AwAAAAEAAAYABP4AAAAupAMuAQMOYgYBvgMEBQQHAgDqAQn+AwABAIAEAAEA3gMAAQCCBAABAOADAQAw4gMBATDkAwECMIQEAQMg7AMDBCCyAwQIuAMHAGEDAGECAGEBAGEAANCzpOgDtNRlAAAEAwEAAJ3PnQQEAQAAndCdx9xiAADti8g4mAAAAEL3AAAAYgEAJAEAySYAAMphBABiAgBBBQEAAH3qRMEEYgMAQvkAAAALYgQAQQYBAABMBgEAAGIEAEEHAQAATAcBAABiBABBCAEAAEwIAQAAYgQAQQkBAABMCQEAACQBAA6AAOi6DoM4mAAAAEL8AAAACzgKAQAA0O1MCwEAAGICAEEMAQAATAwBAAA4CgEAAGICAEENAQAA7UwNAQAAYgIAQQ4BAABMDgEAAGIDAEwFAQAAJAEALqQDMxQ/JmcmWBdTMEREREQXIzo/RGJEKw5iBgHAAwEFAQQDAJwCBp4EAAEA4AMBADDiAwEBMOQDAQIw7AMBAzCgBAEEILIDBAi4AwcAqgMADGEEAGEDAGECAGEBAGEAAGUAAAQRAQAAnc+dx9xiAADti8g4mAAAAEL3AAAAYgEAJAEAyWICAEEFAQAAs0fKZQIAQhIBAABiAwAkAQDoBwT+AAAALgtiAwBBBgEAAEwGAQAAYgMAQQcBAABMBwEAAGIDAEH7AAAATPsAAABiAwBBCAEAAEwIAQAAYgMAQRMBAABMEwEAAGIDAEEUAQAATBQBAABiAwBBFQEAABHpAw6/TBUBAABiAwBBFgEAABHpAw6/TBYBAABiAwBBCQEAABHpAw6/TAkBAABiAwBBFwEAAEwXAQAAYgMAQRgBAABMGAEAAGIDAEEZAQAATBkBAADBBDiYAAAAQvwAAAALYgQAJgEATAUBAAAkAQAupANMGE4/Jlg6UxwICERERERERF1dXURERA46Og5iBgHCAwMAAwQAABsDtAQAAQCeBAABANoBAAEAOJgAAABC/AAAAAuzTPcAAADQTOoAAAAkAQAupANpBAM6ISEOYgYBxAMDBQMHAgDRAQi2BAABALgEAAEAgAQAAQDgAwEAMOIDAQEw5AMBAjCEBAEDIKAEAwQwsgMECLgDBwBhAwBhAgBhAQBhAADRs6ToA7TVZQAABB0BAACdz50EBAEAAJ3RncfcYgAA7YvIOJgAAABC9wAAAGIBACQBAMkmAADKYQQAYgIAQQUBAAB96kTBBGIDAEL5AAAAC2IEAEEGAQAATAYBAABiBABBBwEAAEwHAQAAYgQAQQgBAABMCAEAAGIEAEEJAQAATAkBAAAkAQAOgADoug6DOJgAAABC/AAAAAs4CgEAAGICAEELAQAA7UwLAQAAYgIAQQwBAABMDAEAAGIDAEwFAQAAJAEALqQDcRI/JmcmWBdTMEREREQXIjpiRCsOQwYBqAMAAAACBwAyALQDBQC6AwgAvAMJAL4DCgDAAwsAwgMMAMQDDQAL20zaAAAA3EzdAAAA3UzeAAAA3kzfAAAAXgQATOAAAABeBQBM4QAAAF4GAEziAAAAKKQDhwEJAwghISEhKysr
|
||||
109
js/cntv_open.js
Normal file
109
js/cntv_open.js
Normal file
@@ -0,0 +1,109 @@
|
||||
// 无搜索功能
|
||||
import { _ } from './lib/cat.js';
|
||||
let key = '视聚场';
|
||||
let HOST = 'http://api.cntv.cn';
|
||||
let siteKey = '';
|
||||
let siteType = 0;
|
||||
const MOBILE_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, agentSp) {
|
||||
let res = await req(reqUrl, {
|
||||
method: 'get',
|
||||
headers: {
|
||||
'User-Agent': agentSp || MOBILE_UA,
|
||||
},
|
||||
});
|
||||
return res.content
|
||||
}
|
||||
|
||||
async function init(cfg) {
|
||||
siteKey = cfg.skey;
|
||||
siteType = cfg.stype
|
||||
}
|
||||
|
||||
async function home(filter) {
|
||||
const classes = [{ type_id: "TOPC1451528971114112", type_name: "新闻联播" }, { type_id: "TOPC1451558976694518", type_name: "焦点访谈" }, { type_id: "TOPC1451464665008914", type_name: "今日说法" }, { type_id: "TOPC1451378757637200", type_name: "等着我" }, { type_id: "TOPC1451559129520755", type_name: "新闻直播间" }, { type_id: "TOPC1451540328102649", type_name: "海峡两岸" }, { type_id: "TOPC1451530382483536", type_name: "天网" }, { type_id: "TOPC1451540389082713", type_name: "今日关注" }, { type_id: "TOPC1451557893544236", type_name: "探索·发现" }, { type_id: "TOPC1665739007799851", type_name: "高端访谈" }, { type_id: "TOPC1451557052519584", type_name: "百家讲坛" }, { type_id: "TOPC1451464884159276", type_name: "开讲啦" }, { type_id: "TOPC1451464884159276", type_name: "故事里的中国" }, { type_id: "TOPC1514182710380601", type_name: "对话" }, { type_id: "TOPC1451559038345600", type_name: "面对面" }, { type_id: "TOPC1451378967257534", type_name: "动物世界" }, { type_id: "TOPC1451558190239536", type_name: "走进科学" }, { type_id: "TOPC1451525103989666", type_name: "人与自然" }, { type_id: "TOPC1451557421544786", type_name: "地理·中国" }, { type_id: "TOPC1451541349400938", type_name: "远方的家" }, { type_id: "TOPC1451558150787467", type_name: "自然传奇" }, { type_id: "TOPC1451534366388377", type_name: "是真的吗" }, { type_id: "TOPC1451467630488780", type_name: "星光大道" }, { type_id: "TOPC1451557646802924", type_name: "健康之路" }, { type_id: "TOPC1451559025546574", type_name: "动画大放映" }, { type_id: "TOPC1451378857272262", type_name: "第一动画乐园" }, { type_id: "TOPC1451541414450906", type_name: "精彩音乐汇" }, { type_id: "TOPC1451534421925242", type_name: "音乐厅" }, { type_id: "TOPC1451541994820527", type_name: "民歌·中国" }, { type_id: "TOPC1575253587571324", type_name: "跟着书本去旅行" }, { type_id: "TOPC1451354597100320", type_name: "中国电影报道" }, { type_id: "TOPC1451469943519994", type_name: "星推荐" }, { type_id: "TOPC1571217727564820", type_name: "方圆剧阵" }, { type_id: "TOPC1451558856402351", type_name: "空中剧院" }, { type_id: "TOPC1650782829200997", type_name: "正大综艺" }, { type_id: "TOPC1451550970356385", type_name: "体坛快讯" }, { type_id: "TOPC1451530259915198", type_name: "第一时间" }, { type_id: "TOPC1451465894294259", type_name: "开门大吉" }, { type_id: "TOPC1451464884159276", type_name: "开讲啦" }, { type_id: "TOPC1451558858788377", type_name: "共同关注" }, { type_id: "TOPC1451527941788652", type_name: "军事报道" }, { type_id: "TOPC1451558819463311", type_name: "新闻调查" }, { type_id: "TOPC1451559097947700", type_name: "新闻30分" }, { type_id: "TOPC1451559066181661", type_name: "新闻1+1" }, { type_id: "TOPC1451540448405749", type_name: "今日亚洲" }, { type_id: "TOPC1451559129520755", type_name: "新闻直播间" }, { type_id: "TOPC1451558428005729", type_name: "24小时" }, { type_id: "TOPC1451539894330405", type_name: "中国新闻" }, { type_id: "TOPC1451558779639282", type_name: "午夜新闻" }, { type_id: "TOPC1451558496100826", type_name: "朝闻天下" }, { type_id: "TOPC1451528792881669", type_name: "晚间新闻" }, { type_id: "TOPC1451559180488841", type_name: "新闻周刊" }, { type_id: "TOPC1601362002656197", type_name: "经济半小时" }, { type_id: "TOPC1451533652476962", type_name: "经济大讲堂" }, { type_id: "TOPC1453100395512779", type_name: "正点财经" }, { type_id: "TOPC1451546588784893", type_name: "生活圈" }, { type_id: "TOPC1451526037568184", type_name: "生活提示" }, { type_id: "TOPC1451558532019883", type_name: "东方时空" }, { type_id: "TOPC1451533782742171", type_name: "经济信息联播" }, { type_id: "TOPC1571034705435323", type_name: "今日环球" }, { type_id: "TOPC1451543462858283", type_name: "一线" }];
|
||||
const filterObj = {};
|
||||
return JSON.stringify({
|
||||
class: _.map(classes, (cls) => {
|
||||
cls.land = 1;
|
||||
cls.ratio = 1.78;
|
||||
return cls;
|
||||
}),
|
||||
filters: filterObj,
|
||||
})
|
||||
}
|
||||
|
||||
async function homeVod() {
|
||||
const data = JSON.parse(await request(HOST + '/NewVideo/getVideoListByColumn?id=TOPC1451558856402351&n=10&sort=desc&p=1&mode=0&serviceId=tvcctv'));
|
||||
let videos = _.map(data.data.list, (it) => {
|
||||
return {
|
||||
vod_id: it.guid,
|
||||
vod_name: it.title,
|
||||
vod_pic: it.image,
|
||||
vod_remarks: it.time || '',
|
||||
}
|
||||
});
|
||||
return JSON.stringify({
|
||||
list: videos,
|
||||
})
|
||||
}
|
||||
|
||||
async function category(tid, pg, filter, extend) {
|
||||
if (pg <= 0 || typeof pg == 'undefined') pg = 1;
|
||||
const data = JSON.parse(await request(HOST + '/NewVideo/getVideoListByColumn?id=' + tid + '&n=10&sort=desc&p=' + pg + '&mode=0&serviceId=tvcctv'));
|
||||
let videos = _.map(data.data.list, (it) => {
|
||||
return {
|
||||
vod_id: it.guid,
|
||||
vod_name: it.title,
|
||||
vod_pic: it.image,
|
||||
vod_remarks: it.time || '',
|
||||
}
|
||||
});
|
||||
const pgChk = JSON.parse(await request(HOST + '/NewVideo/getVideoListByColumn?id=' + tid + '&n=10&sort=desc&p=' + (parseInt(pg) + 1) + '&mode=0&serviceId=tvcctv')).data.list;
|
||||
const pgCount = pgChk.length > 0 ? parseInt(pg) + 1 : parseInt(pg);
|
||||
return JSON.stringify({
|
||||
page: parseInt(pg),
|
||||
pagecount: parseInt(pgCount),
|
||||
limit: 10,
|
||||
total: parseInt(data.total),
|
||||
list: videos,
|
||||
})
|
||||
}
|
||||
|
||||
async function detail(id) {
|
||||
const vod = {
|
||||
vod_id: id,
|
||||
vod_remarks: '',
|
||||
};
|
||||
const playlist = ['点击播放' + '$' + 'https://hls.cntv.myhwcdn.cn/asp/hls/2000/0303000a/3/default/' + id + '/2000.m3u8'];
|
||||
vod.vod_play_from = key;
|
||||
vod.vod_play_url = playlist.join('#');
|
||||
return JSON.stringify({
|
||||
list: [vod],
|
||||
});
|
||||
}
|
||||
|
||||
async function play(flag, id, flags) {
|
||||
// console.debug('视聚场 id =====>' + id); // js_debug.log
|
||||
return JSON.stringify({
|
||||
parse: 0,
|
||||
url: id,
|
||||
})
|
||||
}
|
||||
|
||||
async function search(wd, quick, pg) {
|
||||
return '{}'
|
||||
}
|
||||
|
||||
export function __jsEvalReturn() {
|
||||
return {
|
||||
init: init,
|
||||
home: home,
|
||||
homeVod: homeVod,
|
||||
category: category,
|
||||
detail: detail,
|
||||
play: play,
|
||||
search: search,
|
||||
}
|
||||
}
|
||||
1177
js/config_open.json
Normal file
1177
js/config_open.json
Normal file
File diff suppressed because it is too large
Load Diff
967
js/config_open99.json
Normal file
967
js/config_open99.json
Normal file
@@ -0,0 +1,967 @@
|
||||
{
|
||||
"video": {
|
||||
"sites": [
|
||||
{
|
||||
"key": "91av",
|
||||
"name": "🟡乐享汇fans丨九一",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://91av.cyou/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "91md",
|
||||
"name": "🟡乐享汇fans丨九麻",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://91md.me/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "madou",
|
||||
"name": "🟡乐享汇fans丨麻豆",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://wuxu.cc/api.php/provide/vod/from/mdm3u8/"
|
||||
},
|
||||
{
|
||||
"key": "tianmei",
|
||||
"name": "🟡乐享汇fans丨天美①",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://www.tianmei.pw/api.php/provide/vod/from/m3u8/"
|
||||
},
|
||||
{
|
||||
"key": "tmyy",
|
||||
"name": "🟡乐享汇fans丨天美②",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://tmyy.cc/api.php/provide/vod/from/m3u8/"
|
||||
},
|
||||
{
|
||||
"key": "madouse",
|
||||
"name": "🟡乐享汇fans丨果冻",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://madouse.cc/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "chujia",
|
||||
"name": "🟡乐享汇fans丨精东",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://chujia.cc/api.php/provide/vod/from/m3u8/"
|
||||
},
|
||||
{
|
||||
"key": "qqcm",
|
||||
"name": "🟡乐享汇fans丨传媒",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://qqcm.sbs/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "shayuapi",
|
||||
"name": "🟡乐享汇fans丨鲨鱼",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://shayuapi.com/api.php/provide/vod/"
|
||||
},
|
||||
{
|
||||
"key": "apilyzy",
|
||||
"name": "🟡乐享汇fans丨老鸭",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.apilyzy.com/api.php/provide/vod/"
|
||||
},
|
||||
{
|
||||
"key": "sewozy",
|
||||
"name": "🟡乐享汇fans丨涩窝",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://sewozyapi.com/api.php/provide/vod"
|
||||
},
|
||||
{
|
||||
"key": "lajiao",
|
||||
"name": "🟡乐享汇fans丨辣椒",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://apilj.com/api.php/provide/vod/at/json/"
|
||||
},
|
||||
{
|
||||
"key": "xiaocao",
|
||||
"name": "🟡乐享汇fans丨小草",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.caoliuzyw.com/api.php/provide/vod"
|
||||
},
|
||||
{
|
||||
"key": "apiyikanapi",
|
||||
"name": "🟡乐享汇fans丨易看",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.yikanapi.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "zy018",
|
||||
"name": "🟡乐享汇fans丨十八",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.zy018.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "9szy",
|
||||
"name": "🟡乐享汇fans丨九色",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://9szy.net/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "apibukazyw",
|
||||
"name": "🟡乐享汇fans丨不卡",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.bukazyw.fun/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "kuaiavzy",
|
||||
"name": "🟡乐享汇fans丨快爱",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://kuaiavzy.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "apivodkok2",
|
||||
"name": "🟡乐享汇fans丨KOK2",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.vodkok2.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "api.maozyapi.com",
|
||||
"name": "🟡乐享汇fans丨猫咪",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.maozyapi.com/inc/apijson_vod.php"
|
||||
},
|
||||
{
|
||||
"key": "siwazywtw",
|
||||
"name": "🟡乐享汇fans丨袜丝①",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.siwazyw.tv/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "siwa",
|
||||
"name": "🟡乐享汇fans丨丝袜②",
|
||||
"api": "caiji.js",
|
||||
"type": 3,
|
||||
"ext": "https://haiwai.siwazyw.org/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "semao",
|
||||
"name": "🟡乐享汇fans丨色猫",
|
||||
"api": "caiji.js",
|
||||
"type": 3,
|
||||
"ext": "https://caiji.semaozy.net/inc/apijson_vod.php"
|
||||
},
|
||||
{
|
||||
"key": "198211",
|
||||
"name": "🟡乐享汇fans丨花色",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://198.211.49.156/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "putaozyw",
|
||||
"name": "🟡乐享汇fans丨葡萄",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://caiji.putaozyw.net/inc/apijson_vod.php"
|
||||
},
|
||||
{
|
||||
"key": "apiddapi",
|
||||
"name": "🟡乐享汇fans丨滴滴",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.ddapi.cc/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "apixbapi",
|
||||
"name": "🟡乐享汇fans丨雪豹",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.xbapi.cc/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "apiyirenziyuan",
|
||||
"name": "🟡乐享汇fans丨依人",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.yirenziyuan.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "kaiyunzy4",
|
||||
"name": "🟡乐享汇fans丨开云",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://kaiyunzy5.com/inc/apijson_vod.php"
|
||||
},
|
||||
{
|
||||
"key": "seyavod",
|
||||
"name": "🟡乐享汇fans丨色鸭",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.seyavod.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "jizhiapi",
|
||||
"name": "🟡乐享汇fans丨极致",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://jizhiapi.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "timizy10",
|
||||
"name": "🟡乐享汇fans丨甜蜜",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://timizy10.cc/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "naixxzy",
|
||||
"name": "🟡乐享汇fans丨奶香",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://naixxzy.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "aosikazy",
|
||||
"name": "🟡乐享汇fans丨奥斯",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://aosikazy.com/api.php/provide/vod/?ac=list"
|
||||
},
|
||||
{
|
||||
"key": "sexnguon",
|
||||
"name": "🟡乐享汇fans丨色南",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.sexnguon.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "156249",
|
||||
"name": "🟡乐享汇fans丨蛋蛋",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://156.249.29.8/inc/apijson_vod.php"
|
||||
},
|
||||
{
|
||||
"key": "kkzy",
|
||||
"name": "🟡乐享汇fans丨写真",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://kkzy.me/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "apig14o",
|
||||
"name": "🟡乐享汇fans丨萝莉",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://api.g14o.cc/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "bominzy",
|
||||
"name": "🟡乐享汇fans丨博民",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.bominzy.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "155api",
|
||||
"name": "🟡乐享汇fans丨十五",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://155api.com/api.php/provide/vod/?ac=list"
|
||||
},
|
||||
{
|
||||
"key": "avre00",
|
||||
"name": "🟡乐享汇fans丨黄瓜",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.avre00.com/api.php/provide/vod/?ac=list"
|
||||
},
|
||||
{
|
||||
"key": "mtav",
|
||||
"name": "🟡乐享汇fans丨桃桃",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://mtav.art/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "888dav.com",
|
||||
"name": "🟡乐享汇fans丨八八",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.888dav.com/api.php/provide/vod/"
|
||||
},
|
||||
{
|
||||
"key": "apittzy.com",
|
||||
"name": "🟡乐享汇fans丨天天",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://apittzy.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "8day",
|
||||
"name": "🟡乐享汇fans丨八天",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://8day.icu/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "5bo1",
|
||||
"name": "🟡乐享汇fans丨五播",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://5bo1.xyz/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "92free",
|
||||
"name": "🟡乐享汇fans丨久爱",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://92free.icu/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "tmav",
|
||||
"name": "🟡乐享汇fans丨美亚",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://tmav.art/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "sezy",
|
||||
"name": "🟡乐享汇fans丨色网",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://sezy.website/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "xxavs",
|
||||
"name": "🟡乐享汇fans丨湿园",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://xxavs.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "auezy",
|
||||
"name": "🟡乐享汇fans丨优异",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://a.uezy.pw/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "hongxiuzy",
|
||||
"name": "🟡乐享汇fans丨红袖",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://hongxiuzy.com/api.php/provide/vod/"
|
||||
},
|
||||
{
|
||||
"key": "apilsbzy1",
|
||||
"name": "🟡乐享汇fans丨色逼",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://apilsbzy1.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "toto-long",
|
||||
"name": "🟡乐享汇fans丨橘猫",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://to.to-long.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "huangpian",
|
||||
"name": "🟡乐享汇fans丨黄片",
|
||||
"api": "caiji.js",
|
||||
"type": 3,
|
||||
"ext": "https://www.pgxdy.com/api/json.php"
|
||||
},
|
||||
{
|
||||
"key": "apittzy",
|
||||
"name": "🟡乐享汇fans丨探探",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://apittzy.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "huakuiapi",
|
||||
"name": "🟡乐享汇fans丨花魁",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://caiji.huakuiapi.com/inc/apijson_vod.php"
|
||||
},
|
||||
{
|
||||
"key": "hghhh",
|
||||
"name": "🟡乐享汇fans丨皇冠",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://hghhh.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "slapibf",
|
||||
"name": "🟡乐享汇fans丨森林",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://slapibf.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "apiyutu",
|
||||
"name": "🟡乐享汇fans丨玉兔",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://apiyutu.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "hszy",
|
||||
"name": "🟡乐享汇fans丨黄色",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://hszy.me/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "haopianapi",
|
||||
"name": "🟡乐享汇fans丨好片",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://haopianapi.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "ziyuan",
|
||||
"name": "🟡乐享汇fans丨湿裤",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://ziyuan.skm3u8.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "jkunzyapi",
|
||||
"name": "🟡乐享汇fans丨鸡坤",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://jkunzyapi.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "10042",
|
||||
"name": "🟡乐享汇fans丨马厂",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://100.42.227.80/api/macs.php"
|
||||
},
|
||||
{
|
||||
"key": "888dav",
|
||||
"name": "🟡乐享汇fans丨抖阴",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.888dav.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "msnii",
|
||||
"name": "🟡乐享汇fans丨美女",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.msnii.com/api/json.php"
|
||||
},
|
||||
{
|
||||
"key": "xrbsp",
|
||||
"name": "🟡乐享汇fans丨淫水",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.xrbsp.com/api/json.php"
|
||||
},
|
||||
{
|
||||
"key": "gdlsp",
|
||||
"name": "🟡乐享汇fans丨香奶",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.gdlsp.com/api/json.php"
|
||||
},
|
||||
{
|
||||
"key": "kxgav",
|
||||
"name": "🟡乐享汇fans丨白嫖",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.kxgav.com/api/json.php"
|
||||
},
|
||||
{
|
||||
"key": "afasu",
|
||||
"name": "🟡乐享汇fans丨湿妹",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://www.afasu.com/api/json.php"
|
||||
},
|
||||
{
|
||||
"key": "dadiapi",
|
||||
"name": "🟡乐享汇fans丨大地",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://dadiapi.com/api.php"
|
||||
},
|
||||
{
|
||||
"key": "lbapi9",
|
||||
"name": "🟡乐享汇fans丨乐播",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "https://lbapi9.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "fhapi9",
|
||||
"name": "🟡乐享汇fans丨番号",
|
||||
"type": 3,
|
||||
"api": "caiji.js",
|
||||
"ext": "http://fhapi9.com/api.php/provide/vod/at/json"
|
||||
},
|
||||
{
|
||||
"key": "mtsp",
|
||||
"name": "🟡乐享汇fans丨蜜桃",
|
||||
"type": 3,
|
||||
"api": "mtsp_open.js"
|
||||
},
|
||||
{
|
||||
"key": "18av",
|
||||
"name": "🟡乐享汇fans丨18AV",
|
||||
"type": 3,
|
||||
"api": "18av_open.js"
|
||||
}
|
||||
]
|
||||
},
|
||||
"read": {
|
||||
"sites": [
|
||||
{
|
||||
"key": "bookan",
|
||||
"name": "🎧乐享汇fans丨博看",
|
||||
"type": 10,
|
||||
"api": "bookan_open.js"
|
||||
},
|
||||
{
|
||||
"key": "lbgs",
|
||||
"name": "🎧乐享汇fans丨老白",
|
||||
"type": 10,
|
||||
"api": "lbgs_open.js"
|
||||
},
|
||||
{
|
||||
"key": "230ts_book",
|
||||
"name": "🎧乐享汇fans丨艾尚①",
|
||||
"type": 10,
|
||||
"api": "230ts_book_open.js"
|
||||
},
|
||||
{
|
||||
"key": "230ts",
|
||||
"name": "🎧乐享汇fans丨艾尚②",
|
||||
"type": 3,
|
||||
"api": "230ts_open.js"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pan": {
|
||||
"sites": [
|
||||
{
|
||||
"key": "alist",
|
||||
"name": "乐享汇fans云盘大全",
|
||||
"type": 40,
|
||||
"api": "alist_open.js",
|
||||
"ext": [
|
||||
{
|
||||
"name": "🟢丫仙女",
|
||||
"server": "http://alist.xiaoya.pro/",
|
||||
"startPage": "/",
|
||||
"showAll": false,
|
||||
"search": true,
|
||||
"headers": {
|
||||
"Authorization": ""
|
||||
},
|
||||
"params": {
|
||||
"/abc": {
|
||||
"password": "123"
|
||||
},
|
||||
"/abc/abc": {
|
||||
"password": "123"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "🟢正奕合集",
|
||||
"server": "http://www.jczyl.top:2115/"
|
||||
},
|
||||
{"name":"🟢小雅搜","server":"http://198.211.29.109:5678/"},
|
||||
{"name":"🟢小丫搜","server":"http://3.37.123.38:5678/"},
|
||||
{
|
||||
"name": "🟢东哥",
|
||||
"server": "http://101.34.67.237:5244/"
|
||||
},
|
||||
{
|
||||
"name": "🟢美云",
|
||||
"server": "http://xiaoya.nebula-nas.space:5678/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小新盘",
|
||||
"server": "https://pan.cdnxin.top/"
|
||||
},
|
||||
{
|
||||
"name": "🟢白云tv",
|
||||
"server": "http://breadmyth.asuscomm.com:22222/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小雅分类",
|
||||
"server": "http://www.jczyl.top:5344/"
|
||||
},
|
||||
{
|
||||
"name": "🟢瑶瑶",
|
||||
"server": "https://lyly.run.goorm.io/"
|
||||
},
|
||||
{
|
||||
"name": "🟢潇洒个人",
|
||||
"server": "https://alist.azad.asia/"
|
||||
},
|
||||
{
|
||||
"name": "🟢鹏程",
|
||||
"server": "https://pan.pengcheng.team/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小丫",
|
||||
"server": "http://alist.xiaoya.pro/"
|
||||
},
|
||||
{
|
||||
"name": "🟢触光",
|
||||
"server": "https://pan.ichuguang.com"
|
||||
},
|
||||
{
|
||||
"name": "🟢星梦",
|
||||
"server": "https://pan.bashroot.top"
|
||||
},
|
||||
{
|
||||
"name": "🟢弱水分享",
|
||||
"server": "http://shicheng.wang:555/"
|
||||
},
|
||||
{
|
||||
"name": "🟢神器云",
|
||||
"server": "https://alist.ygxz.xyz/"
|
||||
},
|
||||
{
|
||||
"name": "🟢资源站",
|
||||
"server": "https://pan.ecve.cn/"
|
||||
},
|
||||
{
|
||||
"name": "🟢雨呢",
|
||||
"server": "https://pan.clun.top/"
|
||||
},
|
||||
{
|
||||
"name": "🟢学习",
|
||||
"server": "http://45.85.77.23:5244/"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "🟢酷呵盘",
|
||||
"server": "https://pan.kuhehe.top/"
|
||||
},
|
||||
{
|
||||
"name": "🟢分享者",
|
||||
"server": "http://223.166.103.170:5244/"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "🟢目瞪口呆",
|
||||
"server": "https://pan.mdgd.cc/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小陈",
|
||||
"server": "https://pan.oldming.top/"
|
||||
},
|
||||
{
|
||||
"name": "🟢动漫盘",
|
||||
"server": "http://pan.smjc.cc"
|
||||
},
|
||||
{
|
||||
"name": "🟢神秘小盘",
|
||||
"server": "https://yun.llzz.top/"
|
||||
},
|
||||
{
|
||||
"name" : "🟢神奇云",
|
||||
"server" : "https://al.chirmyram.com/"
|
||||
|
||||
},
|
||||
{"name":"🟢个人站1","server":"http://223.166.240.80:5244/"},
|
||||
{"name":"🟢个人站2","server":"http://223.166.240.214:5244/"},
|
||||
{"name":"🟢个人站3","server":"http://223.166.201.129:5244/"},
|
||||
{"name":"🟢个人站4","server":"http://223.166.245.122:5244/"},
|
||||
{"name":"🟢个人站5","server":"http://223.166.31.107:5244/"},
|
||||
{
|
||||
"name": "🟢SODAZ1",
|
||||
"server": "https://pan.sodaz.xyz/"
|
||||
},
|
||||
{
|
||||
"name": "🟢ccaa",
|
||||
"server": "http://69.161.221.160:5244/"
|
||||
},
|
||||
{
|
||||
"name": "🟢姹莱坞",
|
||||
"server": "https://alist.agczsz.top/",
|
||||
"passwd": "agree"
|
||||
},
|
||||
{
|
||||
"name": "🟢杜比",
|
||||
"server": "https://dubi.tk"
|
||||
},
|
||||
{
|
||||
"name": "🟢一只鱼",
|
||||
"server": "https://alist.youte.ml"
|
||||
},
|
||||
{
|
||||
"name": "🟢神族九帝",
|
||||
"server": "https://alist.shenzjd.com"
|
||||
},
|
||||
{
|
||||
"name": "🟢老谭",
|
||||
"server": "https://pan.cqtjy.cn/"
|
||||
},
|
||||
{
|
||||
"name": "🟢皓星繁天",
|
||||
"server": "https://pan.hxft.xyz/"
|
||||
},
|
||||
{
|
||||
"name" : "🟢迅维云盘",
|
||||
"server" : "https://pan.xwbeta.com"
|
||||
|
||||
},
|
||||
{
|
||||
"name" : "🟢姬路白雪",
|
||||
"server" : "https://pan.jlbx.xyz"
|
||||
|
||||
},
|
||||
{
|
||||
"name": "🟢肥灿",
|
||||
"server": "http://43.200.153.107:55609/"
|
||||
},
|
||||
{
|
||||
"name": "🟢悦享盘",
|
||||
"server": "https://pity.eu.org/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小雅备用",
|
||||
"server": "http://119.91.79.148:5678/🈴我的阿里分享"
|
||||
},
|
||||
{
|
||||
"name": "🟢小丫云",
|
||||
"server": "http://1.14.19.228:5678/"
|
||||
},
|
||||
{"name": "🟢梓凌妙妙",
|
||||
"server": "https://zi0.cc/"},
|
||||
{"name": "🟢微资·随意盘",
|
||||
"server": "https://apps.weixinqqq.com/"},
|
||||
{
|
||||
"name": "🟢小丫分类备用",
|
||||
"server": "http://123.60.191.158:5678/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小雅云",
|
||||
"server": "https://xiaoya.whp.lat/"
|
||||
},
|
||||
{
|
||||
"name": "🟢ecve资源",
|
||||
"server": "https://pan.ecve.cn/"
|
||||
},
|
||||
{
|
||||
"name": "🟢潇洒备用",
|
||||
"server": "http://www.azad.asia:5244/"
|
||||
},
|
||||
{"name":"🟡ASMR语音","server":"https://www.asmrgay.com/"},
|
||||
{"name":"🟡大人盘","server": "https://hka.252798.xyz:1443/"},
|
||||
{"name":"🟡木偶","server":"https://abnormalize.icu/"},
|
||||
{
|
||||
"name": "🟡A大杂物库",
|
||||
"server": "https://alist.qyide.com/"
|
||||
},
|
||||
{
|
||||
"name": "🟡诸神小盘",
|
||||
"server": "https://pan.zsxg.top/"
|
||||
},
|
||||
{
|
||||
"name": "🟡福利盘",
|
||||
"server": "http://69.161.221.160:5244/"
|
||||
},
|
||||
{
|
||||
"name": "🟡罗汉果盘",
|
||||
"server": "https://lala-ofbip.run.goorm.site/"
|
||||
},
|
||||
{
|
||||
"name": "🟡爱豆福利",
|
||||
"server": "https://alist.eduedu.eu.org/"
|
||||
},
|
||||
{
|
||||
"name": "🟡涛涛收藏",
|
||||
"server": "https://alist.eduedu.eu.org/"
|
||||
},
|
||||
{
|
||||
"name": "🟢正奕合集",
|
||||
"server": "http://www.jczyl.top:5244/"
|
||||
},
|
||||
{
|
||||
"name": "🟢东哥",
|
||||
"server": "http://101.34.67.237:5244/"
|
||||
},
|
||||
{
|
||||
"name": "🟢美云",
|
||||
"server": "https://h.dfjx.ltd/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小新盘",
|
||||
"server": "https://pan.cdnxin.top/"
|
||||
},
|
||||
{
|
||||
"name": "🟢白云tv",
|
||||
"server": "http://breadmyth.asuscomm.com:22222/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小雅分类",
|
||||
"server": "http://www.214728327.xyz:5207/"
|
||||
},
|
||||
{
|
||||
"name": "🟢瑶瑶",
|
||||
"server": "https://lyly.run.goorm.io/"
|
||||
},
|
||||
{
|
||||
"name": "🟢潇洒个人",
|
||||
"server": "https://alist.azad.asia/"
|
||||
},
|
||||
{
|
||||
"name": "🟢鹏程",
|
||||
"server": "https://pan.pengcheng.team/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小丫",
|
||||
"server": "http://alist.xiaoya.pro/"
|
||||
},
|
||||
{
|
||||
"name": "🟢触光",
|
||||
"server": "https://pan.ichuguang.com"
|
||||
},
|
||||
{
|
||||
"name": "🟢星梦",
|
||||
"server": "https://pan.bashroot.top"
|
||||
},
|
||||
{
|
||||
"name": "🟢弱水分享",
|
||||
"server": "http://shicheng.wang:555/"
|
||||
},
|
||||
{
|
||||
"name": "🟢神器云",
|
||||
"server": "https://alist.ygxz.xyz/"
|
||||
},
|
||||
{
|
||||
"name": "🟢酷呵盘",
|
||||
"server": "https://pan.kuhehe.top/"
|
||||
},
|
||||
{
|
||||
"name": "🟢分享者",
|
||||
"server": "https://melist.me/"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "🟢目瞪口呆",
|
||||
"server": "https://pan.mdgd.cc/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小陈",
|
||||
"server": "https://ypan.cc/"
|
||||
},
|
||||
{
|
||||
"name": "🟢动漫盘",
|
||||
"server": "http://pan.smjc.cc"
|
||||
},
|
||||
{
|
||||
"name": "🟢神秘小盘",
|
||||
"server": "https://yun.ltt.zone/"
|
||||
},
|
||||
{
|
||||
"name" : "🟢神奇云",
|
||||
"server" : "https://al.chirmyram.com/"
|
||||
|
||||
},
|
||||
{
|
||||
"name": "🟢SODAZ1",
|
||||
"server": "https://pan.sodaz.xyz/"
|
||||
},
|
||||
{
|
||||
"name": "🟢ccaa",
|
||||
"server": "http://ww1.ccaac.xyz/"
|
||||
},
|
||||
{
|
||||
"name": "🟢姹莱坞",
|
||||
"server": "https://alist.agczsz.top/",
|
||||
"passwd": "agree"
|
||||
},
|
||||
{
|
||||
"name": "🟢杜比",
|
||||
"server": "https://dubi.tk"
|
||||
},
|
||||
{
|
||||
"name": "🟢一只鱼",
|
||||
"server": "https://alist.youte.ml"
|
||||
},
|
||||
{
|
||||
"name": "🟢神族九帝",
|
||||
"server": "https://alist.shenzjd.com"
|
||||
},
|
||||
{
|
||||
"name": "🟢老谭",
|
||||
"server": "https://pan.cqtjy.cn/"
|
||||
},
|
||||
{
|
||||
"name": "🟢皓星繁天",
|
||||
"server": "https://pan.hxft.xyz/"
|
||||
},
|
||||
{
|
||||
"name" : "🟢迅维云盘",
|
||||
"server" : "https://pan.xwbeta.com"
|
||||
|
||||
},
|
||||
{
|
||||
"name" : "🟢姬路白雪",
|
||||
"server" : "https://pan.jlbx.xyz"
|
||||
|
||||
},
|
||||
{
|
||||
"name": "🟢肥灿",
|
||||
"server": "http://43.200.153.107:55609/"
|
||||
},
|
||||
{
|
||||
"name": "🟢悦享盘",
|
||||
"server": "https://pity.eu.org/"
|
||||
},
|
||||
{
|
||||
"name": "🟢小雅备用",
|
||||
"server": "http://123.60.188.109:5678/"
|
||||
},
|
||||
{"name": "🟢梓凌妙妙",
|
||||
"server": "https://zi0.cc/"},
|
||||
{"name": "🟢微资·随意盘",
|
||||
"server": "https://apps.weixinqqq.com/"},
|
||||
{
|
||||
"name": "🟡A大杂物库",
|
||||
"server": "https://alist.qyide.com/"
|
||||
},
|
||||
{
|
||||
"name": "🟡诸神小盘",
|
||||
"server": "https://pan.zsxg.top/"
|
||||
},
|
||||
{
|
||||
"name": "🟡福利盘",
|
||||
"server": "http://69.161.221.160:5244/"
|
||||
},
|
||||
{
|
||||
"name": "公众号:乐享汇fans",
|
||||
"server": "https://pan.xwbeta.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
1
js/lib/ali.js
Normal file
1
js/lib/ali.js
Normal file
@@ -0,0 +1 @@
|
||||
function _0x4aa5(_0x48caa3,_0x315644){const _0x2164f9=_0x574f();return _0x4aa5=function(_0x5e2b05,_0x179281){_0x5e2b05=_0x5e2b05-0x164;let _0x164327=_0x2164f9[_0x5e2b05];return _0x164327;},_0x4aa5(_0x48caa3,_0x315644);}(function(_0x5f4666,_0x55a733){const _0x4589e5=_0x4aa5,_0xd355a0=_0x5f4666();while(!![]){try{const _0x1e1fc1=-parseInt(_0x4589e5(0x174))/0x1+-parseInt(_0x4589e5(0x168))/0x2+-parseInt(_0x4589e5(0x167))/0x3+parseInt(_0x4589e5(0x17e))/0x4*(parseInt(_0x4589e5(0x17b))/0x5)+parseInt(_0x4589e5(0x164))/0x6+parseInt(_0x4589e5(0x16c))/0x7+parseInt(_0x4589e5(0x181))/0x8*(-parseInt(_0x4589e5(0x177))/0x9);if(_0x1e1fc1===_0x55a733)break;else _0xd355a0['push'](_0xd355a0['shift']());}catch(_0x265350){_0xd355a0['push'](_0xd355a0['shift']());}}}(_0x574f,0x20821));const _0x179281=(function(){let _0x4eda66=!![];return function(_0x55af6d,_0x22e5f4){const _0x4a4b00=_0x4eda66?function(){const _0x5ab790=_0x4aa5;if(_0x22e5f4){const _0x1659b9=_0x22e5f4[_0x5ab790(0x169)](_0x55af6d,arguments);return _0x22e5f4=null,_0x1659b9;}}:function(){};return _0x4eda66=![],_0x4a4b00;};}()),_0x5e2b05=_0x179281(this,function(){const _0x11faca=_0x4aa5;let _0x2fa19b;try{const _0x3ff2b9=Function('return\x20(fu'+'nction()\x20'+(_0x11faca(0x16a)+_0x11faca(0x176)+_0x11faca(0x17a)+'\x20)')+');');_0x2fa19b=_0x3ff2b9();}catch(_0x25b157){_0x2fa19b=window;}const _0x3c5f06=_0x2fa19b['console']=_0x2fa19b['console']||{},_0x39a2bd=[_0x11faca(0x16e),_0x11faca(0x17d),'info','error',_0x11faca(0x17f),_0x11faca(0x183),'trace'];for(let _0x3fb5be=0x0;_0x3fb5be<_0x39a2bd[_0x11faca(0x173)];_0x3fb5be++){const _0x47f835=_0x179281[_0x11faca(0x16f)+'r'][_0x11faca(0x165)][_0x11faca(0x175)](_0x179281),_0xdc762c=_0x39a2bd[_0x3fb5be],_0x525bd5=_0x3c5f06[_0xdc762c]||_0x47f835;_0x47f835['__proto__']=_0x179281['bind'](_0x179281),_0x47f835[_0x11faca(0x172)]=_0x525bd5[_0x11faca(0x172)]['bind'](_0x525bd5),_0x3c5f06[_0xdc762c]=_0x47f835;}});_0x5e2b05();import{_}from'assets://js/lib/cat.js';import{initSome,setToken,getVod,playerContent,playerContentByFlag}from'./ali_api.js';const aliPattern=/(www.aliyundrive.com|www.alipan.com)\/s\/([^\/]+)(\/folder\/([^\/]+))?/;async function initAli(_0x413000){await initSome(),setToken(_0x413000);}async function detailContent(_0x4bc326){const _0x1a33eb=_0x4aa5;let _0x54bbc1=_0x4bc326['match'](aliPattern),_0x7888de=await parseVod(_0x54bbc1,_0x4bc326);const _0x9e9dd1={};_0x9e9dd1[_0x1a33eb(0x178)]=[_0x7888de];let _0x197b45=JSON['stringify'](_0x9e9dd1);return _0x197b45;}async function parseVod(_0x10689f,_0x1108c0){if(_['isEmpty'](_0x10689f))return{};let _0x474eae=_0x10689f[0x2],_0x36fe63=_0x10689f['length']>0x4?_0x10689f[0x4]:'';return await getVod(_0x474eae,_0x1108c0,_0x36fe63);}async function playContent(_0x52c526,_0x421b73,_0x4f10f8){const _0x3b573d=_0x4aa5;let _0x4fe837=_0x421b73['split']('+');_0x52c526=_0x52c526['split']('#')[0x0];let _0x2e68e0=_0x52c526=='原画'?await playerContent(_0x4fe837):await playerContentByFlag(_0x4fe837,_0x52c526);return console[_0x3b573d(0x186)](_0x3b573d(0x16b)+_0x3b573d(0x17c)+_0x3b573d(0x185)),console[_0x3b573d(0x186)](_0x2e68e0),_0x2e68e0;}function _0x574f(){const _0x44da7e=['prototype','isEmpty','374088ntufPj','121556CEjSKd','apply','{}.constru','-----playC','1731275IhHZho','vod_play_u','log','constructo','match','普画#','toString','length','125186RUUvVq','bind','ctor(\x22retu','3744KZBwKz','list','原画#','rn\x20this\x22)(','577405PyhvtD','ontent----','warn','4TSKBsq','exception','push','2832JFmsUo','join','table','$$$','---','debug','1369626tULFbE'];_0x574f=function(){return _0x44da7e;};return _0x574f();}function detailContentVodPlayFrom(_0xbe55e7){const _0x3fa4bc=_0x4aa5;let _0x305855=[];if(_0xbe55e7[_0x3fa4bc(0x173)]<0x2)return['原画','普画'][_0x3fa4bc(0x182)](_0x3fa4bc(0x184));for(let _0x241caf=0x1;_0x241caf<=_0xbe55e7[_0x3fa4bc(0x173)];_0x241caf++){_0x305855['push'](_0x3fa4bc(0x179)+_0x241caf),_0x305855[_0x3fa4bc(0x180)](_0x3fa4bc(0x171)+_0x241caf);}return _0x305855[_0x3fa4bc(0x182)](_0x3fa4bc(0x184));}async function detailContentVodPlayUrl(_0x2b2389){const _0x3ba1ef=_0x4aa5;let _0x2f0a10=[];for(var _0x954556 of _0x2b2389){let _0x5a95a4=_0x954556[_0x3ba1ef(0x170)](aliPattern);if(!_[_0x3ba1ef(0x166)](_0x5a95a4)){let _0x139a04=await parseVod(_0x5a95a4,_0x954556);_0x2f0a10['push'](_0x139a04[_0x3ba1ef(0x16d)+'rl']);}}return _0x2f0a10[_0x3ba1ef(0x182)](_0x3ba1ef(0x184));}export{initAli,detailContent,playContent,detailContentVodPlayFrom,detailContentVodPlayUrl,aliPattern};
|
||||
1
js/lib/ali_api.js
Normal file
1
js/lib/ali_api.js
Normal file
File diff suppressed because one or more lines are too long
1
js/lib/cat.js
Normal file
1
js/lib/cat.js
Normal file
File diff suppressed because one or more lines are too long
1
js/lib/quark.js
Normal file
1
js/lib/quark.js
Normal file
@@ -0,0 +1 @@
|
||||
(function(_0x3e855f,_0x23aa8e){const _0x1f99aa=_0x2b62,_0x4d3ea3=_0x3e855f();while(!![]){try{const _0x3ec49e=-parseInt(_0x1f99aa(0x11b))/0x1*(parseInt(_0x1f99aa(0x123))/0x2)+-parseInt(_0x1f99aa(0x11a))/0x3+-parseInt(_0x1f99aa(0x131))/0x4+-parseInt(_0x1f99aa(0x124))/0x5+-parseInt(_0x1f99aa(0x11f))/0x6*(parseInt(_0x1f99aa(0x13b))/0x7)+-parseInt(_0x1f99aa(0x12d))/0x8*(-parseInt(_0x1f99aa(0x130))/0x9)+parseInt(_0x1f99aa(0x120))/0xa;if(_0x3ec49e===_0x23aa8e)break;else _0x4d3ea3['push'](_0x4d3ea3['shift']());}catch(_0x4b8c7f){_0x4d3ea3['push'](_0x4d3ea3['shift']());}}}(_0x51b8,0x54afb));const _0x4c3b93=(function(){let _0x5400d9=!![];return function(_0x486bae,_0x29a1f8){const _0x4650ae=_0x5400d9?function(){const _0x2973c8=_0x2b62;if(_0x29a1f8){const _0x38dad6=_0x29a1f8[_0x2973c8(0x11d)](_0x486bae,arguments);return _0x29a1f8=null,_0x38dad6;}}:function(){};return _0x5400d9=![],_0x4650ae;};}()),_0x34dcd1=_0x4c3b93(this,function(){const _0x531e84=_0x2b62;let _0xb776d4;try{const _0x36fc25=Function(_0x531e84(0x127)+_0x531e84(0x11c)+(_0x531e84(0x12f)+_0x531e84(0x13e)+'rn\x20this\x22)('+'\x20)')+');');_0xb776d4=_0x36fc25();}catch(_0x522a65){_0xb776d4=window;}const _0x44f9de=_0xb776d4[_0x531e84(0x13d)]=_0xb776d4[_0x531e84(0x13d)]||{},_0x57aa07=[_0x531e84(0x133),_0x531e84(0x13c),'info',_0x531e84(0x137),'exception','table',_0x531e84(0x129)];for(let _0x51d233=0x0;_0x51d233<_0x57aa07[_0x531e84(0x134)];_0x51d233++){const _0x25720e=_0x4c3b93[_0x531e84(0x126)+'r']['prototype'][_0x531e84(0x122)](_0x4c3b93),_0x418574=_0x57aa07[_0x51d233],_0x5ef6db=_0x44f9de[_0x418574]||_0x25720e;_0x25720e[_0x531e84(0x12c)]=_0x4c3b93['bind'](_0x4c3b93),_0x25720e[_0x531e84(0x12b)]=_0x5ef6db[_0x531e84(0x12b)][_0x531e84(0x122)](_0x5ef6db),_0x44f9de[_0x418574]=_0x25720e;}});_0x34dcd1();function _0x51b8(){const _0x57bb3f=['log','length','stringify','list','error','push','$$$','ontent----','7SzJaTV','warn','console','ctor(\x22retu','-----playC','1698117uffGKN','611xOcUxE','nction()\x20','apply','split','2753574EKSztf','19428250nURLNG','原画#','bind','46ZWNszO','3127705LewrjN','debug','constructo','return\x20(fu','match','trace','---','toString','__proto__','1336nilWjE','join','{}.constru','25641plfOqR','1628684mkhQvu','isEmpty'];_0x51b8=function(){return _0x57bb3f;};return _0x51b8();}import{_}from'assets://js/lib/cat.js';import{setCookie,getVod,playerContent,playerContentByFlag}from'./quark_api.js';const quarkPattern=/pan.quark.cn\/s\/([^\/\?#]+)/;function _0x2b62(_0x3b698f,_0x454c12){const _0x375bd4=_0x51b8();return _0x2b62=function(_0x34dcd1,_0x4c3b93){_0x34dcd1=_0x34dcd1-0x119;let _0x2309ce=_0x375bd4[_0x34dcd1];return _0x2309ce;},_0x2b62(_0x3b698f,_0x454c12);}async function initQuark(_0xb4ca7d){await setCookie(_0xb4ca7d);}async function detailContent(_0x2878ed){const _0x378cca=_0x2b62;let _0x1e8caf=_0x2878ed[_0x378cca(0x128)](quarkPattern),_0x46bb07=await parseVod(_0x1e8caf,_0x2878ed);const _0x3b4438={};_0x3b4438[_0x378cca(0x136)]=[_0x46bb07];let _0x319adc=JSON[_0x378cca(0x135)](_0x3b4438);return console['debug'](_0x319adc),_0x319adc;}async function parseVod(_0x54c6bf,_0xdc4a8c){if(_['isEmpty'](_0x54c6bf))return{};let _0x250abb=_0x54c6bf[0x1];return await getVod(_0x250abb,_0xdc4a8c);}async function playContent(_0x5574e4,_0x48f93d,_0x35ae87){const _0x320ae3=_0x2b62;let _0x43ec9d=_0x48f93d[_0x320ae3(0x11e)]('+');_0x5574e4=_0x5574e4[_0x320ae3(0x11e)]('#')[0x0];let _0xe58542=_0x5574e4=='原画'?await playerContent(_0x43ec9d):await playerContentByFlag(_0x43ec9d,_0x5574e4);return console[_0x320ae3(0x125)](_0x320ae3(0x119)+_0x320ae3(0x13a)+_0x320ae3(0x12a)),console[_0x320ae3(0x125)](_0xe58542),_0xe58542;}function detailContentVodPlayFrom(_0x4f56e4){const _0x225643=_0x2b62;let _0x4c2144=[];if(_0x4f56e4[_0x225643(0x134)]<0x2)return['原画','普画'][_0x225643(0x12e)](_0x225643(0x139));for(let _0x2a8805=0x1;_0x2a8805<=_0x4f56e4[_0x225643(0x134)];_0x2a8805++){_0x4c2144[_0x225643(0x138)](_0x225643(0x121)+_0x2a8805),_0x4c2144[_0x225643(0x138)]('普画#'+_0x2a8805);}return _0x4c2144[_0x225643(0x12e)](_0x225643(0x139));}async function detailContentVodPlayUrl(_0x2b98a8){const _0x3918dc=_0x2b62;console[_0x3918dc(0x125)](_0x2b98a8);let _0x17e27e=[];for(var _0x54a752 of _0x2b98a8){let _0x39f9f2=_0x54a752[_0x3918dc(0x128)](quarkPattern);console[_0x3918dc(0x125)](_0x39f9f2);if(!_[_0x3918dc(0x132)](_0x39f9f2)){let _0x36366a=await parseVod(_0x39f9f2,_0x54a752);_0x17e27e[_0x3918dc(0x138)](_0x36366a['vod_play_u'+'rl']);}}return _0x17e27e[_0x3918dc(0x12e)](_0x3918dc(0x139));}export{initQuark,detailContent,playContent,detailContentVodPlayFrom,detailContentVodPlayUrl};
|
||||
1
js/lib/quark_api.js
Normal file
1
js/lib/quark_api.js
Normal file
File diff suppressed because one or more lines are too long
1
js/lib/similarity.js
Normal file
1
js/lib/similarity.js
Normal file
@@ -0,0 +1 @@
|
||||
function compareTwoStrings(first,second){if((first=first.replace(/\s+/g,""))===(second=second.replace(/\s+/g,"")))return 1;if(first.length<2||second.length<2)return 0;var firstBigrams=new Map;for(let i=0;i<first.length-1;i++){var bigram=first.substring(i,i+2),count=firstBigrams.has(bigram)?firstBigrams.get(bigram)+1:1;firstBigrams.set(bigram,count)}let intersectionSize=0;for(let i=0;i<second.length-1;i++){const bigram=second.substring(i,i+2),count=firstBigrams.has(bigram)?firstBigrams.get(bigram):0;0<count&&(firstBigrams.set(bigram,count-1),intersectionSize++)}return 2*intersectionSize/(first.length+second.length-2)}function findBestMatch(mainString,targetStrings){var ratings=[];let bestMatchIndex=0;for(let i=0;i<targetStrings.length;i++){var currentTargetString=targetStrings[i],currentRating=compareTwoStrings(mainString,currentTargetString);ratings.push({target:currentTargetString,rating:currentRating}),currentRating>ratings[bestMatchIndex].rating&&(bestMatchIndex=i)}return{ratings:ratings,bestMatch:ratings[bestMatchIndex],bestMatchIndex:bestMatchIndex}}function lcs(str1,str2){if(!str1||!str2)return{length:0,sequence:"",offset:0};for(var sequence="",str1Length=str1.length,str2Length=str2.length,num=new Array(str1Length),maxlen=0,lastSubsBegin=0,i=0;i<str1Length;i++){for(var subArray=new Array(str2Length),j=0;j<str2Length;j++)subArray[j]=0;num[i]=subArray}for(var thisSubsBegin=null,i=0;i<str1Length;i++)for(j=0;j<str2Length;j++)str1[i]!==str2[j]?num[i][j]=0:(num[i][j]=0===i||0===j?1:1+num[i-1][j-1],num[i][j]>maxlen&&(maxlen=num[i][j],lastSubsBegin===(thisSubsBegin=i-num[i][j]+1)?sequence+=str1[i]:(lastSubsBegin=thisSubsBegin,sequence="",sequence+=str1.substr(lastSubsBegin,i+1-lastSubsBegin))));return{length:maxlen,sequence:sequence,offset:thisSubsBegin}}function findBestLCS(mainString,targetStrings){var results=[];let bestMatchIndex=0;for(let i=0;i<targetStrings.length;i++){var currentTargetString=targetStrings[i],currentLCS=lcs(mainString,currentTargetString);results.push({target:currentTargetString,lcs:currentLCS}),currentLCS.length>results[bestMatchIndex].lcs.length&&(bestMatchIndex=i)}return{allLCS:results,bestMatch:results[bestMatchIndex],bestMatchIndex:bestMatchIndex}}export{compareTwoStrings,findBestMatch,findBestLCS};
|
||||
1
js/lib/utils.js
Normal file
1
js/lib/utils.js
Normal file
@@ -0,0 +1 @@
|
||||
(function(_0x2fcbd1,_0x501d57){var _0x165b1a=_0x5918,_0x47a56d=_0x2fcbd1();while(!![]){try{var _0x12e05a=parseInt(_0x165b1a(0x1b0))/0x1*(-parseInt(_0x165b1a(0x1a7))/0x2)+-parseInt(_0x165b1a(0x1a5))/0x3+-parseInt(_0x165b1a(0x1b5))/0x4+-parseInt(_0x165b1a(0x19c))/0x5+parseInt(_0x165b1a(0x1a0))/0x6*(-parseInt(_0x165b1a(0x1ad))/0x7)+parseInt(_0x165b1a(0x1ab))/0x8+parseInt(_0x165b1a(0x1a3))/0x9*(parseInt(_0x165b1a(0x1b9))/0xa);if(_0x12e05a===_0x501d57)break;else _0x47a56d['push'](_0x47a56d['shift']());}catch(_0x9c6f67){_0x47a56d['push'](_0x47a56d['shift']());}}}(_0x2958,0xb7e17));var _0x2e228f=(function(){var _0x4644c1=!![];return function(_0x389bde,_0xe2b0bb){var _0x432fb7=_0x4644c1?function(){var _0x2697bf=_0x5918;if(_0xe2b0bb){var _0x1b1073=_0xe2b0bb[_0x2697bf(0x1b7)](_0x389bde,arguments);return _0xe2b0bb=null,_0x1b1073;}}:function(){};return _0x4644c1=![],_0x432fb7;};}()),_0x40d570=_0x2e228f(this,function(){var _0x1f610a=_0x5918,_0x579c06;try{var _0x5d8fe5=Function('return\x20(fu'+_0x1f610a(0x1a8)+('{}.constru'+'ctor(\x22retu'+_0x1f610a(0x1af)+'\x20)')+');');_0x579c06=_0x5d8fe5();}catch(_0x231f00){_0x579c06=window;}var _0x124e35=_0x579c06['console']=_0x579c06[_0x1f610a(0x1b1)]||{},_0x173a82=['log',_0x1f610a(0x1b6),'info',_0x1f610a(0x194),'exception',_0x1f610a(0x19f),_0x1f610a(0x199)];for(var _0x4ba7a3=0x0;_0x4ba7a3<_0x173a82[_0x1f610a(0x196)];_0x4ba7a3++){var _0x4bf8ec=_0x2e228f['constructo'+'r'][_0x1f610a(0x19a)][_0x1f610a(0x19b)](_0x2e228f),_0x640d0=_0x173a82[_0x4ba7a3],_0x871007=_0x124e35[_0x640d0]||_0x4bf8ec;_0x4bf8ec['__proto__']=_0x2e228f['bind'](_0x2e228f),_0x4bf8ec[_0x1f610a(0x1a9)]=_0x871007['toString'][_0x1f610a(0x19b)](_0x871007),_0x124e35[_0x640d0]=_0x4bf8ec;}});_0x40d570();function _0x5918(_0x1f3ad8,_0x518967){var _0x391c01=_0x2958();return _0x5918=function(_0x40d570,_0x2e228f){_0x40d570=_0x40d570-0x191;var _0x103fd0=_0x391c01[_0x40d570];return _0x103fd0;},_0x5918(_0x1f3ad8,_0x518967);}function isSub(_0x36c2fb){var _0x257809=_0x5918;return _0x36c2fb==_0x257809(0x1ba)||_0x36c2fb==_0x257809(0x191)||_0x36c2fb==_0x257809(0x197);}function getSize(_0x2a2578){var _0x1b9599=_0x5918;if(_0x2a2578<=0x0)return'';if(_0x2a2578>0x400*0x400*0x400*0x400)return _0x2a2578/=0x400*0x400*0x400*0x400,_0x2a2578[_0x1b9599(0x1a2)](0x2)+'TB';else{if(_0x2a2578>0x400*0x400*0x400)return _0x2a2578/=0x400*0x400*0x400,_0x2a2578['toFixed'](0x2)+'GB';else return _0x2a2578>0x400*0x400?(_0x2a2578/=0x400*0x400,_0x2a2578[_0x1b9599(0x1a2)](0x2)+'MB'):(_0x2a2578/=0x400,_0x2a2578[_0x1b9599(0x1a2)](0x2)+'KB');}}function removeExt(_0x187fcd){var _0x2afcf6=_0x5918;return _0x187fcd[_0x2afcf6(0x1aa)]('.')>-0x1?_0x187fcd[_0x2afcf6(0x19d)](0x0,_0x187fcd['lastIndexO'+'f']('.')):_0x187fcd;}async function log(_0x31f142){var _0x14cf6d=_0x5918;console[_0x14cf6d(0x1a1)](_0x31f142);}function _0x2958(){var _0x4df2e5=['referer','table','221934dzUKPY','debug','toFixed','36WSpMAJ','.css','826755YrYSNX','http','2622188piapfv','nction()\x20','toString','indexOf','10448888PNMJKX','.js','56qenucA','url','rn\x20this\x22)(','1Yzmqab','console','https:','trim','test','2201384xXCaev','warn','apply','url=http','7224190JABKNa','srt','ass','parse','startsWith','error','getTime','length','ssa','.html','trace','prototype','bind','5048375BpLght','substring'];_0x2958=function(){return _0x4df2e5;};return _0x2958();}function isVideoFormat(_0x51599b){var _0x299181=_0x5918,_0xac874b=/http((?!http).){12,}?\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)\?.*|http((?!http).){12,}\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)|http((?!http).)*?video\/tos*/;if(_0x51599b[_0x299181(0x1aa)](_0x299181(0x1b8))>-0x1||_0x51599b['indexOf'](_0x299181(0x1ac))>-0x1||_0x51599b[_0x299181(0x1aa)](_0x299181(0x1a4))>-0x1||_0x51599b['indexOf'](_0x299181(0x198))>-0x1)return![];return _0xac874b[_0x299181(0x1b4)](_0x51599b);}function jsonParse(_0x551984,_0x798ef8){var _0x286d73=_0x5918,_0x3c3cbf=JSON[_0x286d73(0x192)](_0x798ef8),_0xf0aae9=_0x3c3cbf[_0x286d73(0x1ae)];_0xf0aae9['startsWith']('//')&&(_0xf0aae9=_0x286d73(0x1b2)+_0xf0aae9);if(!_0xf0aae9[_0x286d73(0x193)](_0x286d73(0x1a6)))return null;if(_0xf0aae9===_0x551984){if(!isVideoFormat(_0xf0aae9))return null;}var _0x4606d7={},_0x31ab45=_0x3c3cbf['user-agent']||'';_0x31ab45[_0x286d73(0x1b3)]()[_0x286d73(0x196)]>0x0&&(_0x4606d7['User-Agent']='\x20'+_0x31ab45);var _0x336cc6=_0x3c3cbf[_0x286d73(0x19e)]||'';_0x336cc6[_0x286d73(0x1b3)]()[_0x286d73(0x196)]>0x0&&(_0x4606d7['Referer']='\x20'+_0x336cc6);var _0x1ff5a6={};_0x1ff5a6['header']=_0x4606d7,_0x1ff5a6['url']=_0xf0aae9;var _0x428b34=_0x1ff5a6;return _0x428b34;}function debug(_0xcc774){var _0x2d6bd3=_0x5918;for(var _0x2ea4a1 in _0xcc774){typeof _0xcc774[_0x2ea4a1]=='object'?debug(_0xcc774[_0x2ea4a1]):console[_0x2d6bd3(0x1a1)](_0x2ea4a1+'='+_0xcc774[_0x2ea4a1]);}}function sleep(_0x2af9dd){var _0x2e091f=_0x5918,_0x1ae800=new Date()['getTime']();while(new Date()[_0x2e091f(0x195)]()-_0x1ae800<_0x2af9dd){continue;}}export{isSub,getSize,removeExt,log,isVideoFormat,jsonParse,debug,sleep};
|
||||
Reference in New Issue
Block a user