This commit is contained in:
xduo 2024-08-21 11:41:51 +08:00
parent 3a6331abce
commit 4e44e14440
17 changed files with 6444 additions and 2 deletions

View File

@ -5,11 +5,11 @@
"key": "js豆瓣",
"name": "🍥┃豆瓣┃网盘线路、不限速、不限制客户端🍥",
"type": 3,
"api": "./libs/drpy2.js",
"api": "./lib/drpy2.min.js",
"searchable": 0,
"quickSearch": 0,
"filterable": 0,
"ext": "./libs/douban.js"
"ext": "./lib/douban.js"
},
{
"key": "ConfigCenter",

1
lib/alist.min.js vendored Normal file

File diff suppressed because one or more lines are too long

36
lib/douban.js Normal file

File diff suppressed because one or more lines are too long

2637
lib/drpy.js Normal file

File diff suppressed because it is too large Load Diff

1
lib/drpy.min.js vendored Normal file

File diff suppressed because one or more lines are too long

2542
lib/drpy2.js Normal file

File diff suppressed because it is too large Load Diff

1
lib/drpy2.min.js vendored Normal file

File diff suppressed because one or more lines are too long

68
lib/gbk.js Normal file

File diff suppressed because one or more lines are too long

1
lib/lf_ikanbot_min.js Normal file

File diff suppressed because one or more lines are too long

1
lib/lf_live_min.js Normal file

File diff suppressed because one or more lines are too long

1
lib/lf_p2p2_min.js Normal file

File diff suppressed because one or more lines are too long

1
lib/lf_pushagent_min.js Normal file

File diff suppressed because one or more lines are too long

1
lib/lf_search3_min.js Normal file

File diff suppressed because one or more lines are too long

534
lib/live2cms.js Normal file
View File

@ -0,0 +1,534 @@
/**
* live2cms.js
* 配置设置 {"key":"Live2CMS","name":"直播转点播V2","type":3,"api":"{{host}}/libs/live2cms.js","searchable":2,"quickSearch":0,"filterable":0,"ext":"{{host}}/txt/json/live2mv_data.json"}
* live2mv_data.json
* 支持m3u类直播支持线路归并支持筛选切换显示模式
[
{"name": "甜蜜", "url": "http://zdir.kebedd69.repl.co/public/live.txt"},
{"name": "俊于", "url": "http://home.jundie.top:81/Cat/tv/live.txt"},
{"name": "菜妮丝", "url": "http://xn--ihqu10cn4c.xn--z7x900a.love:63/TV/tvzb.txt"},
{"name": "布里m3u", "url": "http://jiexi.bulisite.top/m3u.php"},
{"name": "吾爱", "url": "http://52bsj.vip:81/api/v3/file/get/763/live.txt?sign=87BTGT1_6AOry7FPwy_uuxFTv2Wcb9aDMj46rDdRTD8%3D%3A0"},
{"name": "饭太硬", "url": "http://ftyyy.tk/live.txt"}
]
* 提示 ext文件格式为json列表,name,url参数
* 取消加密,减少性能问题
*/
String.prototype.rstrip = function (chars) {
let regex = new RegExp(chars + "$");
return this.replace(regex, "");
};
const request_timeout = 5000;
const RKEY = 'live2cms'; // 源的唯一标识
const VERSION = 'live2cms 20230619';
const UA = 'Mozilla/5.0'; //默认请求ua
const __ext = {data_dict:{}};
const tips = `\n道长直播转点播js-当前版本${VERSION}`;
const def_pic = 'https://avatars.githubusercontent.com/u/58679624?s=400&u=246b55fcda2b4850b444aebd6b8f8d6a12883f8c&v=4';
/**
* 存在数据库配置表里, key字段对应值value,没有就新增,有就更新,调用此方法会清除key对应的内存缓存
* @param k
* @param v
*/
function setItem(k,v){
local.set(RKEY,k,v);
console.log(`规则${RKEY}设置${k} => ${v}`)
}
/**
* 获取数据库配置表对应的key字段的value没有这个key就返回value默认传参.需要有缓存,第一次获取后会存在内存里
* @param k
* @param v
* @returns {*}
*/
function getItem(k,v){
return local.get(RKEY,k) || v;
}
/**
* 删除数据库key对应的一条数据,并清除此key对应的内存缓存
* @param k
*/
function clearItem(k){
local.delete(RKEY,k);
}
var showMode = getItem('showMode','groups'); // groups按组分类显示 all全部一条线路展示
var groupDict = JSON.parse(getItem('groupDict','{}')); // 搜索分组字典
/**
* 打印日志
* @param any 任意变量
*/
function print(any){
any = any||'';
if(typeof(any)=='object'&&Object.keys(any).length>0){
try {
any = JSON.stringify(any);
console.log(any);
}catch (e) {
// console.log('print:'+e.message);
console.log(typeof(any)+':'+any.length);
}
}else if(typeof(any)=='object'&&Object.keys(any).length<1){
console.log('null object');
}else{
console.log(any);
}
}
/*** js自封装的方法 ***/
/**
* 获取链接的host(带http协议的完整链接)
* @param url 任意一个正常完整的Url,自动提取根
* @returns {string}
*/
function getHome(url){
if(!url){
return ''
}
let tmp = url.split('//');
url = tmp[0] + '//' + tmp[1].split('/')[0];
try {
url = decodeURIComponent(url);
}catch (e) {}
return url
}
/**
* m3u直播格式转一般直播格式
* @param m3u
* @returns {string}
*/
function convertM3uToNormal(m3u) {
try {
const lines = m3u.split('\n');
let result = '';
let TV='';
// let flag='#genre#';
let flag='#m3u#';
let currentGroupTitle = '';
lines.forEach((line) => {
if (line.startsWith('#EXTINF:')) {
const groupTitle = line.split('"')[1].trim();
TV= line.split('"')[2].substring(1);
if (currentGroupTitle !== groupTitle) {
currentGroupTitle = groupTitle;
result += `\n${currentGroupTitle},${flag}\n`;
}
} else if (line.startsWith('http')) {
const splitLine = line.split(',');
result += `${TV}\,${splitLine[0]}\n`;
}
});
return result.trim();
}catch (e) {
print(`m3u直播转普通直播发生错误:${e.message}`);
return m3u
}
}
/**
* 线路归类
* @param arr
* @returns {*[][]}
*/
function merge(arr) {
var parse = arguments[1] ? arguments[1] : '';
var p = [];
if (parse !== '' && typeof(parse)=="function") {
p = arr.map(parse);
}
const createEmptyArrays = (length) => Array.from({
length
}, () => []);
let lists = createEmptyArrays(arr.length);
let sl = createEmptyArrays(arr.length);
(p.length ? p : arr).forEach((k, index) => {
var i = 0;
while (sl[i].includes(k)) {
i = i + 1
}
sl[i].push(k);
lists[i].push(arr[index]);
})
lists=lists.filter(x=>x.some(k=>k.length));
return lists
}
/**
* 线路归类/小棉袄算法
* @param arr 数组
* @param parse 解析式
* @returns {[[*]]}
*/
function splitArray(arr,parse) {
parse = parse&&typeof(parse)=='function'?parse:'';
let result = [[arr[0]]];
for (let i = 1; i < arr.length; i++) {
let index = -1;
for (let j = 0; j < result.length; j++) {
if (parse&&result[j].map(parse).includes(parse(arr[i]))) {
index = j;
}else if((!parse) && result[j].includes(arr[i])){
index = j;
}
}
if (index >= result.length - 1) {
result.push([]);
result[result.length - 1].push(arr[i]);
} else {
result[index + 1].push(arr[i]);
}
}
return result;
}
/**
* 搜索结果生成分组字典
* @param arr
* @param parse x=>x.split(',')[0]
* @returns {{}}
*/
function gen_group_dict(arr,parse){
let dict = {};
arr.forEach((it)=>{
let k = it.split(',')[0];
if(parse && typeof(parse)==='function'){
k = parse(k);
}
if(!dict[k]){
dict[k] = [it]
}else{
dict[k].push(it);
}
});
return dict
}
const http = 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);
}
options.timeout = request_timeout;
if(!options.headers){
options.headers = {};
}
let keys = Object.keys(options.headers).map(it=>it.toLowerCase());
if(!keys.includes('referer')){
options.headers['Referer'] = getHome(url);
}
if(!keys.includes('user-agent')){
options.headers['User-Agent'] = UA;
}
console.log(JSON.stringify(options.headers));
try {
const res = req(url, options);
// if(options.headers['Authorization']){
// console.log(res.content);
// }
res.json = () => res&&res.content ? JSON.parse(res.content) : null;
res.text = () => res&&res.content ? res.content:'';
return res
}catch (e) {
return {
json() {
return null
}, text() {
return ''
}
}
}
};
["get", "post"].forEach(method => {
http[method] = function (url, options = {}) {
return http(url, Object.assign(options, {method: method.toUpperCase()}));
}
});
function init(ext) {
console.log("当前版本号:"+VERSION);
let data;
if (typeof ext == 'object'){
data = ext;
print('live ext:object');
} else if (typeof ext == 'string') {
if (ext.startsWith('http')) {
let ext_paramas = ext.split(';');
let data_url = ext_paramas[0];
print(data_url);
data = http.get(data_url).json();
}
}
print(data);
__ext.data = data;
print('init执行完毕');
}
function home(filter) {
let classes = __ext.data.map(it => ({
type_id: it.url,
type_name: it.name,
}));
print("----home----");
let filter_dict = {};
let filters = [
{'key': 'show', 'name': '播放展示', 'value': [{'n': '多线路分组', 'v': 'groups'},{'n': '单线路', 'v': 'all'}]}
];
classes.forEach(it=>{
filter_dict[it.type_id] = filters;
});
print(classes);
return JSON.stringify({ 'class': classes,'filters': filter_dict});
}
function homeVod(params) {
let _get_url = __ext.data[0].url;
let html;
if(__ext.data_dict[_get_url]){
html = __ext.data_dict[_get_url];
}else{
html = http.get(_get_url).text();
if(/#EXTM3U/.test(html)){
html = convertM3uToNormal(html);
}
__ext.data_dict[_get_url] = html;
}
// let arr = html.match(/.*?,#[\s\S].*?#/g);
let arr = html.match(/.*?[,]#[\s\S].*?#/g); // 可能存在中文逗号
let _list = [];
try {
arr.forEach(it=>{
let vname = it.split(/[,]/)[0];
let vtab = it.match(/#(.*?)#/)[0];
_list.push({
vod_name:vname,
vod_id:_get_url+'$'+vname,
vod_pic:def_pic,
vod_remarks:vtab,
});
});
}catch (e) {
print('Live2cms获取首页推荐发送错误:'+e.message);
}
return JSON.stringify({ 'list': _list });
}
function category(tid, pg, filter, extend) {
let fl = filter?extend:{};
if(fl.show){
showMode = fl.show;
setItem('showMode',showMode);
}
if(parseInt(pg)>1){
return JSON.stringify({
'list': [],
});
}
let _get_url = tid;
let html;
if(__ext.data_dict[_get_url]){
html = __ext.data_dict[_get_url];
}else{
html = http.get(_get_url).text();
if(/#EXTM3U/.test(html)){
html = convertM3uToNormal(html);
}
__ext.data_dict[_get_url] = html;
}
// let arr = html.match(/.*?[,]#[\s\S].*?#/g);
let arr = html.match(/.*?[,]#[\s\S].*?#/g); // 可能存在中文逗号
let _list = [];
try {
arr.forEach(it=>{
let vname = it.split(/[,]/)[0];
let vtab = it.match(/#(.*?)#/)[0];
_list.push({
// vod_name:it.split(',')[0],
vod_name:vname,
vod_id:_get_url+'$'+vname,
vod_pic:def_pic,
vod_remarks:vtab,
});
});
}catch (e) {
print('Live2cms获取一级分类页发生错误:'+e.message);
}
return JSON.stringify({
'page': 1,
'pagecount': 1,
'limit': _list.length,
'total': _list.length,
'list': _list,
});
}
function detail(tid) { // ⛵ 港•澳•台
let _get_url = tid.split('$')[0];
let _tab = tid.split('$')[1];
if(tid.includes('#search#')){
let vod_name = _tab.replace('#search#','');
let vod_play_from = '来自搜索';
vod_play_from+=`:${_get_url}`;
// let vod_play_url = vod_name+'$'+_get_url;
// print(vod_play_url);
let vod_play_url = groupDict[_get_url].map(x=>x.replace(',','$')).join('#');
return JSON.stringify({
list: [{
vod_id: tid,
vod_name: '搜索:'+vod_name,
type_name: "直播列表",
vod_pic: def_pic,
vod_content: tid,
vod_play_from: vod_play_from,
vod_play_url: vod_play_url,
vod_director: tips,
vod_remarks: `道长直播转点播js-当前版本${VERSION}`,
}]
});
}
let html;
if(__ext.data_dict[_get_url]){
html = __ext.data_dict[_get_url];
}else{
html = http.get(_get_url).text();
if(/#EXTM3U/.test(html)){
html = convertM3uToNormal(html);
}
__ext.data_dict[_get_url] = html;
}
// let a = new RegExp(`.*?${_tab},#[\\s\\S].*?#`);
let a = new RegExp(`.*?${_tab.replace('(','\\(').replace(')','\\)')}[,]#[\\s\\S].*?#`);
let b = html.match(a)[0];
let c = html.split(b)[1];
if(c.match(/.*?[,]#[\s\S].*?#/)){
let d = c.match(/.*?[,]#[\s\S].*?#/)[0];
c = c.split(d)[0];
}
let arr = c.trim().split('\n');
let _list = [];
arr.forEach((it)=>{
if(it.trim()){
let t = it.trim().split(',')[0];
let u = it.trim().split(',')[1];
_list.push(t+'$'+u);
}
});
let vod_name = __ext.data.find(x=>x.url===_get_url).name;
let vod_play_url;
let vod_play_from;
if(showMode==='groups'){
let groups = splitArray(_list,x=>x.split('$')[0]);
let tabs = [];
for(let i=0;i<groups.length;i++){
if(i===0){
tabs.push(vod_name+'1')
}else{
tabs.push(` ${i+1} `)
}
}
vod_play_url = groups.map(it=>it.join('#')).join('$$$');
vod_play_from = tabs.join('$$$');
}else{
vod_play_url = _list.join('#');
vod_play_from = vod_name;
}
let vod = {
vod_id: tid,
vod_name: vod_name+'|'+_tab,
type_name: "直播列表",
vod_pic: def_pic,
vod_content: tid,
vod_play_from: vod_play_from,
vod_play_url: vod_play_url,
vod_director: tips,
vod_remarks: `道长直播转点播js-当前版本${VERSION}`,
};
return JSON.stringify({
list: [vod]
});
}
function play(flag, id, flags) {
let vod = {
'parse': /m3u8/.test(id)?0:1,
'playUrl': '',
'url': id
};
print(vod);
return JSON.stringify(vod);
}
function search(wd, quick) {
let _get_url = __ext.data[0].url;
let html;
if(__ext.data_dict[_get_url]){
html = __ext.data_dict[_get_url];
}else{
html = http.get(_get_url).text();
if(/#EXTM3U/.test(html)){
html = convertM3uToNormal(html);
}
__ext.data_dict[_get_url] = html;
}
let str='';
Object.keys(__ext.data_dict).forEach(()=>{
str+=__ext.data_dict[_get_url];
});
let links = str.split('\n').filter(it=>it.trim() && it.includes(',') && it.split(',')[1].trim().startsWith('http'));
links = links.map(it=>it.trim());
let plays = Array.from(new Set(links));
print('搜索关键词:'+wd);
print('过滤前:'+plays.length);
plays = plays.filter(it=>it.includes(wd));
print('过滤后:'+plays.length);
print(plays);
let new_group = gen_group_dict(plays);
groupDict = Object.assign(groupDict,new_group);
// 搜索分组结果存至本地方便二级调用
setItem('groupDict',JSON.stringify(groupDict));
let _list = [];
// plays.forEach((it)=>{
// _list.push({
// 'vod_name':it.split(',')[0],
// 'vod_id':it.split(',')[1].trim()+'$'+it.split(',')[0].trim()+'#search#',
// 'vod_pic':def_pic,
// })
// });
Object.keys(groupDict).forEach((it)=>{
_list.push({
'vod_name':it,
'vod_id':it+'$'+wd+'#search#',
'vod_pic':def_pic,
});
});
return JSON.stringify({
'list': _list
});
}
// 导出函数对象
export default {
init: init,
home: home,
homeVod: homeVod,
category: category,
detail: detail,
play: play,
search: search
}

138
lib/mod.js Normal file
View File

@ -0,0 +1,138 @@
const peq = new Uint32Array(0x10000);
const myers_32 = (a, b) => {
const n = a.length;
const m = b.length;
const lst = 1 << (n - 1);
let pv = -1;
let mv = 0;
let sc = n;
let i = n;
while (i--) {
peq[a.charCodeAt(i)] |= 1 << i;
}
for (i = 0; i < m; i++) {
let eq = peq[b.charCodeAt(i)];
const xv = eq | mv;
eq |= ((eq & pv) + pv) ^ pv;
mv |= ~(eq | pv);
pv &= eq;
if (mv & lst) {
sc++;
}
if (pv & lst) {
sc--;
}
mv = (mv << 1) | 1;
pv = (pv << 1) | ~(xv | mv);
mv &= xv;
}
i = n;
while (i--) {
peq[a.charCodeAt(i)] = 0;
}
return sc;
};
const myers_x = (b, a) => {
const n = a.length;
const m = b.length;
const mhc = [];
const phc = [];
const hsize = Math.ceil(n / 32);
const vsize = Math.ceil(m / 32);
for (let i = 0; i < hsize; i++) {
phc[i] = -1;
mhc[i] = 0;
}
let j = 0;
for (; j < vsize - 1; j++) {
let mv = 0;
let pv = -1;
const start = j * 32;
const vlen = Math.min(32, m) + start;
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] |= 1 << k;
}
for (let i = 0; i < n; i++) {
const eq = peq[a.charCodeAt(i)];
const pb = (phc[(i / 32) | 0] >>> i) & 1;
const mb = (mhc[(i / 32) | 0] >>> i) & 1;
const xv = eq | mv;
const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;
let ph = mv | ~(xh | pv);
let mh = pv & xh;
if ((ph >>> 31) ^ pb) {
phc[(i / 32) | 0] ^= 1 << i;
}
if ((mh >>> 31) ^ mb) {
mhc[(i / 32) | 0] ^= 1 << i;
}
ph = (ph << 1) | pb;
mh = (mh << 1) | mb;
pv = mh | ~(xv | ph);
mv = ph & xv;
}
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] = 0;
}
}
let mv = 0;
let pv = -1;
const start = j * 32;
const vlen = Math.min(32, m - start) + start;
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] |= 1 << k;
}
let score = m;
for (let i = 0; i < n; i++) {
const eq = peq[a.charCodeAt(i)];
const pb = (phc[(i / 32) | 0] >>> i) & 1;
const mb = (mhc[(i / 32) | 0] >>> i) & 1;
const xv = eq | mv;
const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;
let ph = mv | ~(xh | pv);
let mh = pv & xh;
score += (ph >>> (m - 1)) & 1;
score -= (mh >>> (m - 1)) & 1;
if ((ph >>> 31) ^ pb) {
phc[(i / 32) | 0] ^= 1 << i;
}
if ((mh >>> 31) ^ mb) {
mhc[(i / 32) | 0] ^= 1 << i;
}
ph = (ph << 1) | pb;
mh = (mh << 1) | mb;
pv = mh | ~(xv | ph);
mv = ph & xv;
}
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] = 0;
}
return score;
};
const distance = (a, b) => {
if (a.length < b.length) {
const tmp = b;
b = a;
a = tmp;
}
if (b.length === 0) {
return a.length;
}
if (a.length <= 32) {
return myers_32(a, b);
}
return myers_x(a, b);
};
const closest = (str, arr) => {
let min_distance = Infinity;
let min_index = 0;
for (let i = 0; i < arr.length; i++) {
const dist = distance(str, arr[i]);
if (dist < min_distance) {
min_distance = dist;
min_index = i;
}
}
return arr[min_index];
};
export { closest, distance };

