Add files via upload

This commit is contained in:
alantang 2023-12-06 16:43:48 +08:00 committed by GitHub
parent f53e8009e4
commit d031f7b71a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 2704 additions and 0 deletions

1
cat/bilibili.js Normal file
View 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};

136
cat/bookan_book_open.js Normal file
View 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
cat/bookan_open.js Normal file
View file

@ -0,0 +1,136 @@
import { _ } from './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,
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,
};
}

190
cat/boosj_open.js Normal file
View 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
cat/build.js Normal file
View 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
cat/bulei_open.js Normal file

File diff suppressed because one or more lines are too long

1
cat/caiji.js Normal file
View file

@ -0,0 +1 @@
//bbQ0FUT1BNEGNhaWppLmpzLGFzc2V0czovL2pzL2xpYi9jYXQuanMcX19qc0V2YWxSZXR1cm4CXw5zaXRlS2V5EHNpdGVUeXBlBFVBDmJhc2VVcmwUY2F0ZWdvcmllcwhpbml0EmdldEhlYWRlchJnZXRTdHJpbmcIaG9tZQ5ob21lVm9kEGNhdGVnb3J5DGRldGFpbAhwbGF5DHNlYXJjaN4BTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkg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AAYgEAJAEAyWICAEEFAQAAs0fKZQIAQhIBAABiAwAkAQDoBwT+AAAALgtiAwBBBgEAAEwGAQAAYgMAQQcBAABMBwEAAGIDAEH7AAAATPsAAABiAwBBCAEAAEwIAQAAYgMAQRMBAABMEwEAAGIDAEEUAQAATBQBAABiAwBBFQEAABHpAw6/TBUBAABiAwBBFgEAABHpAw6/TBYBAABiAwBBCQEAABHpAw6/TAkBAABiAwBBFwEAAEwXAQAAYgMAQRgBAABMGAEAAGIDAEEZAQAATBkBAADBBDiYAAAAQvwAAAALYgQAJgEATAUBAAAkAQAupANMGE4/Jlg6UxwICERERERERF1dXURERA46Og5iBgHCAwMAAwQAABsDtAQAAQCeBAABANoBAAEAOJgAAABC/AAAAAuzTPcAAADQTOoAAAAkAQAupANpBAM6ISEOYgYBxAMDBQMHAgDRAQi2BAABALgEAAEAgAQAAQDgAwEAMOIDAQEw5AMBAjCEBAEDIKAEAwQwsgMECLgDBwBhAwBhAgBhAQBhAADRs6ToA7TVZQAABB0BAACdz50EBAEAAJ3RncfcYgAA7YvIOJgAAABC9wAAAGIBACQBAMkmAADKYQQAYgIAQQUBAAB96kTBBGIDAEL5AAAAC2IEAEEGAQAATAYBAABiBABBBwEAAEwHAQAAYgQAQQgBAABMCAEAAGIEAEEJAQAATAkBAAAkAQAOgADoug6DOJgAAABC/AAAAAs4CgEAAGICAEELAQAA7UwLAQAAYgIAQQwBAABMDAEAAGIDAEwFAQAAJAEALqQDcRI/JmcmWBdTMEREREQXIjpiRCsOQwYBqAMAAAACBwAyALQDBQC6AwgAvAMJAL4DCgDAAwsAwgMMAMQDDQAL20zaAAAA3EzdAAAA3UzeAAAA3kzfAAAAXgQATOAAAABeBQBM4QAAAF4GAEziAAAAKKQDhwEJAwghISEhKysr

109
cat/cntv_open.js Normal file
View 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,
}
}

1181
cat/config_open.json Normal file

File diff suppressed because it is too large Load diff

240
cat/czzy2_open.js Normal file
View file

@ -0,0 +1,240 @@
import { Crypto, load, _ } from './lib/cat.js';
let key = 'czzy';
let url = 'https://www.czzy.fun/';
let siteKey = '';
let siteType = 0;
const UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1';
const cookie = {};
async function request(reqUrl, referer, mth, data, hd) {
const headers = {
'User-Agent': UA,
Cookie: _.map(cookie, (value, key) => {
return `${key}=${value}`;
}).join(';'),
};
if (referer) headers.referer = encodeURIComponent(referer);
let res = await req(reqUrl, {
method: mth || 'get',
headers: headers,
data: data,
postType: mth === 'post' ? 'form' : '',
});
if (res.headers['set-cookie']) {
const set_cookie = _.isArray(res.headers['set-cookie']) ? res.headers['set-cookie'].join(';') : res.headers['set-cookie'];
const cks = set_cookie.split(';');
for (const c of cks) {
const tmp = c.trim();
if (tmp.startsWith('result=')) {
cookie.result = tmp.substring(7);
return await request(reqUrl, reqUrl, 'post', {
result: cookie.result,
});
} else if (tmp.startsWith('esc_search_captcha=1')) {
cookie.esc_search_captcha = 1;
delete cookie.result;
return await request(reqUrl);
}
}
// console.log(res.headers['set-cookie']);
}
return res.content;
}
// cfg = {skey: siteKey, ext: extend}
async function init(cfg) {
siteKey = cfg.skey;
siteType = cfg.stype;
}
async function home(filter) {
let filterObj = {};
const html = await request(url + '/movie_bt');
const $ = load(html);
const series = $('div#beautiful-taxonomy-filters-tax-movie_bt_series > a[cat-url*=movie_bt_series]');
const tags = $('div#beautiful-taxonomy-filters-tax-movie_bt_tags > a');
let tag = {
key: 'tag',
name: '类型',
value: _.map(tags, (n) => {
let v = n.attribs['cat-url'] || '';
v = v.substring(v.lastIndexOf('/') + 1);
return { n: n.children[0].data, v: v };
}),
};
tag['init'] = tag.value[0].v;
let classes = _.map(series, (s) => {
let typeId = s.attribs['cat-url'];
typeId = typeId.substring(typeId.lastIndexOf('/') + 1);
filterObj[typeId] = [tag];
return {
type_id: typeId,
type_name: s.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() {
return '{}';
}
async function category(tid, pg, filter, extend) {
if (pg <= 0) pg = 1;
const tag = extend.tag || '';
const link = url + '/movie_bt' + (tag.length > 0 ? `/movie_bt_tags/${tag}` : '') + '/movie_bt_series/' + tid + (pg > 1 ? `/page/${pg}` : '');
const html = await request(link);
const $ = load(html);
const items = $('div.mrb > ul > li');
let videos = _.map(items, (item) => {
const img = $(item).find('img:first')[0];
const a = $(item).find('a:first')[0];
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
const jidi = $($(item).find('div.jidi')[0]).text().trim();
return {
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
vod_name: img.attribs.alt,
vod_pic: img.attribs['data-original'],
vod_remarks: jidi || hdinfo || '',
};
});
const hasMore = $('div.mrb > div.pagenavi_txt > a:contains(>)').length > 0;
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
return JSON.stringify({
page: parseInt(pg),
pagecount: pgCount,
limit: 20,
total: 20 * pgCount,
list: videos,
});
}
function stripHtmlTag(src) {
return src
.replace(/<\/?[^>]+(>|$)/g, '')
.replace(/&.{1,5};/g, '')
.replace(/\s{2,}/g, ' ');
}
async function detail(id) {
const html = await request(url + '/movie/' + id + '.html');
const $ = load(html);
const detail = $('ul.moviedteail_list > li');
let vod = {
vod_id: id,
vod_pic: $('div.dyimg img:first').attr('src'),
vod_remarks: '',
vod_content: stripHtmlTag($('div.yp_context').html()).trim(),
};
for (const info of detail) {
const i = $(info).text().trim();
if (i.startsWith('地区:')) {
vod.vod_area = i.substring(3);
} else if (i.startsWith('年份:')) {
vod.vod_year = i.substring(3);
} else if (i.startsWith('导演:')) {
vod.vod_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_lang = i.substring(3);
}
}
const playlist = _.map($('div.paly_list_btn > a'), (a) => {
return a.children[0].data + '$' + a.attribs.href.replace(/.*?\/v_play\/(.*).html/g, '$1');
});
vod.vod_play_from = key;
vod.vod_play_url = playlist.join('#');
return JSON.stringify({
list: [vod],
});
}
async function play(flag, id, flags) {
const link = url + '/v_play/' + id + '.html';
const html = await request(link);
const $ = load(html);
const iframe = $('body iframe[src*=Cloud]');
if (iframe.length > 0) {
const iframeHtml = (
await req(iframe[0].attribs.src, {
headers: {
Referer: link,
'User-Agent': UA,
},
})
).content;
let code = iframeHtml
.match(/var url = '(.*?)'/)[1]
.split('')
.reverse()
.join('');
let temp = '';
for (let i = 0x0; i < code.length; i = i + 0x2) {
temp += String.fromCharCode(parseInt(code[i] + code[i + 0x1], 0x10));
}
const playUrl = temp.substring(0x0, (temp.length - 0x7) / 0x2) + temp.substring((temp.length - 0x7) / 0x2 + 0x7);
return JSON.stringify({
parse: 0,
url: playUrl,
});
} else {
const js = $('script:contains(window.wp_nonce)').html();
const group = js.match(/(var.*)eval\((\w*\(\w*\))\)/);
const md5 = Crypto;
const result = eval(group[1] + group[2]);
const playUrl = result.match(/url:.*?['"](.*?)['"]/)[1];
return JSON.stringify({
parse: 0,
url: playUrl,
});
}
}
async function search(wd, quick) {
const html = await request(url + '/?s=' + wd);
const $ = load(html);
const items = $('div.search_list > ul > li');
let videos = _.map(items, (item) => {
const img = $(item).find('img:first')[0];
const a = $(item).find('a:first')[0];
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
const jidi = $($(item).find('div.jidi')[0]).text().trim();
return {
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
vod_name: img.attribs.alt,
vod_pic: img.attribs['data-original'],
vod_remarks: jidi || hdinfo || '',
};
});
return JSON.stringify({
list: videos,
});
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
detail: detail,
play: play,
search: search,
};
}

240
cat/czzy3_open.js Normal file
View file

@ -0,0 +1,240 @@
import { Crypto, load, _ } from './lib/cat.js';
let key = 'czzy';
let url = 'https://czzy.pw';
let siteKey = '';
let siteType = 0;
const UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1';
const cookie = {};
async function request(reqUrl, referer, mth, data, hd) {
const headers = {
'User-Agent': UA,
Cookie: _.map(cookie, (value, key) => {
return `${key}=${value}`;
}).join(';'),
};
if (referer) headers.referer = encodeURIComponent(referer);
let res = await req(reqUrl, {
method: mth || 'get',
headers: headers,
data: data,
postType: mth === 'post' ? 'form' : '',
});
if (res.headers['set-cookie']) {
const set_cookie = _.isArray(res.headers['set-cookie']) ? res.headers['set-cookie'].join(';') : res.headers['set-cookie'];
const cks = set_cookie.split(';');
for (const c of cks) {
const tmp = c.trim();
if (tmp.startsWith('result=')) {
cookie.result = tmp.substring(7);
return await request(reqUrl, reqUrl, 'post', {
result: cookie.result,
});
} else if (tmp.startsWith('esc_search_captcha=1')) {
cookie.esc_search_captcha = 1;
delete cookie.result;
return await request(reqUrl);
}
}
// console.log(res.headers['set-cookie']);
}
return res.content;
}
// cfg = {skey: siteKey, ext: extend}
async function init(cfg) {
siteKey = cfg.skey;
siteType = cfg.stype;
}
async function home(filter) {
let filterObj = {};
const html = await request(url + '/movie_bt');
const $ = load(html);
const series = $('div#beautiful-taxonomy-filters-tax-movie_bt_series > a[cat-url*=movie_bt_series]');
const tags = $('div#beautiful-taxonomy-filters-tax-movie_bt_tags > a');
let tag = {
key: 'tag',
name: '类型',
value: _.map(tags, (n) => {
let v = n.attribs['cat-url'] || '';
v = v.substring(v.lastIndexOf('/') + 1);
return { n: n.children[0].data, v: v };
}),
};
tag['init'] = tag.value[0].v;
let classes = _.map(series, (s) => {
let typeId = s.attribs['cat-url'];
typeId = typeId.substring(typeId.lastIndexOf('/') + 1);
filterObj[typeId] = [tag];
return {
type_id: typeId,
type_name: s.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() {
return '{}';
}
async function category(tid, pg, filter, extend) {
if (pg <= 0) pg = 1;
const tag = extend.tag || '';
const link = url + '/movie_bt' + (tag.length > 0 ? `/movie_bt_tags/${tag}` : '') + '/movie_bt_series/' + tid + (pg > 1 ? `/page/${pg}` : '');
const html = await request(link);
const $ = load(html);
const items = $('div.mrb > ul > li');
let videos = _.map(items, (item) => {
const img = $(item).find('img:first')[0];
const a = $(item).find('a:first')[0];
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
const jidi = $($(item).find('div.jidi')[0]).text().trim();
return {
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
vod_name: img.attribs.alt,
vod_pic: img.attribs['data-original'],
vod_remarks: jidi || hdinfo || '',
};
});
const hasMore = $('div.mrb > div.pagenavi_txt > a:contains(>)').length > 0;
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
return JSON.stringify({
page: parseInt(pg),
pagecount: pgCount,
limit: 20,
total: 20 * pgCount,
list: videos,
});
}
function stripHtmlTag(src) {
return src
.replace(/<\/?[^>]+(>|$)/g, '')
.replace(/&.{1,5};/g, '')
.replace(/\s{2,}/g, ' ');
}
async function detail(id) {
const html = await request(url + '/movie/' + id + '.html');
const $ = load(html);
const detail = $('ul.moviedteail_list > li');
let vod = {
vod_id: id,
vod_pic: $('div.dyimg img:first').attr('src'),
vod_remarks: '',
vod_content: stripHtmlTag($('div.yp_context').html()).trim(),
};
for (const info of detail) {
const i = $(info).text().trim();
if (i.startsWith('地区:')) {
vod.vod_area = i.substring(3);
} else if (i.startsWith('年份:')) {
vod.vod_year = i.substring(3);
} else if (i.startsWith('导演:')) {
vod.vod_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_lang = i.substring(3);
}
}
const playlist = _.map($('div.paly_list_btn > a'), (a) => {
return a.children[0].data + '$' + a.attribs.href.replace(/.*?\/v_play\/(.*).html/g, '$1');
});
vod.vod_play_from = key;
vod.vod_play_url = playlist.join('#');
return JSON.stringify({
list: [vod],
});
}
async function play(flag, id, flags) {
const link = url + '/v_play/' + id + '.html';
const html = await request(link);
const $ = load(html);
const iframe = $('body iframe[src*=Cloud]');
if (iframe.length > 0) {
const iframeHtml = (
await req(iframe[0].attribs.src, {
headers: {
Referer: link,
'User-Agent': UA,
},
})
).content;
let code = iframeHtml
.match(/var url = '(.*?)'/)[1]
.split('')
.reverse()
.join('');
let temp = '';
for (let i = 0x0; i < code.length; i = i + 0x2) {
temp += String.fromCharCode(parseInt(code[i] + code[i + 0x1], 0x10));
}
const playUrl = temp.substring(0x0, (temp.length - 0x7) / 0x2) + temp.substring((temp.length - 0x7) / 0x2 + 0x7);
return JSON.stringify({
parse: 0,
url: playUrl,
});
} else {
const js = $('script:contains(window.wp_nonce)').html();
const group = js.match(/(var.*)eval\((\w*\(\w*\))\)/);
const md5 = Crypto;
const result = eval(group[1] + group[2]);
const playUrl = result.match(/url:.*?['"](.*?)['"]/)[1];
return JSON.stringify({
parse: 0,
url: playUrl,
});
}
}
async function search(wd, quick) {
const html = await request(url + '/?s=' + wd);
const $ = load(html);
const items = $('div.search_list > ul > li');
let videos = _.map(items, (item) => {
const img = $(item).find('img:first')[0];
const a = $(item).find('a:first')[0];
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
const jidi = $($(item).find('div.jidi')[0]).text().trim();
return {
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
vod_name: img.attribs.alt,
vod_pic: img.attribs['data-original'],
vod_remarks: jidi || hdinfo || '',
};
});
return JSON.stringify({
list: videos,
});
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
detail: detail,
play: play,
search: search,
};
}

243
cat/czzy_open.js Normal file
View file

@ -0,0 +1,243 @@
// 自动从 地址发布页 获取&跳转url地址
import { Crypto, load, _ } from './lib/cat.js';
let key = 'czzy';
let host = 'https://www.czzy.site'; // 厂长地址发布页
let url = '';
let siteKey = '';
let siteType = 0;
const UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1';
const cookie = {};
async function request(reqUrl, referer, mth, data, hd) {
const headers = {
'User-Agent': UA,
Cookie: _.map(cookie, (value, key) => {
return `${key}=${value}`;
}).join(';'),
};
if (referer) headers.referer = encodeURIComponent(referer);
let res = await req(reqUrl, {
method: mth || 'get',
headers: headers,
data: data,
postType: mth === 'post' ? 'form' : '',
});
if (res.headers['set-cookie']) {
const set_cookie = _.isArray(res.headers['set-cookie']) ? res.headers['set-cookie'].join(';') : res.headers['set-cookie'];
const cks = set_cookie.split(';');
for (const c of cks) {
const tmp = c.trim();
if (tmp.startsWith('result=')) {
cookie.result = tmp.substring(7);
return await request(reqUrl, reqUrl, 'post', {
result: cookie.result,
});
} else if (tmp.startsWith('esc_search_captcha=1')) {
cookie.esc_search_captcha = 1;
delete cookie.result;
return await request(reqUrl);
}
}
// console.log(res.headers['set-cookie']);
}
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="(.*)"/)[1];
console.debug('厂长跳转地址 =====>' + url); // js_debug.log
}
async function home(filter) {
let filterObj = {};
const html = await request(url + '/movie_bt');
const $ = load(html);
const tags = $('div#beautiful-taxonomy-filters-tax-movie_bt_tags > a');
let tag = {
key: 'tag',
name: '类型',
value: _.map(tags, (n) => {
let v = n.attribs['cat-url'] || '';
v = v.substring(v.lastIndexOf('/') + 1);
return { n: n.children[0].data, v: v };
}),
};
tag['init'] = tag.value[0].v;
const series = $('div#beautiful-taxonomy-filters-tax-movie_bt_series > a[cat-url*=movie_bt_series]');
let classes = _.map(series, (s) => {
let typeId = s.attribs['cat-url'];
typeId = typeId.substring(typeId.lastIndexOf('/') + 1);
filterObj[typeId] = [tag];
return {
type_id: typeId,
type_name: s.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() {
return '{}';
}
async function category(tid, pg, filter, extend) {
if (pg <= 0) pg = 1;
const tag = extend.tag || '';
const link = url + '/movie_bt' + (tag.length > 0 ? `/movie_bt_tags/${tag}` : '') + '/movie_bt_series/' + tid + (pg > 1 ? `/page/${pg}` : '');
const html = await request(link);
const $ = load(html);
const items = $('div.mrb > ul > li');
let videos = _.map(items, (item) => {
const img = $(item).find('img:first')[0];
const a = $(item).find('a:first')[0];
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
const jidi = $($(item).find('div.jidi')[0]).text().trim();
return {
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
vod_name: img.attribs.alt,
vod_pic: img.attribs['data-original'],
vod_remarks: jidi || hdinfo || '',
};
});
const hasMore = $('div.mrb > div.pagenavi_txt > a:contains(>)').length > 0;
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
return JSON.stringify({
page: parseInt(pg),
pagecount: pgCount,
limit: 20,
total: 20 * pgCount,
list: videos,
});
}
function stripHtmlTag(src) {
return src
.replace(/<\/?[^>]+(>|$)/g, '')
.replace(/&.{1,5};/g, '')
.replace(/\s{2,}/g, ' ');
}
async function detail(id) {
const html = await request(url + '/movie/' + id + '.html');
const $ = load(html);
const detail = $('ul.moviedteail_list > li');
let vod = {
vod_id: id,
vod_pic: $('div.dyimg img:first').attr('src'),
vod_remarks: '',
vod_content: stripHtmlTag($('div.yp_context').html()).trim(),
};
for (const info of detail) {
const i = $(info).text().trim();
if (i.startsWith('地区:')) {
vod.vod_area = i.substring(3);
} else if (i.startsWith('年份:')) {
vod.vod_year = i.substring(3);
} else if (i.startsWith('导演:')) {
vod.vod_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_lang = i.substring(3);
}
}
const playlist = _.map($('div.paly_list_btn > a'), (a) => {
return a.children[0].data + '$' + a.attribs.href.replace(/.*?\/v_play\/(.*).html/g, '$1');
});
vod.vod_play_from = key;
vod.vod_play_url = playlist.join('#');
return JSON.stringify({
list: [vod],
});
}
async function play(flag, id, flags) {
const link = url + '/v_play/' + id + '.html';
const html = await request(link);
const $ = load(html);
const iframe = $('body iframe[src*=Cloud]');
if (iframe.length > 0) {
const iframeHtml = (
await req(iframe[0].attribs.src, {
headers: {
Referer: link,
'User-Agent': UA,
},
})
).content;
let code = iframeHtml
.match(/var url = '(.*?)'/)[1]
.split('')
.reverse()
.join('');
let temp = '';
for (let i = 0x0; i < code.length; i = i + 0x2) {
temp += String.fromCharCode(parseInt(code[i] + code[i + 0x1], 0x10));
}
const playUrl = temp.substring(0x0, (temp.length - 0x7) / 0x2) + temp.substring((temp.length - 0x7) / 0x2 + 0x7);
return JSON.stringify({
parse: 0,
url: playUrl,
});
} else {
const js = $('script:contains(window.wp_nonce)').html();
const group = js.match(/(var.*)eval\((\w*\(\w*\))\)/);
const md5 = Crypto;
const result = eval(group[1] + group[2]);
const playUrl = result.match(/url:.*?['"](.*?)['"]/)[1];
return JSON.stringify({
parse: 0,
url: playUrl,
});
}
}
async function search(wd, quick) {
const html = await request(url + '/?s=' + wd);
const $ = load(html);
const items = $('div.search_list > ul > li');
let videos = _.map(items, (item) => {
const img = $(item).find('img:first')[0];
const a = $(item).find('a:first')[0];
const hdinfo = $($(item).find('div.hdinfo')[0]).text().trim();
const jidi = $($(item).find('div.jidi')[0]).text().trim();
return {
vod_id: a.attribs.href.replace(/.*?\/movie\/(.*).html/g, '$1'),
vod_name: img.attribs.alt,
vod_pic: img.attribs['data-original'],
vod_remarks: jidi || hdinfo || '',
};
});
return JSON.stringify({
list: videos,
});
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
detail: detail,
play: play,
search: search,
};
}

1
cat/ddmv_open.js Normal file

File diff suppressed because one or more lines are too long

162
cat/dj0898_book_open.js Normal file
View file

@ -0,0 +1,162 @@
import { load, _ } from "./lib/cat.js";
let key = "世纪DJ音乐网_book";
let HOST = "http://m.dj0898.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;
}
async function init(cfg) {
siteKey = cfg.skey;
siteType = cfg.stype;
}
async function home(filter) {
const classes = [{ type_id: 1, type_name: "🎧串烧舞曲" }, { type_id: 2, type_name: "🎧外文舞曲" }, { type_id: 3, type_name: "🎧早场暖场" }, { type_id: 4, type_name: "🎧中文舞曲" }, { type_id: 5, type_name: "🎧其他舞曲" }, { type_id: 6, type_name: "🎧国外电音" }, { type_id: 8, type_name: "🎧慢歌连版" }, { type_id: 9, type_name: "🎧酒吧潮歌" }, { type_id: 10, type_name: "🎧中文串烧" }, { type_id: 11, type_name: "🎧外文串烧" }, { type_id: 12, type_name: "🎧中外串烧" }, { type_id: 13, type_name: "🎧车载串烧" }, { type_id: 14, type_name: "🎧越鼓串烧" }, { type_id: 40, type_name: "🎧3D/环绕" }, { type_id: 45, type_name: "🎧口水旋律" }, { type_id: 46, type_name: "🎧精品收藏" }, { type_id: 47, type_name: "🎧开场舞曲" }, { type_id: 48, type_name: "🎧印度舞曲" }, { type_id: 49, type_name: "🎧编排套曲" }, { type_id: 20, type_name: "🎧DuTch" }, { type_id: 21, type_name: "🎧Mash up" }, { type_id: 22, type_name: "🎧ClubHouse" }, { type_id: 23, type_name: "🎧ElectroHouse" }, { type_id: 24, type_name: "🎧越南鼓Dj" }, { type_id: 30, type_name: "🎧Funky" }, { type_id: 31, type_name: "🎧Reggae" }, { type_id: 32, type_name: "🎧Rnb" }, { type_id: 33, type_name: "🎧Hip Hop" }, { type_id: 34, type_name: "🎧Dubstep" }, { type_id: 8017, type_name: "🎧Hardstyle" }, { type_id: 8018, type_name: "🎧Hands Up" }];
const filterObj = {};
return JSON.stringify({
class: _.map(classes, (cls) => {
cls.land = 1;
cls.ratio = 1.78;
return cls;
}),
filters: filterObj,
});
}
async function homeVod() {
const link = HOST + "/dance/lists/id/10/1";
const html = await request(link);
const $ = load(html);
const list = $("ul.djddv_djList > li");
let videos = _.map(list, (it) => {
const a = $(it).find("a")[1];
const img = $(it).find("img:first")[0];
const tt = $(it).find("strong:first")[0];
const remarks = $(it).find("font")[5];
return {
vod_id: a.attribs.href,
vod_name: tt.children[0].data,
vod_pic: img.attribs["src"],
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 + "/dance/lists/id/" + tid + "/" + pg;
const html = await request(link);
const $ = load(html);
const list = $("ul.djddv_djList > li");
let videos = _.map(list, (it) => {
const a = $(it).find("a")[1];
const img = $(it).find("img:first")[0];
const tt = $(it).find("strong:first")[0];
const remarks = $(it).find("font")[5];
return {
book_id: a.attribs.href,
book_name: tt.children[0].data,
book_pic: img.attribs["src"],
book_remarks: "🎵" + remarks.children[0].data || "",
};
});
const hasMore = $("ul.page_link > li > a:contains(\u00a0)").length > 0;
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
return JSON.stringify({
page: parseInt(pg),
pagecount: pgCount,
limit: 60,
total: 60 * pgCount,
list: videos,
});
}
async function detail(id) {
const vod = {
book_id: id,
type_name: '',
book_year: '',
book_area: '',
book_remarks: '',
book_actor: '',
book_director: '',
book_content: '',
};
const playlist = ["点击播放" + "$" + vod.book_id];
vod.volumes = "道长在线";
vod.urls = playlist.join("#");
return JSON.stringify({
list: [vod],
});
}
async function play(flag, id, flags) {
const html = await request(id);
const $ = load(html);
const audio = $("body audio[src*=http]");
const audioUrl = audio[0].attribs.src;
// console.debug('世纪DJ音乐网 audioUrl =====>' + audioUrl); // js_debug.log
return JSON.stringify({
parse: 0,
url: audioUrl,
});
}
async function search(wd, quick, pg) {
if (pg <= 0 || typeof pg == "undefined") pg = 1;
const link = HOST + "/index.php/dance/so/key?key=" + wd + "&cid=0&p=" + pg;
const html = await request(link);
const $ = load(html);
const list = $("ul.djddv_djList > li");
let videos = _.map(list, (it) => {
const a = $(it).find("a")[1];
const img = $(it).find("img:first")[0];
const tt = $(it).find("strong:first")[0];
const remarks = $(it).find("font:first")[0];
return {
book_id: a.attribs.href,
book_name: tt.children[0].data,
book_pic: img.attribs["src"],
book_remarks: "🎵" + remarks.children[0].data || "",
};
});
const hasMore = $("ul.page_link > li > a:contains(\u00a0)").length > 0;
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
return JSON.stringify({
page: parseInt(pg),
pagecount: pgCount,
limit: 60,
total: 60 * pgCount,
list: videos,
land: 1,
ratio: 1.78,
});
}
export function __jsEvalReturn() {
return {
init: init,
home: home,
homeVod: homeVod,
category: category,
detail: detail,
play: play,
search: search,
};
}