178
lib/sortName.js Normal file

File diff suppressed because one or more lines are too long

301
lib/模板.js Normal file
View File

@ -0,0 +1,301 @@
if (typeof Object.assign != 'function') {
Object.assign = function () {
var target = arguments[0];
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
}
function getMubans() {
var mubanDict = { // 模板字典
mxpro: {
title: '',
host: '',
// homeUrl:'/',
url: '/vodshow/fyclass--------fypage---.html',
searchUrl: '/vodsearch/**----------fypage---.html',
searchable: 2,//是否启用全局搜索,
quickSearch: 0,//是否启用快速搜索,
filterable: 0,//是否启用分类筛选,
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
'User-Agent': 'MOBILE_UA',
// "Cookie": "searchneed=ok"
},
class_parse: '.navbar-items li:gt(2):lt(8);a&&Text;a&&href;/(\\d+).html',
play_parse: true,
lazy: '',
limit: 6,
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
double: true, // 推荐内容是否双层定位
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
二级: {
"title": "h1&&Text;.module-info-tag&&Text",
"img": ".lazyload&&data-original",
"desc": ".module-info-item:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(3)&&Text",
"content": ".module-info-introduction&&Text",
"tabs": ".module-tab-item",
"lists": ".module-play-list:eq(#id) a"
},
搜索: 'body .module-item;.module-card-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href;.module-info-item-content&&Text',
},
mxone5: {
title: '',
host: '',
url: '/show/fyclass--------fypage---.html',
searchUrl: '/search/**----------fypage---.html',
searchable: 2,//是否启用全局搜索,
quickSearch: 0,//是否启用快速搜索,
filterable: 0,//是否启用分类筛选,
class_parse: '.nav-menu-items&&li;a&&Text;a&&href;.*/(.*?).html',
play_parse: true,
lazy: '',
limit: 6,
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
double: true, // 推荐内容是否双层定位
一级: '.module-items .module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
二级: {
"title": "h1&&Text;.tag-link&&Text",
"img": ".module-item-pic&&img&&data-src",
"desc": ".video-info-items:eq(0)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(2)&&Text;.video-info-items:eq(3)&&Text",
"content": ".vod_content&&Text",
"tabs": ".module-tab-item",
"lists": ".module-player-list:eq(#id)&&.scroll-content&&a"
},
搜索: '.module-items .module-search-item;a&&title;img&&data-src;.video-serial&&Text;a&&href',
},
首图: {
title: '',
host: '',
url: '/vodshow/fyclass--------fypage---/',
searchUrl: '/vodsearch/**----------fypage---.html',
searchable: 2,//是否启用全局搜索,
quickSearch: 0,//是否启用快速搜索,
filterable: 0,//是否启用分类筛选,
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
'User-Agent': 'MOBILE_UA',
// "Cookie": "searchneed=ok"
},
class_parse: '.myui-header__menu li.hidden-sm:gt(0):lt(5);a&&Text;a&&href;/(\\d+).html',
play_parse: true,
lazy: '',
limit: 6,
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
double: true, // 推荐内容是否双层定位
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
二级: {
"title": ".myui-content__detail .title&&Text;.myui-content__detail p:eq(-2)&&Text",
"img": ".myui-content__thumb .lazyload&&data-original",
"desc": ".myui-content__detail p:eq(0)&&Text;.myui-content__detail p:eq(1)&&Text;.myui-content__detail p:eq(2)&&Text",
"content": ".content&&Text",
"tabs": ".nav-tabs:eq(0) li",
"lists": ".myui-content__list:eq(#id) li"
},
搜索: '#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
},
首图2: {
title: '',
host: '',
url: '/list/fyclass-fypage.html',
searchUrl: '/vodsearch/**----------fypage---.html',
searchable: 2,//是否启用全局搜索,
quickSearch: 0,//是否启用快速搜索,
filterable: 0,//是否启用分类筛选,
headers: {
'User-Agent': 'UC_UA',
// "Cookie": ""
},
// class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html',
play_parse: true,
lazy: '',
limit: 6,
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
double: true, // 推荐内容是否双层定位
一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
二级: {
"title": ".stui-content__detail .title&&Text;.stui-content__detail p:eq(-2)&&Text",
"img": ".stui-content__thumb .lazyload&&data-original",
"desc": ".stui-content__detail p:eq(0)&&Text;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text",
"content": ".detail&&Text",
"tabs": ".stui-vodlist__head h3",
"lists": ".stui-content__playlist:eq(#id) li"
},
搜索: 'ul.stui-vodlist__media:eq(0) li,ul.stui-vodlist:eq(0) li,#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
搜索1: 'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
搜索2: 'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
},
默认: {
title: '',
host: '',
url: '/vodshow/fyclass--------fypage---.html',
searchUrl: '/vodsearch/-------------.html?wd=**',
searchable: 2,//是否启用全局搜索,
quickSearch: 0,//是否启用快速搜索,
filterable: 0,//是否启用分类筛选,
headers: {
'User-Agent': 'MOBILE_UA',
},
play_parse: true,
lazy: '',
limit: 6,
double: true, // 推荐内容是否双层定位
},
vfed: {
title: '',
host: '',
url: '/index.php/vod/show/id/fyclass/page/fypage.html',
searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
searchable: 2,//是否启用全局搜索,
quickSearch: 0,//是否启用快速搜索,
filterable: 0,//是否启用分类筛选,
headers: {
'User-Agent': 'UC_UA',
},
// class_parse:'.fed-pops-navbar&&ul.fed-part-rows&&a.fed-part-eone:gt(0):lt(5);a&&Text;a&&href;.*/(.*?).html',
class_parse: '.fed-pops-navbar&&ul.fed-part-rows&&a;a&&Text;a&&href;.*/(.*?).html',
play_parse: true,
lazy: '',
limit: 6,
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
double: true, // 推荐内容是否双层定位
一级: '.fed-list-info&&li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
二级: {
"title": "h1.fed-part-eone&&Text;.fed-deta-content&&.fed-part-rows&&li&&Text",
"img": ".fed-list-info&&a&&data-original",
"desc": ".fed-deta-content&&.fed-part-rows&&li:eq(1)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(2)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(3)&&Text",
"content": ".fed-part-esan&&Text",
"tabs": ".fed-drop-boxs&&.fed-part-rows&&li",
"lists": ".fed-play-item:eq(#id)&&ul:eq(1)&&li"
},
搜索: '.fed-deta-info;h1&&Text;.lazyload&&data-original;.fed-list-remarks&&Text;a&&href;.fed-deta-content&&Text',
},
海螺3: {
title: '',
host: '',
searchUrl: '/v_search/**----------fypage---.html',
url: '/vod_____show/fyclass--------fypage---.html',
headers: {
'User-Agent': 'MOBILE_UA'
},
timeout: 5000,
class_parse: 'body&&.hl-nav li:gt(0);a&&Text;a&&href;.*/(.*?).html',
cate_exclude: '明星|专题|最新|排行',
limit: 40,
play_parse: true,
lazy: '',
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
double: true,
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
二级: {
"title": ".hl-infos-title&&Text;.hl-text-conch&&Text",
"img": ".hl-lazy&&data-original",
"desc": ".hl-infos-content&&.hl-text-conch&&Text",
"content": ".hl-content-text&&Text",
"tabs": ".hl-tabs&&a",
"lists": ".hl-plays-list:eq(#id)&&li"
},
搜索: '.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
searchable: 2,//是否启用全局搜索,
quickSearch: 0,//是否启用快速搜索,
filterable: 0,//是否启用分类筛选,
},
海螺2: {
title: '',
host: '',
searchUrl: '/index.php/vod/search/page/fypage/wd/**/',
url: '/index.php/vod/show/id/fyclass/page/fypage/',
headers: {
'User-Agent': 'MOBILE_UA'
},
timeout: 5000,
class_parse: '#nav-bar li;a&&Text;a&&href;id/(.*?)/',
limit: 40,
play_parse: true,
lazy: '',
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
double: true,
一级: '.list-a&&li;a&&title;.lazy&&data-original;.list-remarks&&Text;a&&href',
二级: {
"title": "h2&&Text;.deployment&&Text",
"img": ".lazy&&data-original",
"desc": ".deployment&&Text",
"content": ".ec-show&&Text",
"tabs": "#tag&&a",
"lists": ".play_list_box:eq(#id)&&li"
},
搜索: '.search-list;a&&title;.lazy&&data-original;.deployment&&Text;a&&href',
searchable: 2,//是否启用全局搜索,
quickSearch: 0,//是否启用快速搜索,
filterable: 0,//是否启用分类筛选,
},
短视: {
title: '',
host: '',
// homeUrl:'/',
url: '/channel/fyclass-fypage.html',
searchUrl: '/search.html?wd=**',
searchable: 2,//是否启用全局搜索,
quickSearch: 0,//是否启用快速搜索,
filterable: 0,//是否启用分类筛选,
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
'User-Agent': 'MOBILE_UA',
// "Cookie": "searchneed=ok"
},
class_parse: '.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html',
cate_exclude: '解析|动态',
play_parse: true,
lazy: '',
limit: 6,
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
double: true, // 推荐内容是否双层定位
一级: '.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
二级: {
"title": "h1&&Text;.content-rt&&p:eq(0)&&Text",
"img": ".img&&img&&data-src",
"desc": ".content-rt&&p:eq(1)&&Text;.content-rt&&p:eq(2)&&Text;.content-rt&&p:eq(3)&&Text;.content-rt&&p:eq(4)&&Text;.content-rt&&p:eq(5)&&Text",
"content": ".zkjj_a&&Text",
"tabs": ".py-tabs&&option",
"lists": ".player:eq(#id) li"
},
搜索: '.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
},
短视2:{
title: '',
host: '',
class_name:'电影&电视剧&综艺&动漫',
class_url:'1&2&3&4',
searchUrl: '/index.php/ajax/suggest?mid=1&wd=**',
searchable: 2,
quickSearch: 0,
headers:{'User-Agent':'MOBILE_UA'},
url: '/index.php/api/vod#type=fyclass&page=fypage',
filterable:0,//是否启用分类筛选,
filter_url:'',
filter: {},
filter_def:{},
detailUrl:'/index.php/vod/detail/id/fyid.html',
推荐:'.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href',
一级:'js:let body=input.split("#")[1];let t=Math.round(new Date/1e3).toString();let key=md5("DS"+t+"DCC147D11943AF75");let url=input.split("#")[0];body=body+"&time="+t+"&key="+key;print(body);fetch_params.body=body;let html=post(url,fetch_params);let data=JSON.parse(html);VODS=data.list.map(function(it){it.vod_pic=urljoin2(input.split("/i")[0],it.vod_pic);return it});',
二级:{
"title":".slide-info-title&&Text;.slide-info:eq(3)--strong&&Text",
"img":".detail-pic&&data-original",
"desc":".fraction&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(2)--strong&&Text;.slide-info:eq(1)--strong&&Text",
"content":"#height_limit&&Text",
"tabs":".anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a",
"tab_text":".swiper-slide&&Text",
"lists":".anthology-list-box:eq(#id) li"
},
搜索:'json:list;name;pic;;id',
}
};
return JSON.parse(JSON.stringify(mubanDict));
}
var mubanDict = getMubans();
var muban = getMubans();
export default {muban,getMubans};