mirror of https://github.com/YSBXS/LMYS
Compare commits
10 Commits
7407f7245e
...
0378a6e934
Author | SHA1 | Date |
---|---|---|
YSBXS | 0378a6e934 | |
YSBXS | fdcbfd5471 | |
YSBXS | 4012cadf38 | |
YSBXS | 43eda3db3e | |
YSBXS | 4c8a7876f8 | |
YSBXS | 878d7119b1 | |
YSBXS | 8d325436be | |
YSBXS | 35c6ff8771 | |
YSBXS | 98e4646c4a | |
YSBXS | 063322b4d7 |
|
@ -0,0 +1,46 @@
|
|||
[
|
||||
{
|
||||
"share_name": "优品阁",
|
||||
"share_id": "uWa9gbM3RJ7"
|
||||
},
|
||||
{
|
||||
"share_name": "阿里1T",
|
||||
"share_id": "mxAfB6eRgY4"
|
||||
},
|
||||
{
|
||||
"share_name": "平凡中的",
|
||||
"share_id": "4ydLxf7VgH7"
|
||||
},
|
||||
{
|
||||
"share_name": "tacit0924",
|
||||
"share_id": "DNgnCudf4cD?pwd=6666"
|
||||
},
|
||||
{
|
||||
"share_name": "黄妈",
|
||||
"share_id": "4bGRVUdUtct"
|
||||
},
|
||||
{
|
||||
"share_name": "YYDSVIP",
|
||||
"share_id": "dieULBdYP3D"
|
||||
},
|
||||
{
|
||||
"share_name": "优源阁",
|
||||
"share_id": "RnjUi1urdb2"
|
||||
},
|
||||
{
|
||||
"share_name": "风流动漫",
|
||||
"share_id": "WdaaeX7HK44"
|
||||
},
|
||||
{
|
||||
"share_name": "风流剧集",
|
||||
"share_id": "kgxWjZsK6bq"
|
||||
},
|
||||
{
|
||||
"share_name": "xiaaluo",
|
||||
"share_id": "sg8CdGUwmUr"
|
||||
},
|
||||
{
|
||||
"share_name": "4K影视",
|
||||
"share_id": "wHPKUENKFsS"
|
||||
}
|
||||
]
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,607 @@
|
|||
/*!
|
||||
* Jinja Templating for JavaScript v0.1.8
|
||||
* https://github.com/sstur/jinja-js
|
||||
*
|
||||
* This is a slimmed-down Jinja2 implementation [http://jinja.pocoo.org/]
|
||||
*
|
||||
* In the interest of simplicity, it deviates from Jinja2 as follows:
|
||||
* - Line statements, cycle, super, macro tags and block nesting are not implemented
|
||||
* - auto escapes html by default (the filter is "html" not "e")
|
||||
* - Only "html" and "safe" filters are built in
|
||||
* - Filters are not valid in expressions; `foo|length > 1` is not valid
|
||||
* - Expression Tests (`if num is odd`) not implemented (`is` translates to `==` and `isnot` to `!=`)
|
||||
*
|
||||
* Notes:
|
||||
* - if property is not found, but method '_get' exists, it will be called with the property name (and cached)
|
||||
* - `{% for n in obj %}` iterates the object's keys; get the value with `{% for n in obj %}{{ obj[n] }}{% endfor %}`
|
||||
* - subscript notation `a[0]` takes literals or simple variables but not `a[item.key]`
|
||||
* - `.2` is not a valid number literal; use `0.2`
|
||||
*
|
||||
*/
|
||||
/*global require, exports, module, define */
|
||||
|
||||
(function(global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jinja = {}));
|
||||
})(this, (function(jinja) {
|
||||
"use strict";
|
||||
var STRINGS = /'(\\.|[^'])*'|"(\\.|[^"'"])*"/g;
|
||||
var IDENTS_AND_NUMS = /([$_a-z][$\w]*)|([+-]?\d+(\.\d+)?)/g;
|
||||
var NUMBER = /^[+-]?\d+(\.\d+)?$/;
|
||||
//non-primitive literals (array and object literals)
|
||||
var NON_PRIMITIVES = /\[[@#~](,[@#~])*\]|\[\]|\{([@i]:[@#~])(,[@i]:[@#~])*\}|\{\}/g;
|
||||
//bare identifiers such as variables and in object literals: {foo: 'value'}
|
||||
var IDENTIFIERS = /[$_a-z][$\w]*/ig;
|
||||
var VARIABLES = /i(\.i|\[[@#i]\])*/g;
|
||||
var ACCESSOR = /(\.i|\[[@#i]\])/g;
|
||||
var OPERATORS = /(===?|!==?|>=?|<=?|&&|\|\||[+\-\*\/%])/g;
|
||||
//extended (english) operators
|
||||
var EOPS = /(^|[^$\w])(and|or|not|is|isnot)([^$\w]|$)/g;
|
||||
var LEADING_SPACE = /^\s+/;
|
||||
var TRAILING_SPACE = /\s+$/;
|
||||
|
||||
var START_TOKEN = /\{\{\{|\{\{|\{%|\{#/;
|
||||
var TAGS = {
|
||||
'{{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}\}/,
|
||||
'{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}/,
|
||||
'{%': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?%\}/,
|
||||
'{#': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?#\}/
|
||||
};
|
||||
|
||||
var delimeters = {
|
||||
'{%': 'directive',
|
||||
'{{': 'output',
|
||||
'{#': 'comment'
|
||||
};
|
||||
|
||||
var operators = {
|
||||
and: '&&',
|
||||
or: '||',
|
||||
not: '!',
|
||||
is: '==',
|
||||
isnot: '!='
|
||||
};
|
||||
|
||||
var constants = {
|
||||
'true': true,
|
||||
'false': false,
|
||||
'null': null
|
||||
};
|
||||
|
||||
function Parser() {
|
||||
this.nest = [];
|
||||
this.compiled = [];
|
||||
this.childBlocks = 0;
|
||||
this.parentBlocks = 0;
|
||||
this.isSilent = false;
|
||||
}
|
||||
|
||||
Parser.prototype.push = function(line) {
|
||||
if (!this.isSilent) {
|
||||
this.compiled.push(line);
|
||||
}
|
||||
};
|
||||
|
||||
Parser.prototype.parse = function(src) {
|
||||
this.tokenize(src);
|
||||
return this.compiled;
|
||||
};
|
||||
|
||||
Parser.prototype.tokenize = function(src) {
|
||||
var lastEnd = 0,
|
||||
parser = this,
|
||||
trimLeading = false;
|
||||
matchAll(src, START_TOKEN, function(open, index, src) {
|
||||
//here we match the rest of the src against a regex for this tag
|
||||
var match = src.slice(index + open.length).match(TAGS[open]);
|
||||
match = (match ? match[0] : '');
|
||||
//here we sub out strings so we don't get false matches
|
||||
var simplified = match.replace(STRINGS, '@');
|
||||
//if we don't have a close tag or there is a nested open tag
|
||||
if (!match || ~simplified.indexOf(open)) {
|
||||
return index + 1;
|
||||
}
|
||||
var inner = match.slice(0, 0 - open.length);
|
||||
//check for white-space collapse syntax
|
||||
if (inner.charAt(0) === '-') var wsCollapseLeft = true;
|
||||
if (inner.slice(-1) === '-') var wsCollapseRight = true;
|
||||
inner = inner.replace(/^-|-$/g, '').trim();
|
||||
//if we're in raw mode and we are not looking at an "endraw" tag, move along
|
||||
if (parser.rawMode && (open + inner) !== '{%endraw') {
|
||||
return index + 1;
|
||||
}
|
||||
var text = src.slice(lastEnd, index);
|
||||
lastEnd = index + open.length + match.length;
|
||||
if (trimLeading) text = trimLeft(text);
|
||||
if (wsCollapseLeft) text = trimRight(text);
|
||||
if (wsCollapseRight) trimLeading = true;
|
||||
if (open === '{{{') {
|
||||
//liquid-style: make {{{x}}} => {{x|safe}}
|
||||
open = '{{';
|
||||
inner += '|safe';
|
||||
}
|
||||
parser.textHandler(text);
|
||||
parser.tokenHandler(open, inner);
|
||||
});
|
||||
var text = src.slice(lastEnd);
|
||||
if (trimLeading) text = trimLeft(text);
|
||||
this.textHandler(text);
|
||||
};
|
||||
|
||||
Parser.prototype.textHandler = function(text) {
|
||||
this.push('write(' + JSON.stringify(text) + ');');
|
||||
};
|
||||
|
||||
Parser.prototype.tokenHandler = function(open, inner) {
|
||||
var type = delimeters[open];
|
||||
if (type === 'directive') {
|
||||
this.compileTag(inner);
|
||||
} else if (type === 'output') {
|
||||
var extracted = this.extractEnt(inner, STRINGS, '@');
|
||||
//replace || operators with ~
|
||||
extracted.src = extracted.src.replace(/\|\|/g, '~').split('|');
|
||||
//put back || operators
|
||||
extracted.src = extracted.src.map(function(part) {
|
||||
return part.split('~').join('||');
|
||||
});
|
||||
var parts = this.injectEnt(extracted, '@');
|
||||
if (parts.length > 1) {
|
||||
var filters = parts.slice(1).map(this.parseFilter.bind(this));
|
||||
this.push('filter(' + this.parseExpr(parts[0]) + ',' + filters.join(',') + ');');
|
||||
} else {
|
||||
this.push('filter(' + this.parseExpr(parts[0]) + ');');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Parser.prototype.compileTag = function(str) {
|
||||
var directive = str.split(' ')[0];
|
||||
var handler = tagHandlers[directive];
|
||||
if (!handler) {
|
||||
throw new Error('Invalid tag: ' + str);
|
||||
}
|
||||
handler.call(this, str.slice(directive.length).trim());
|
||||
};
|
||||
|
||||
Parser.prototype.parseFilter = function(src) {
|
||||
src = src.trim();
|
||||
var match = src.match(/[:(]/);
|
||||
var i = match ? match.index : -1;
|
||||
if (i < 0) return JSON.stringify([src]);
|
||||
var name = src.slice(0, i);
|
||||
var args = src.charAt(i) === ':' ? src.slice(i + 1) : src.slice(i + 1, -1);
|
||||
args = this.parseExpr(args, {
|
||||
terms: true
|
||||
});
|
||||
return '[' + JSON.stringify(name) + ',' + args + ']';
|
||||
};
|
||||
|
||||
Parser.prototype.extractEnt = function(src, regex, placeholder) {
|
||||
var subs = [],
|
||||
isFunc = typeof placeholder == 'function';
|
||||
src = src.replace(regex, function(str) {
|
||||
var replacement = isFunc ? placeholder(str) : placeholder;
|
||||
if (replacement) {
|
||||
subs.push(str);
|
||||
return replacement;
|
||||
}
|
||||
return str;
|
||||
});
|
||||
return {
|
||||
src: src,
|
||||
subs: subs
|
||||
};
|
||||
};
|
||||
|
||||
Parser.prototype.injectEnt = function(extracted, placeholder) {
|
||||
var src = extracted.src,
|
||||
subs = extracted.subs,
|
||||
isArr = Array.isArray(src);
|
||||
var arr = (isArr) ? src : [src];
|
||||
var re = new RegExp('[' + placeholder + ']', 'g'),
|
||||
i = 0;
|
||||
arr.forEach(function(src, index) {
|
||||
arr[index] = src.replace(re, function() {
|
||||
return subs[i++];
|
||||
});
|
||||
});
|
||||
return isArr ? arr : arr[0];
|
||||
};
|
||||
|
||||
//replace complex literals without mistaking subscript notation with array literals
|
||||
Parser.prototype.replaceComplex = function(s) {
|
||||
var parsed = this.extractEnt(s, /i(\.i|\[[@#i]\])+/g, 'v');
|
||||
parsed.src = parsed.src.replace(NON_PRIMITIVES, '~');
|
||||
return this.injectEnt(parsed, 'v');
|
||||
};
|
||||
|
||||
//parse expression containing literals (including objects/arrays) and variables (including dot and subscript notation)
|
||||
//valid expressions: `a + 1 > b.c or c == null`, `a and b[1] != c`, `(a < b) or (c < d and e)`, 'a || [1]`
|
||||
Parser.prototype.parseExpr = function(src, opts) {
|
||||
opts = opts || {};
|
||||
//extract string literals -> @
|
||||
var parsed1 = this.extractEnt(src, STRINGS, '@');
|
||||
//note: this will catch {not: 1} and a.is; could we replace temporarily and then check adjacent chars?
|
||||
parsed1.src = parsed1.src.replace(EOPS, function(s, before, op, after) {
|
||||
return (op in operators) ? before + operators[op] + after : s;
|
||||
});
|
||||
//sub out non-string literals (numbers/true/false/null) -> #
|
||||
// the distinction is necessary because @ can be object identifiers, # cannot
|
||||
var parsed2 = this.extractEnt(parsed1.src, IDENTS_AND_NUMS, function(s) {
|
||||
return (s in constants || NUMBER.test(s)) ? '#' : null;
|
||||
});
|
||||
//sub out object/variable identifiers -> i
|
||||
var parsed3 = this.extractEnt(parsed2.src, IDENTIFIERS, 'i');
|
||||
//remove white-space
|
||||
parsed3.src = parsed3.src.replace(/\s+/g, '');
|
||||
|
||||
//the rest of this is simply to boil the expression down and check validity
|
||||
var simplified = parsed3.src;
|
||||
//sub out complex literals (objects/arrays) -> ~
|
||||
// the distinction is necessary because @ and # can be subscripts but ~ cannot
|
||||
while (simplified !== (simplified = this.replaceComplex(simplified)));
|
||||
//now @ represents strings, # represents other primitives and ~ represents non-primitives
|
||||
//replace complex variables (those with dot/subscript accessors) -> v
|
||||
while (simplified !== (simplified = simplified.replace(/i(\.i|\[[@#i]\])+/, 'v')));
|
||||
//empty subscript or complex variables in subscript, are not permitted
|
||||
simplified = simplified.replace(/[iv]\[v?\]/g, 'x');
|
||||
//sub in "i" for @ and # and ~ and v (now "i" represents all literals, variables and identifiers)
|
||||
simplified = simplified.replace(/[@#~v]/g, 'i');
|
||||
//sub out operators
|
||||
simplified = simplified.replace(OPERATORS, '%');
|
||||
//allow 'not' unary operator
|
||||
simplified = simplified.replace(/!+[i]/g, 'i');
|
||||
var terms = opts.terms ? simplified.split(',') : [simplified];
|
||||
terms.forEach(function(term) {
|
||||
//simplify logical grouping
|
||||
while (term !== (term = term.replace(/\(i(%i)*\)/g, 'i')));
|
||||
if (!term.match(/^i(%i)*/)) {
|
||||
throw new Error('Invalid expression: ' + src + " " + term);
|
||||
}
|
||||
});
|
||||
parsed3.src = parsed3.src.replace(VARIABLES, this.parseVar.bind(this));
|
||||
parsed2.src = this.injectEnt(parsed3, 'i');
|
||||
parsed1.src = this.injectEnt(parsed2, '#');
|
||||
return this.injectEnt(parsed1, '@');
|
||||
};
|
||||
|
||||
Parser.prototype.parseVar = function(src) {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var str = args.pop(),
|
||||
index = args.pop();
|
||||
//quote bare object identifiers (might be a reserved word like {while: 1})
|
||||
if (src === 'i' && str.charAt(index + 1) === ':') {
|
||||
return '"i"';
|
||||
}
|
||||
var parts = ['"i"'];
|
||||
src.replace(ACCESSOR, function(part) {
|
||||
if (part === '.i') {
|
||||
parts.push('"i"');
|
||||
} else if (part === '[i]') {
|
||||
parts.push('get("i")');
|
||||
} else {
|
||||
parts.push(part.slice(1, -1));
|
||||
}
|
||||
});
|
||||
return 'get(' + parts.join(',') + ')';
|
||||
};
|
||||
|
||||
//escapes a name to be used as a javascript identifier
|
||||
Parser.prototype.escName = function(str) {
|
||||
return str.replace(/\W/g, function(s) {
|
||||
return '$' + s.charCodeAt(0).toString(16);
|
||||
});
|
||||
};
|
||||
|
||||
Parser.prototype.parseQuoted = function(str) {
|
||||
if (str.charAt(0) === "'") {
|
||||
str = str.slice(1, -1).replace(/\\.|"/, function(s) {
|
||||
if (s === "\\'") return "'";
|
||||
return s.charAt(0) === '\\' ? s : ('\\' + s);
|
||||
});
|
||||
str = '"' + str + '"';
|
||||
}
|
||||
//todo: try/catch or deal with invalid characters (linebreaks, control characters)
|
||||
return JSON.parse(str);
|
||||
};
|
||||
|
||||
|
||||
//the context 'this' inside tagHandlers is the parser instance
|
||||
var tagHandlers = {
|
||||
'if': function(expr) {
|
||||
this.push('if (' + this.parseExpr(expr) + ') {');
|
||||
this.nest.unshift('if');
|
||||
},
|
||||
'else': function() {
|
||||
if (this.nest[0] === 'for') {
|
||||
this.push('}, function() {');
|
||||
} else {
|
||||
this.push('} else {');
|
||||
}
|
||||
},
|
||||
'elseif': function(expr) {
|
||||
this.push('} else if (' + this.parseExpr(expr) + ') {');
|
||||
},
|
||||
'endif': function() {
|
||||
this.nest.shift();
|
||||
this.push('}');
|
||||
},
|
||||
'for': function(str) {
|
||||
var i = str.indexOf(' in ');
|
||||
var name = str.slice(0, i).trim();
|
||||
var expr = str.slice(i + 4).trim();
|
||||
this.push('each(' + this.parseExpr(expr) + ',' + JSON.stringify(name) + ',function() {');
|
||||
this.nest.unshift('for');
|
||||
},
|
||||
'endfor': function() {
|
||||
this.nest.shift();
|
||||
this.push('});');
|
||||
},
|
||||
'raw': function() {
|
||||
this.rawMode = true;
|
||||
},
|
||||
'endraw': function() {
|
||||
this.rawMode = false;
|
||||
},
|
||||
'set': function(stmt) {
|
||||
var i = stmt.indexOf('=');
|
||||
var name = stmt.slice(0, i).trim();
|
||||
var expr = stmt.slice(i + 1).trim();
|
||||
this.push('set(' + JSON.stringify(name) + ',' + this.parseExpr(expr) + ');');
|
||||
},
|
||||
'block': function(name) {
|
||||
if (this.isParent) {
|
||||
++this.parentBlocks;
|
||||
var blockName = 'block_' + (this.escName(name) || this.parentBlocks);
|
||||
this.push('block(typeof ' + blockName + ' == "function" ? ' + blockName + ' : function() {');
|
||||
} else if (this.hasParent) {
|
||||
this.isSilent = false;
|
||||
++this.childBlocks;
|
||||
blockName = 'block_' + (this.escName(name) || this.childBlocks);
|
||||
this.push('function ' + blockName + '() {');
|
||||
}
|
||||
this.nest.unshift('block');
|
||||
},
|
||||
'endblock': function() {
|
||||
this.nest.shift();
|
||||
if (this.isParent) {
|
||||
this.push('});');
|
||||
} else if (this.hasParent) {
|
||||
this.push('}');
|
||||
this.isSilent = true;
|
||||
}
|
||||
},
|
||||
'extends': function(name) {
|
||||
name = this.parseQuoted(name);
|
||||
var parentSrc = this.readTemplateFile(name);
|
||||
this.isParent = true;
|
||||
this.tokenize(parentSrc);
|
||||
this.isParent = false;
|
||||
this.hasParent = true;
|
||||
//silence output until we enter a child block
|
||||
this.isSilent = true;
|
||||
},
|
||||
'include': function(name) {
|
||||
name = this.parseQuoted(name);
|
||||
var incSrc = this.readTemplateFile(name);
|
||||
this.isInclude = true;
|
||||
this.tokenize(incSrc);
|
||||
this.isInclude = false;
|
||||
}
|
||||
};
|
||||
|
||||
//liquid style
|
||||
tagHandlers.assign = tagHandlers.set;
|
||||
//python/django style
|
||||
tagHandlers.elif = tagHandlers.elseif;
|
||||
|
||||
var getRuntime = function runtime(data, opts) {
|
||||
var defaults = {
|
||||
autoEscape: 'toJson'
|
||||
};
|
||||
var _toString = Object.prototype.toString;
|
||||
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var getKeys = Object.keys || function(obj) {
|
||||
var keys = [];
|
||||
for (var n in obj)
|
||||
if (_hasOwnProperty.call(obj, n)) keys.push(n);
|
||||
return keys;
|
||||
};
|
||||
var isArray = Array.isArray || function(obj) {
|
||||
return _toString.call(obj) === '[object Array]';
|
||||
};
|
||||
var create = Object.create || function(obj) {
|
||||
function F() {}
|
||||
|
||||
F.prototype = obj;
|
||||
return new F();
|
||||
};
|
||||
var toString = function(val) {
|
||||
if (val == null) return '';
|
||||
return (typeof val.toString == 'function') ? val.toString() : _toString.call(val);
|
||||
};
|
||||
var extend = function(dest, src) {
|
||||
var keys = getKeys(src);
|
||||
for (var i = 0, len = keys.length; i < len; i++) {
|
||||
var key = keys[i];
|
||||
dest[key] = src[key];
|
||||
}
|
||||
return dest;
|
||||
};
|
||||
//get a value, lexically, starting in current context; a.b -> get("a","b")
|
||||
var get = function() {
|
||||
var val, n = arguments[0],
|
||||
c = stack.length;
|
||||
while (c--) {
|
||||
val = stack[c][n];
|
||||
if (typeof val != 'undefined') break;
|
||||
}
|
||||
for (var i = 1, len = arguments.length; i < len; i++) {
|
||||
if (val == null) continue;
|
||||
n = arguments[i];
|
||||
val = (_hasOwnProperty.call(val, n)) ? val[n] : (typeof val._get == 'function' ? (val[n] = val._get(n)) : null);
|
||||
}
|
||||
return (val == null) ? '' : val;
|
||||
};
|
||||
var set = function(n, val) {
|
||||
stack[stack.length - 1][n] = val;
|
||||
};
|
||||
var push = function(ctx) {
|
||||
stack.push(ctx || {});
|
||||
};
|
||||
var pop = function() {
|
||||
stack.pop();
|
||||
};
|
||||
var write = function(str) {
|
||||
output.push(str);
|
||||
};
|
||||
var filter = function(val) {
|
||||
for (var i = 1, len = arguments.length; i < len; i++) {
|
||||
var arr = arguments[i],
|
||||
name = arr[0],
|
||||
filter = filters[name];
|
||||
if (filter) {
|
||||
arr[0] = val;
|
||||
//now arr looks like [val, arg1, arg2]
|
||||
val = filter.apply(data, arr);
|
||||
} else {
|
||||
throw new Error('Invalid filter: ' + name);
|
||||
}
|
||||
}
|
||||
if (opts.autoEscape && name !== opts.autoEscape && name !== 'safe') {
|
||||
//auto escape if not explicitly safe or already escaped
|
||||
val = filters[opts.autoEscape].call(data, val);
|
||||
}
|
||||
output.push(val);
|
||||
};
|
||||
var each = function(obj, loopvar, fn1, fn2) {
|
||||
if (obj == null) return;
|
||||
var arr = isArray(obj) ? obj : getKeys(obj),
|
||||
len = arr.length;
|
||||
var ctx = {
|
||||
loop: {
|
||||
length: len,
|
||||
first: arr[0],
|
||||
last: arr[len - 1]
|
||||
}
|
||||
};
|
||||
push(ctx);
|
||||
for (var i = 0; i < len; i++) {
|
||||
extend(ctx.loop, {
|
||||
index: i + 1,
|
||||
index0: i
|
||||
});
|
||||
fn1(ctx[loopvar] = arr[i]);
|
||||
}
|
||||
if (len === 0 && fn2) fn2();
|
||||
pop();
|
||||
};
|
||||
var block = function(fn) {
|
||||
push();
|
||||
fn();
|
||||
pop();
|
||||
};
|
||||
var render = function() {
|
||||
return output.join('');
|
||||
};
|
||||
data = data || {};
|
||||
opts = extend(defaults, opts || {});
|
||||
var filters = extend({
|
||||
html: function(val) {
|
||||
return toString(val)
|
||||
.split('&').join('&')
|
||||
.split('<').join('<')
|
||||
.split('>').join('>')
|
||||
.split('"').join('"');
|
||||
},
|
||||
safe: function(val) {
|
||||
return val;
|
||||
},
|
||||
toJson: function(val) {
|
||||
if (typeof val === 'object') {
|
||||
return JSON.stringify(val);
|
||||
}
|
||||
return toString(val);
|
||||
}
|
||||
}, opts.filters || {});
|
||||
var stack = [create(data || {})],
|
||||
output = [];
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
push: push,
|
||||
pop: pop,
|
||||
write: write,
|
||||
filter: filter,
|
||||
each: each,
|
||||
block: block,
|
||||
render: render
|
||||
};
|
||||
};
|
||||
|
||||
var runtime;
|
||||
|
||||
jinja.compile = function(markup, opts) {
|
||||
opts = opts || {};
|
||||
var parser = new Parser();
|
||||
parser.readTemplateFile = this.readTemplateFile;
|
||||
var code = [];
|
||||
code.push('function render($) {');
|
||||
code.push('var get = $.get, set = $.set, push = $.push, pop = $.pop, write = $.write, filter = $.filter, each = $.each, block = $.block;');
|
||||
code.push.apply(code, parser.parse(markup));
|
||||
code.push('return $.render();');
|
||||
code.push('}');
|
||||
code = code.join('\n');
|
||||
if (opts.runtime === false) {
|
||||
var fn = new Function('data', 'options', 'return (' + code + ')(runtime(data, options))');
|
||||
} else {
|
||||
runtime = runtime || (runtime = getRuntime.toString());
|
||||
fn = new Function('data', 'options', 'return (' + code + ')((' + runtime + ')(data, options))');
|
||||
}
|
||||
return {
|
||||
render: fn
|
||||
};
|
||||
};
|
||||
|
||||
jinja.render = function(markup, data, opts) {
|
||||
var tmpl = jinja.compile(markup);
|
||||
return tmpl.render(data, opts);
|
||||
};
|
||||
|
||||
jinja.templateFiles = [];
|
||||
|
||||
jinja.readTemplateFile = function(name) {
|
||||
var templateFiles = this.templateFiles || [];
|
||||
var templateFile = templateFiles[name];
|
||||
if (templateFile == null) {
|
||||
throw new Error('Template file not found: ' + name);
|
||||
}
|
||||
return templateFile;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* Helpers
|
||||
*/
|
||||
|
||||
function trimLeft(str) {
|
||||
return str.replace(LEADING_SPACE, '');
|
||||
}
|
||||
|
||||
function trimRight(str) {
|
||||
return str.replace(TRAILING_SPACE, '');
|
||||
}
|
||||
|
||||
function matchAll(str, reg, fn) {
|
||||
//copy as global
|
||||
reg = new RegExp(reg.source, 'g' + (reg.ignoreCase ? 'i' : '') + (reg.multiline ? 'm' : ''));
|
||||
var match;
|
||||
while ((match = reg.exec(str))) {
|
||||
var result = fn(match[0], match.index, str);
|
||||
if (typeof result == 'number') {
|
||||
reg.lastIndex = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,429 @@
|
|||
if (typeof Object.assign !== 'function') {
|
||||
Object.assign = function() {
|
||||
let target = arguments[0];
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
let source = arguments[i];
|
||||
for (let key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
}
|
||||
|
||||
// 通用免嗅探播放
|
||||
let common_lazy = `js:
|
||||
let html = request(input);
|
||||
let hconf = html.match(/r player_.*?=(.*?)</)[1];
|
||||
let json = JSON5.parse(hconf);
|
||||
let url = json.url;
|
||||
if (json.encrypt == '1') {
|
||||
url = unescape(url);
|
||||
} else if (json.encrypt == '2') {
|
||||
url = unescape(base64Decode(url));
|
||||
}
|
||||
if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {
|
||||
input = {
|
||||
parse: 0,
|
||||
jx: 0,
|
||||
url: url,
|
||||
};
|
||||
} else {
|
||||
input;
|
||||
}`;
|
||||
// 默认嗅探播放
|
||||
|
||||
let def_lazy = `js:
|
||||
input = { parse: 1, url: input, js: '' };`;
|
||||
// 采集站播放
|
||||
|
||||
let cj_lazy = `js:
|
||||
if (/\\.(m3u8|mp4)/.test(input)) {
|
||||
input = { parse: 0, url: input };
|
||||
} else {
|
||||
if (rule.parse_url.startsWith('json:')) {
|
||||
let purl = rule.parse_url.replace('json:', '') + input;
|
||||
let html = request(purl);
|
||||
let json = JSON.parse(html);
|
||||
if (json.url) {
|
||||
input = { parse: 0, url: json.url };
|
||||
}
|
||||
} else {
|
||||
input = rule.parse_url + input;
|
||||
}
|
||||
}`;
|
||||
|
||||
function getMubans() {
|
||||
const mubanDict = { // 模板字典
|
||||
mx: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/vodshow/fyclass--------fypage---/',
|
||||
searchUrl: '/vodsearch/**----------fypage---/',
|
||||
class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: '.cbox_list;*;*;*;*;*',
|
||||
一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h2&&Text;.content_detail:eq(1)&&li&&a:eq(2)&&Text',
|
||||
img: '.vodlist_thumb&&data-original',
|
||||
desc: '.content_detail:eq(1)&&li:eq(1)&&Text;.content_detail:eq(1)&&li&&a&&Text;.content_detail:eq(1)&&li&&a:eq(1)&&Text;.content_detail:eq(1)&&li:eq(2)&&Text;.content_detail:eq(1)&&li:eq(3)&&Text',
|
||||
content: '.content_desc&&span&&Text',
|
||||
tabs: '.play_source_tab&&a',
|
||||
lists: '.content_playlist:eq(#id) li',
|
||||
},
|
||||
搜索: '*',
|
||||
},
|
||||
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(0):lt(10);a&&Text;a&&href;/(\\d+)',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.module-info-tag-link:eq(-1)&&Text',
|
||||
img: '.lazyload&&data-original||data-src||src',
|
||||
desc: '.module-info-item:eq(-2)&&Text;.module-info-tag-link&&Text;.module-info-tag-link:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(1)&&Text',
|
||||
content: '.module-info-introduction&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-play-list:eq(#id) a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '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: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||
一级: '.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(3)&&Text;.tag-link:eq(2)&&Text;.tag-link:eq(1)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(0)&&Text',
|
||||
content: '.vod_content&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-player-list:eq(#id)&&.scroll-content&&a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '.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(7);a&&Text;a&&href;/(\\d+).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.myui-content__detail .title--span&&Text;.myui-content__detail p.data:eq(3)&&Text',
|
||||
img: '.myui-content__thumb .lazyload&&data-original',
|
||||
desc: '.myui-content__detail p.otherbox&&Text;.year&&Text;.myui-content__detail p.data:eq(4)&&Text;.myui-content__detail p.data:eq(2)&&Text;.myui-content__detail p.data:eq(0)&&Text',
|
||||
content: '.content&&Text',
|
||||
tabs: '.myui-panel__head&&li',
|
||||
// tabs: '.nav-tabs&&li',
|
||||
lists: '.myui-content__list:eq(#id) li',
|
||||
},
|
||||
搜索: '#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&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;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.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)&&a&&Text',
|
||||
title1: '.stui-content__detail .title&&Text;.stui-content__detail&&p&&Text',
|
||||
img: '.stui-content__thumb .lazyload&&data-original',
|
||||
desc: '.stui-content__detail p&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(2)&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text;.stui-content__detail p:eq(1)&&Text',
|
||||
desc1: '.stui-content__detail p:eq(4)&&Text;;;.stui-content__detail p:eq(1)&&Text',
|
||||
content: '.detail&&Text',
|
||||
tabs: '.stui-pannel__head h3',
|
||||
tabs1: '.stui-vodlist__head h3',
|
||||
lists: '.stui-content__playlist:eq(#id) li',
|
||||
},
|
||||
搜索: 'ul.stui-vodlist__media,ul.stui-vodlist,#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||
},
|
||||
默认: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '',
|
||||
searchUrl: '',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
filter: '',
|
||||
filter_url: '',
|
||||
filter_def: {},
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: '#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||
cate_exclude: '',
|
||||
play_parse: true,
|
||||
lazy: def_lazy,
|
||||
double: true,
|
||||
推荐: '列表1;列表2;标题;图片;描述;链接;详情',
|
||||
一级: '列表;标题;图片;描述;链接;详情',
|
||||
二级: {
|
||||
title: 'vod_name;vod_type',
|
||||
img: '图片链接',
|
||||
desc: '主要信息;年代;地区;演员;导演',
|
||||
content: '简介',
|
||||
tabs: '',
|
||||
lists: 'xx:eq(#id)&&a',
|
||||
tab_text: 'body&&Text',
|
||||
list_text: 'body&&Text',
|
||||
list_url: 'a&&href',
|
||||
},
|
||||
搜索: '列表;标题;图片;描述;链接;详情',
|
||||
},
|
||||
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;a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||
一级: '.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: common_lazy,
|
||||
double: true,
|
||||
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.hl-dc-title&&Text;.hl-dc-content&&li:eq(6)&&Text',
|
||||
img: '.hl-lazy&&data-original',
|
||||
desc: '.hl-dc-content&&li:eq(10)&&Text;.hl-dc-content&&li:eq(4)&&Text;.hl-dc-content&&li:eq(5)&&Text;.hl-dc-content&&li:eq(2)&&Text;.hl-dc-content&&li:eq(3)&&Text',
|
||||
content: '.hl-content-text&&Text',
|
||||
tabs: '.hl-tabs&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
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: common_lazy,
|
||||
double: true,
|
||||
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
||||
一级: '.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: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||
一级: '.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=**&limit=50',
|
||||
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',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
推荐: '.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(2)--strong&&Text',
|
||||
img: '.detail-pic&&data-original',
|
||||
desc: '.slide-info-remarks&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(1)--strong&&Text;.info-parameter&&ul&&li:eq(3)&&Text',
|
||||
content: '#height_limit&&Text',
|
||||
tabs: '.anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
lists: '.anthology-list-box:eq(#id) li',
|
||||
},
|
||||
搜索: 'json:list;name;pic;;id',
|
||||
},
|
||||
采集1: {
|
||||
title: '',
|
||||
host: '',
|
||||
homeTid: '13',
|
||||
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||
detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
|
||||
searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
|
||||
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyclass',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA'
|
||||
},
|
||||
timeout: 5000, // class_name: '电影&电视剧&综艺&动漫',
|
||||
// class_url: '1&2&3&4',
|
||||
// class_parse:'js:let html=request(input);input=JSON.parse(html).class;',
|
||||
class_parse: 'json:class;',
|
||||
limit: 20,
|
||||
multi: 1,
|
||||
searchable: 2, //是否启用全局搜索,
|
||||
quickSearch: 1, //是否启用快速搜索,
|
||||
filterable: 0, //是否启用分类筛选,
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: cj_lazy,
|
||||
推荐: '*',
|
||||
一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
||||
二级: `js:
|
||||
let html=request(input);
|
||||
html=JSON.parse(html);
|
||||
let data=html.list;
|
||||
VOD=data[0];`,
|
||||
搜索: '*',
|
||||
},
|
||||
};
|
||||
return JSON.parse(JSON.stringify(mubanDict));
|
||||
}
|
||||
|
||||
var mubanDict = getMubans();
|
||||
var muban = getMubans();
|
||||
export default {
|
||||
muban,
|
||||
getMubans
|
||||
};
|
|
@ -0,0 +1,29 @@
|
|||
var rule = {
|
||||
类型: '影视',//影视|听书|漫画|小说
|
||||
title: '爱看短剧[盘]',
|
||||
host: 'https://ys.110t.cn/',
|
||||
homeUrl: '/api/ajax.php?act=recommend',
|
||||
homeUrl: '/api/ajax.php?act=Daily',
|
||||
url: '/api/ajax.php?act=fyclass',
|
||||
searchUrl: '/api/ajax.php?act=search&name=**',
|
||||
searchable: 1,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
hikerListCol: "text_1",
|
||||
hikerClassListCol: "text_1",
|
||||
timeout: 5000,
|
||||
class_name: '全部',
|
||||
class_url: 'yingshilist',
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
input = "push://" + input;
|
||||
}),
|
||||
double: false,
|
||||
推荐: '*',
|
||||
一级: 'json:data;name;;addtime;url',
|
||||
二级: '*',
|
||||
搜索: '*',
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,22 @@
|
|||
var rule = {
|
||||
title:'310直播',
|
||||
host:'http://www.310.tv',
|
||||
url:'/?s=0&t=1&a=fyclass&g=fypage',
|
||||
searchUrl:'',
|
||||
searchable:0,
|
||||
quickSearch:0,
|
||||
class_name:'热门&足球&篮球',
|
||||
class_url:'0&1&2',
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA'
|
||||
},
|
||||
timeout:5000,
|
||||
play_parse:false,
|
||||
lazy:'',
|
||||
limit:6,
|
||||
double:false,
|
||||
推荐:'*',
|
||||
一级:'.list_content a;.jiabifeng&&p:lt(5)&&Text;.feleimg img&&src;a&&t-nzf-o;a&&href',
|
||||
二级:'*',
|
||||
搜索:'',
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
globalThis.getVideos = function(link, key) {
|
||||
let html = request(link);
|
||||
let json = JSON.parse(html);
|
||||
let data = json.data;
|
||||
data = data[key];
|
||||
let videos = data.map((n) => {
|
||||
let id = n.url;
|
||||
let name = n.league_name_zh + ' ' + n.home_team_zh + ' VS ' + n.away_team_zh;
|
||||
let pic = n.cover;
|
||||
let remarks = n.nickname;
|
||||
return {
|
||||
vod_id: id,
|
||||
vod_name: name,
|
||||
vod_pic: pic,
|
||||
vod_remarks: remarks,
|
||||
};
|
||||
});
|
||||
return videos
|
||||
}
|
||||
var rule = {
|
||||
类型: '影视', //影视|听书|漫画|小说
|
||||
title: '360吧[球]',
|
||||
host: 'https://m.360ba.co/',
|
||||
homeUrl: '/api/web/h5_index',
|
||||
url: '/api/web/live_lists/fyclass',
|
||||
searchUrl: '/api/web/search?keyword=**',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_name: '全部&足球&篮球&综合',
|
||||
class_url: '1&2&3&99',
|
||||
play_parse: true,
|
||||
pagecount: {
|
||||
"1": 1,
|
||||
"2": 1,
|
||||
"3": 1,
|
||||
"99": 1,
|
||||
},
|
||||
lazy: $js.toString(() => {
|
||||
input = {
|
||||
parse: 0,
|
||||
url: input,
|
||||
header: rule.headers
|
||||
};
|
||||
}),
|
||||
预处理: $js.toString(() => {
|
||||
Object.assign(rule.headers, {
|
||||
'Referer': rule.host,
|
||||
'Origin': rule.host,
|
||||
});
|
||||
}),
|
||||
推荐: $js.toString(() => {
|
||||
VODS = getVideos(input, 'hot_matches');
|
||||
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
VODS = [];
|
||||
if (MY_PAGE <= 1) {
|
||||
VODS = getVideos(input, 'data');
|
||||
}
|
||||
}),
|
||||
二级: '*',
|
||||
搜索: $js.toString(() => {
|
||||
VODS = [];
|
||||
if (MY_PAGE <= 1) {
|
||||
VODS = getVideos(input, 'ball');
|
||||
}
|
||||
}),
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
var rule = {
|
||||
title: "88看球",
|
||||
// host:'http://www.88kanqiu.cc',
|
||||
host: "http://www.88kanqiu.live",
|
||||
url: "/match/fyclass/live",
|
||||
searchUrl: "",
|
||||
searchable: 0,
|
||||
quickSearch: 0,
|
||||
class_parse: ".nav-pills li;a&&Text;a&&href;/match/(\\d+)/live",
|
||||
headers: {
|
||||
"User-Agent": "PC_UA",
|
||||
},
|
||||
timeout: 5000,
|
||||
play_parse: true,
|
||||
pagecount: {
|
||||
"1": 1,
|
||||
"2": 1,
|
||||
"4": 1,
|
||||
"22": 1,
|
||||
"8": 1,
|
||||
"9": 1,
|
||||
"10": 1,
|
||||
"14": 1,
|
||||
"15": 1,
|
||||
"12": 1,
|
||||
"13": 1,
|
||||
"16": 1,
|
||||
"28": 1,
|
||||
"7": 1,
|
||||
"11": 1,
|
||||
"33": 1,
|
||||
"27": 1,
|
||||
"23": 1,
|
||||
"26": 1,
|
||||
"3": 1,
|
||||
"21": 1,
|
||||
"18": 1
|
||||
},
|
||||
lazy: $js.toString(() => {
|
||||
if (/embed=/.test(input)) {
|
||||
let url = input.match(/embed=(.*?)&/)[1];
|
||||
url = base64Decode(url);
|
||||
input = {
|
||||
jx: 0,
|
||||
url: url.split('#')[0],
|
||||
parse: 0
|
||||
}
|
||||
} else if (/\?url=/.test(input)) {
|
||||
input = {
|
||||
jx: 0,
|
||||
url: input.split('?url=')[1].split('#')[0],
|
||||
parse: 0
|
||||
}
|
||||
} else {
|
||||
input
|
||||
}
|
||||
}),
|
||||
limit: 6,
|
||||
double: false,
|
||||
推荐: "*",
|
||||
一级: ".list-group .group-game-item;.d-none&&Text;img&&src;.btn&&Text;a&&href",
|
||||
二级: {
|
||||
title: ".game-info-container&&Text;.customer-navbar-nav li&&Text",
|
||||
img: "img&&src",
|
||||
desc: ";;;div.team-name:eq(0)&&Text;div.team-name:eq(1)&&Text",
|
||||
content: "div.game-time&&Text",
|
||||
tabs: "js:TABS=['88看球']",
|
||||
lists: $js.toString(() => {
|
||||
LISTS = [];
|
||||
let html = request(input.replace('play', 'play-url'));
|
||||
let pdata = JSON.parse(html)
|
||||
.data;
|
||||
pdata = pdata.slice(6);
|
||||
pdata = pdata.slice(0, -2);
|
||||
pdata = base64Decode(pdata);
|
||||
// log(pdata);
|
||||
let jo = JSON.parse(pdata)
|
||||
.links;
|
||||
let d = jo.map(function(it) {
|
||||
return it.name + '$' + urlencode(it.url)
|
||||
});
|
||||
LISTS.push(d)
|
||||
}),
|
||||
},
|
||||
搜索: "",
|
||||
};
|
|
@ -0,0 +1,44 @@
|
|||
// 道长 drpy仓库 https://gitcode.net/qq_32394351/dr_py
|
||||
// 道长 drpy安卓本地搭建说明 https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/blob/master/%E5%AE%89%E5%8D%93%E6%9C%AC%E5%9C%B0%E6%90%AD%E5%BB%BA%E8%AF%B4%E6%98%8E.md
|
||||
// 道长 drpy写源 模板规则说明 https://gitcode.net/qq_32394351/dr_py#%E6%A8%A1%E6%9D%BF%E8%A7%84%E5%88%99%E8%AF%B4%E6%98%8E
|
||||
// 道长 drpy写源 套模模版 https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/%E6%A8%A1%E6%9D%BF.js
|
||||
// 道长 drpy写源 相关视频教程 https://www.youtube.com/watch?v=AK7cN-fcwm4
|
||||
// 道长 drpy写源 写源教学视频 https://t.me/fongmi_offical/54080/63553
|
||||
// 海阔下载 https://haikuo.lanzoui.com/u/GoldRiver
|
||||
// 影视TV 官方TG Drpy群 https://t.me/fongmi_offical/63689
|
||||
// 影视TV 官方TG 下载 https://t.me/fongmi_release
|
||||
|
||||
|
||||
var rule = {
|
||||
title:'JRKAN直播',
|
||||
host:'http://www.jrkankan.com/?lan=1',
|
||||
// JRKAN备用域名:www.jrkankan.com / www.jrkan365.com / jrsyyds.com / www.jryyds.com / jrskan.com / jrsbxj.com
|
||||
// JRKAN网址发布:qiumi1314.com
|
||||
url:'/fyclass',
|
||||
searchUrl:'',
|
||||
searchable:0,
|
||||
quickSearch:0,
|
||||
class_name:'全部',
|
||||
class_url:'/',
|
||||
//class_url:'?live',
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA'
|
||||
},
|
||||
timeout:5000,
|
||||
play_parse:true,
|
||||
lazy:"",
|
||||
limit:6,
|
||||
double:false,
|
||||
推荐:'*',
|
||||
// 一级:'.loc_match:eq(2) ul;li:gt(1):lt(4)&&Text;img&&src;li:lt(2)&&Text;a:eq(1)&&href',//play.sportsteam333.com
|
||||
一级:"js:var items=[];pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;var html=request(input);var tabs=pdfa(html,'body&&.d-touch');tabs.forEach(function(it){var pz=pdfh(it,'.name:eq(1)&&Text');var ps=pdfh(it,'.name:eq(0)&&Text');var pk=pdfh(it,'.name:eq(2)&&Text');var img=pd(it,'img&&src');var timer=pdfh(it,'.lab_time&&Text');var url=pd(it,'a.me&&href');items.push({desc:timer+'🏆'+ps,title:pz+'🆚'+pk,pic_url:img,url:url})});setResult(items);",
|
||||
二级:{
|
||||
"title":".sub_list li:lt(2)&&Text;.sub_list li:eq(0)&&Text",
|
||||
"img":"img&&src",
|
||||
"desc":";;;.lab_team_home&&Text;.lab_team_away&&Text",
|
||||
"content":".sub_list ul&&Text",
|
||||
"tabs":"js:TABS=['JRKAN直播']",
|
||||
"lists":"js:LISTS=[];pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;let html=request(input);let data=pdfa(html,'.sub_playlist&&a');TABS.forEach(function(tab){let d=data.map(function(it){let name=pdfh(it,'strong&&Text');let url=pd(it,'a&&data-play');return name+'$'+url});LISTS.push(d)});",
|
||||
},
|
||||
搜索:'',
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,607 @@
|
|||
/*!
|
||||
* Jinja Templating for JavaScript v0.1.8
|
||||
* https://github.com/sstur/jinja-js
|
||||
*
|
||||
* This is a slimmed-down Jinja2 implementation [http://jinja.pocoo.org/]
|
||||
*
|
||||
* In the interest of simplicity, it deviates from Jinja2 as follows:
|
||||
* - Line statements, cycle, super, macro tags and block nesting are not implemented
|
||||
* - auto escapes html by default (the filter is "html" not "e")
|
||||
* - Only "html" and "safe" filters are built in
|
||||
* - Filters are not valid in expressions; `foo|length > 1` is not valid
|
||||
* - Expression Tests (`if num is odd`) not implemented (`is` translates to `==` and `isnot` to `!=`)
|
||||
*
|
||||
* Notes:
|
||||
* - if property is not found, but method '_get' exists, it will be called with the property name (and cached)
|
||||
* - `{% for n in obj %}` iterates the object's keys; get the value with `{% for n in obj %}{{ obj[n] }}{% endfor %}`
|
||||
* - subscript notation `a[0]` takes literals or simple variables but not `a[item.key]`
|
||||
* - `.2` is not a valid number literal; use `0.2`
|
||||
*
|
||||
*/
|
||||
/*global require, exports, module, define */
|
||||
|
||||
(function(global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jinja = {}));
|
||||
})(this, (function(jinja) {
|
||||
"use strict";
|
||||
var STRINGS = /'(\\.|[^'])*'|"(\\.|[^"'"])*"/g;
|
||||
var IDENTS_AND_NUMS = /([$_a-z][$\w]*)|([+-]?\d+(\.\d+)?)/g;
|
||||
var NUMBER = /^[+-]?\d+(\.\d+)?$/;
|
||||
//non-primitive literals (array and object literals)
|
||||
var NON_PRIMITIVES = /\[[@#~](,[@#~])*\]|\[\]|\{([@i]:[@#~])(,[@i]:[@#~])*\}|\{\}/g;
|
||||
//bare identifiers such as variables and in object literals: {foo: 'value'}
|
||||
var IDENTIFIERS = /[$_a-z][$\w]*/ig;
|
||||
var VARIABLES = /i(\.i|\[[@#i]\])*/g;
|
||||
var ACCESSOR = /(\.i|\[[@#i]\])/g;
|
||||
var OPERATORS = /(===?|!==?|>=?|<=?|&&|\|\||[+\-\*\/%])/g;
|
||||
//extended (english) operators
|
||||
var EOPS = /(^|[^$\w])(and|or|not|is|isnot)([^$\w]|$)/g;
|
||||
var LEADING_SPACE = /^\s+/;
|
||||
var TRAILING_SPACE = /\s+$/;
|
||||
|
||||
var START_TOKEN = /\{\{\{|\{\{|\{%|\{#/;
|
||||
var TAGS = {
|
||||
'{{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}\}/,
|
||||
'{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}/,
|
||||
'{%': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?%\}/,
|
||||
'{#': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?#\}/
|
||||
};
|
||||
|
||||
var delimeters = {
|
||||
'{%': 'directive',
|
||||
'{{': 'output',
|
||||
'{#': 'comment'
|
||||
};
|
||||
|
||||
var operators = {
|
||||
and: '&&',
|
||||
or: '||',
|
||||
not: '!',
|
||||
is: '==',
|
||||
isnot: '!='
|
||||
};
|
||||
|
||||
var constants = {
|
||||
'true': true,
|
||||
'false': false,
|
||||
'null': null
|
||||
};
|
||||
|
||||
function Parser() {
|
||||
this.nest = [];
|
||||
this.compiled = [];
|
||||
this.childBlocks = 0;
|
||||
this.parentBlocks = 0;
|
||||
this.isSilent = false;
|
||||
}
|
||||
|
||||
Parser.prototype.push = function(line) {
|
||||
if (!this.isSilent) {
|
||||
this.compiled.push(line);
|
||||
}
|
||||
};
|
||||
|
||||
Parser.prototype.parse = function(src) {
|
||||
this.tokenize(src);
|
||||
return this.compiled;
|
||||
};
|
||||
|
||||
Parser.prototype.tokenize = function(src) {
|
||||
var lastEnd = 0,
|
||||
parser = this,
|
||||
trimLeading = false;
|
||||
matchAll(src, START_TOKEN, function(open, index, src) {
|
||||
//here we match the rest of the src against a regex for this tag
|
||||
var match = src.slice(index + open.length).match(TAGS[open]);
|
||||
match = (match ? match[0] : '');
|
||||
//here we sub out strings so we don't get false matches
|
||||
var simplified = match.replace(STRINGS, '@');
|
||||
//if we don't have a close tag or there is a nested open tag
|
||||
if (!match || ~simplified.indexOf(open)) {
|
||||
return index + 1;
|
||||
}
|
||||
var inner = match.slice(0, 0 - open.length);
|
||||
//check for white-space collapse syntax
|
||||
if (inner.charAt(0) === '-') var wsCollapseLeft = true;
|
||||
if (inner.slice(-1) === '-') var wsCollapseRight = true;
|
||||
inner = inner.replace(/^-|-$/g, '').trim();
|
||||
//if we're in raw mode and we are not looking at an "endraw" tag, move along
|
||||
if (parser.rawMode && (open + inner) !== '{%endraw') {
|
||||
return index + 1;
|
||||
}
|
||||
var text = src.slice(lastEnd, index);
|
||||
lastEnd = index + open.length + match.length;
|
||||
if (trimLeading) text = trimLeft(text);
|
||||
if (wsCollapseLeft) text = trimRight(text);
|
||||
if (wsCollapseRight) trimLeading = true;
|
||||
if (open === '{{{') {
|
||||
//liquid-style: make {{{x}}} => {{x|safe}}
|
||||
open = '{{';
|
||||
inner += '|safe';
|
||||
}
|
||||
parser.textHandler(text);
|
||||
parser.tokenHandler(open, inner);
|
||||
});
|
||||
var text = src.slice(lastEnd);
|
||||
if (trimLeading) text = trimLeft(text);
|
||||
this.textHandler(text);
|
||||
};
|
||||
|
||||
Parser.prototype.textHandler = function(text) {
|
||||
this.push('write(' + JSON.stringify(text) + ');');
|
||||
};
|
||||
|
||||
Parser.prototype.tokenHandler = function(open, inner) {
|
||||
var type = delimeters[open];
|
||||
if (type === 'directive') {
|
||||
this.compileTag(inner);
|
||||
} else if (type === 'output') {
|
||||
var extracted = this.extractEnt(inner, STRINGS, '@');
|
||||
//replace || operators with ~
|
||||
extracted.src = extracted.src.replace(/\|\|/g, '~').split('|');
|
||||
//put back || operators
|
||||
extracted.src = extracted.src.map(function(part) {
|
||||
return part.split('~').join('||');
|
||||
});
|
||||
var parts = this.injectEnt(extracted, '@');
|
||||
if (parts.length > 1) {
|
||||
var filters = parts.slice(1).map(this.parseFilter.bind(this));
|
||||
this.push('filter(' + this.parseExpr(parts[0]) + ',' + filters.join(',') + ');');
|
||||
} else {
|
||||
this.push('filter(' + this.parseExpr(parts[0]) + ');');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Parser.prototype.compileTag = function(str) {
|
||||
var directive = str.split(' ')[0];
|
||||
var handler = tagHandlers[directive];
|
||||
if (!handler) {
|
||||
throw new Error('Invalid tag: ' + str);
|
||||
}
|
||||
handler.call(this, str.slice(directive.length).trim());
|
||||
};
|
||||
|
||||
Parser.prototype.parseFilter = function(src) {
|
||||
src = src.trim();
|
||||
var match = src.match(/[:(]/);
|
||||
var i = match ? match.index : -1;
|
||||
if (i < 0) return JSON.stringify([src]);
|
||||
var name = src.slice(0, i);
|
||||
var args = src.charAt(i) === ':' ? src.slice(i + 1) : src.slice(i + 1, -1);
|
||||
args = this.parseExpr(args, {
|
||||
terms: true
|
||||
});
|
||||
return '[' + JSON.stringify(name) + ',' + args + ']';
|
||||
};
|
||||
|
||||
Parser.prototype.extractEnt = function(src, regex, placeholder) {
|
||||
var subs = [],
|
||||
isFunc = typeof placeholder == 'function';
|
||||
src = src.replace(regex, function(str) {
|
||||
var replacement = isFunc ? placeholder(str) : placeholder;
|
||||
if (replacement) {
|
||||
subs.push(str);
|
||||
return replacement;
|
||||
}
|
||||
return str;
|
||||
});
|
||||
return {
|
||||
src: src,
|
||||
subs: subs
|
||||
};
|
||||
};
|
||||
|
||||
Parser.prototype.injectEnt = function(extracted, placeholder) {
|
||||
var src = extracted.src,
|
||||
subs = extracted.subs,
|
||||
isArr = Array.isArray(src);
|
||||
var arr = (isArr) ? src : [src];
|
||||
var re = new RegExp('[' + placeholder + ']', 'g'),
|
||||
i = 0;
|
||||
arr.forEach(function(src, index) {
|
||||
arr[index] = src.replace(re, function() {
|
||||
return subs[i++];
|
||||
});
|
||||
});
|
||||
return isArr ? arr : arr[0];
|
||||
};
|
||||
|
||||
//replace complex literals without mistaking subscript notation with array literals
|
||||
Parser.prototype.replaceComplex = function(s) {
|
||||
var parsed = this.extractEnt(s, /i(\.i|\[[@#i]\])+/g, 'v');
|
||||
parsed.src = parsed.src.replace(NON_PRIMITIVES, '~');
|
||||
return this.injectEnt(parsed, 'v');
|
||||
};
|
||||
|
||||
//parse expression containing literals (including objects/arrays) and variables (including dot and subscript notation)
|
||||
//valid expressions: `a + 1 > b.c or c == null`, `a and b[1] != c`, `(a < b) or (c < d and e)`, 'a || [1]`
|
||||
Parser.prototype.parseExpr = function(src, opts) {
|
||||
opts = opts || {};
|
||||
//extract string literals -> @
|
||||
var parsed1 = this.extractEnt(src, STRINGS, '@');
|
||||
//note: this will catch {not: 1} and a.is; could we replace temporarily and then check adjacent chars?
|
||||
parsed1.src = parsed1.src.replace(EOPS, function(s, before, op, after) {
|
||||
return (op in operators) ? before + operators[op] + after : s;
|
||||
});
|
||||
//sub out non-string literals (numbers/true/false/null) -> #
|
||||
// the distinction is necessary because @ can be object identifiers, # cannot
|
||||
var parsed2 = this.extractEnt(parsed1.src, IDENTS_AND_NUMS, function(s) {
|
||||
return (s in constants || NUMBER.test(s)) ? '#' : null;
|
||||
});
|
||||
//sub out object/variable identifiers -> i
|
||||
var parsed3 = this.extractEnt(parsed2.src, IDENTIFIERS, 'i');
|
||||
//remove white-space
|
||||
parsed3.src = parsed3.src.replace(/\s+/g, '');
|
||||
|
||||
//the rest of this is simply to boil the expression down and check validity
|
||||
var simplified = parsed3.src;
|
||||
//sub out complex literals (objects/arrays) -> ~
|
||||
// the distinction is necessary because @ and # can be subscripts but ~ cannot
|
||||
while (simplified !== (simplified = this.replaceComplex(simplified)));
|
||||
//now @ represents strings, # represents other primitives and ~ represents non-primitives
|
||||
//replace complex variables (those with dot/subscript accessors) -> v
|
||||
while (simplified !== (simplified = simplified.replace(/i(\.i|\[[@#i]\])+/, 'v')));
|
||||
//empty subscript or complex variables in subscript, are not permitted
|
||||
simplified = simplified.replace(/[iv]\[v?\]/g, 'x');
|
||||
//sub in "i" for @ and # and ~ and v (now "i" represents all literals, variables and identifiers)
|
||||
simplified = simplified.replace(/[@#~v]/g, 'i');
|
||||
//sub out operators
|
||||
simplified = simplified.replace(OPERATORS, '%');
|
||||
//allow 'not' unary operator
|
||||
simplified = simplified.replace(/!+[i]/g, 'i');
|
||||
var terms = opts.terms ? simplified.split(',') : [simplified];
|
||||
terms.forEach(function(term) {
|
||||
//simplify logical grouping
|
||||
while (term !== (term = term.replace(/\(i(%i)*\)/g, 'i')));
|
||||
if (!term.match(/^i(%i)*/)) {
|
||||
throw new Error('Invalid expression: ' + src + " " + term);
|
||||
}
|
||||
});
|
||||
parsed3.src = parsed3.src.replace(VARIABLES, this.parseVar.bind(this));
|
||||
parsed2.src = this.injectEnt(parsed3, 'i');
|
||||
parsed1.src = this.injectEnt(parsed2, '#');
|
||||
return this.injectEnt(parsed1, '@');
|
||||
};
|
||||
|
||||
Parser.prototype.parseVar = function(src) {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var str = args.pop(),
|
||||
index = args.pop();
|
||||
//quote bare object identifiers (might be a reserved word like {while: 1})
|
||||
if (src === 'i' && str.charAt(index + 1) === ':') {
|
||||
return '"i"';
|
||||
}
|
||||
var parts = ['"i"'];
|
||||
src.replace(ACCESSOR, function(part) {
|
||||
if (part === '.i') {
|
||||
parts.push('"i"');
|
||||
} else if (part === '[i]') {
|
||||
parts.push('get("i")');
|
||||
} else {
|
||||
parts.push(part.slice(1, -1));
|
||||
}
|
||||
});
|
||||
return 'get(' + parts.join(',') + ')';
|
||||
};
|
||||
|
||||
//escapes a name to be used as a javascript identifier
|
||||
Parser.prototype.escName = function(str) {
|
||||
return str.replace(/\W/g, function(s) {
|
||||
return '$' + s.charCodeAt(0).toString(16);
|
||||
});
|
||||
};
|
||||
|
||||
Parser.prototype.parseQuoted = function(str) {
|
||||
if (str.charAt(0) === "'") {
|
||||
str = str.slice(1, -1).replace(/\\.|"/, function(s) {
|
||||
if (s === "\\'") return "'";
|
||||
return s.charAt(0) === '\\' ? s : ('\\' + s);
|
||||
});
|
||||
str = '"' + str + '"';
|
||||
}
|
||||
//todo: try/catch or deal with invalid characters (linebreaks, control characters)
|
||||
return JSON.parse(str);
|
||||
};
|
||||
|
||||
|
||||
//the context 'this' inside tagHandlers is the parser instance
|
||||
var tagHandlers = {
|
||||
'if': function(expr) {
|
||||
this.push('if (' + this.parseExpr(expr) + ') {');
|
||||
this.nest.unshift('if');
|
||||
},
|
||||
'else': function() {
|
||||
if (this.nest[0] === 'for') {
|
||||
this.push('}, function() {');
|
||||
} else {
|
||||
this.push('} else {');
|
||||
}
|
||||
},
|
||||
'elseif': function(expr) {
|
||||
this.push('} else if (' + this.parseExpr(expr) + ') {');
|
||||
},
|
||||
'endif': function() {
|
||||
this.nest.shift();
|
||||
this.push('}');
|
||||
},
|
||||
'for': function(str) {
|
||||
var i = str.indexOf(' in ');
|
||||
var name = str.slice(0, i).trim();
|
||||
var expr = str.slice(i + 4).trim();
|
||||
this.push('each(' + this.parseExpr(expr) + ',' + JSON.stringify(name) + ',function() {');
|
||||
this.nest.unshift('for');
|
||||
},
|
||||
'endfor': function() {
|
||||
this.nest.shift();
|
||||
this.push('});');
|
||||
},
|
||||
'raw': function() {
|
||||
this.rawMode = true;
|
||||
},
|
||||
'endraw': function() {
|
||||
this.rawMode = false;
|
||||
},
|
||||
'set': function(stmt) {
|
||||
var i = stmt.indexOf('=');
|
||||
var name = stmt.slice(0, i).trim();
|
||||
var expr = stmt.slice(i + 1).trim();
|
||||
this.push('set(' + JSON.stringify(name) + ',' + this.parseExpr(expr) + ');');
|
||||
},
|
||||
'block': function(name) {
|
||||
if (this.isParent) {
|
||||
++this.parentBlocks;
|
||||
var blockName = 'block_' + (this.escName(name) || this.parentBlocks);
|
||||
this.push('block(typeof ' + blockName + ' == "function" ? ' + blockName + ' : function() {');
|
||||
} else if (this.hasParent) {
|
||||
this.isSilent = false;
|
||||
++this.childBlocks;
|
||||
blockName = 'block_' + (this.escName(name) || this.childBlocks);
|
||||
this.push('function ' + blockName + '() {');
|
||||
}
|
||||
this.nest.unshift('block');
|
||||
},
|
||||
'endblock': function() {
|
||||
this.nest.shift();
|
||||
if (this.isParent) {
|
||||
this.push('});');
|
||||
} else if (this.hasParent) {
|
||||
this.push('}');
|
||||
this.isSilent = true;
|
||||
}
|
||||
},
|
||||
'extends': function(name) {
|
||||
name = this.parseQuoted(name);
|
||||
var parentSrc = this.readTemplateFile(name);
|
||||
this.isParent = true;
|
||||
this.tokenize(parentSrc);
|
||||
this.isParent = false;
|
||||
this.hasParent = true;
|
||||
//silence output until we enter a child block
|
||||
this.isSilent = true;
|
||||
},
|
||||
'include': function(name) {
|
||||
name = this.parseQuoted(name);
|
||||
var incSrc = this.readTemplateFile(name);
|
||||
this.isInclude = true;
|
||||
this.tokenize(incSrc);
|
||||
this.isInclude = false;
|
||||
}
|
||||
};
|
||||
|
||||
//liquid style
|
||||
tagHandlers.assign = tagHandlers.set;
|
||||
//python/django style
|
||||
tagHandlers.elif = tagHandlers.elseif;
|
||||
|
||||
var getRuntime = function runtime(data, opts) {
|
||||
var defaults = {
|
||||
autoEscape: 'toJson'
|
||||
};
|
||||
var _toString = Object.prototype.toString;
|
||||
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var getKeys = Object.keys || function(obj) {
|
||||
var keys = [];
|
||||
for (var n in obj)
|
||||
if (_hasOwnProperty.call(obj, n)) keys.push(n);
|
||||
return keys;
|
||||
};
|
||||
var isArray = Array.isArray || function(obj) {
|
||||
return _toString.call(obj) === '[object Array]';
|
||||
};
|
||||
var create = Object.create || function(obj) {
|
||||
function F() {}
|
||||
|
||||
F.prototype = obj;
|
||||
return new F();
|
||||
};
|
||||
var toString = function(val) {
|
||||
if (val == null) return '';
|
||||
return (typeof val.toString == 'function') ? val.toString() : _toString.call(val);
|
||||
};
|
||||
var extend = function(dest, src) {
|
||||
var keys = getKeys(src);
|
||||
for (var i = 0, len = keys.length; i < len; i++) {
|
||||
var key = keys[i];
|
||||
dest[key] = src[key];
|
||||
}
|
||||
return dest;
|
||||
};
|
||||
//get a value, lexically, starting in current context; a.b -> get("a","b")
|
||||
var get = function() {
|
||||
var val, n = arguments[0],
|
||||
c = stack.length;
|
||||
while (c--) {
|
||||
val = stack[c][n];
|
||||
if (typeof val != 'undefined') break;
|
||||
}
|
||||
for (var i = 1, len = arguments.length; i < len; i++) {
|
||||
if (val == null) continue;
|
||||
n = arguments[i];
|
||||
val = (_hasOwnProperty.call(val, n)) ? val[n] : (typeof val._get == 'function' ? (val[n] = val._get(n)) : null);
|
||||
}
|
||||
return (val == null) ? '' : val;
|
||||
};
|
||||
var set = function(n, val) {
|
||||
stack[stack.length - 1][n] = val;
|
||||
};
|
||||
var push = function(ctx) {
|
||||
stack.push(ctx || {});
|
||||
};
|
||||
var pop = function() {
|
||||
stack.pop();
|
||||
};
|
||||
var write = function(str) {
|
||||
output.push(str);
|
||||
};
|
||||
var filter = function(val) {
|
||||
for (var i = 1, len = arguments.length; i < len; i++) {
|
||||
var arr = arguments[i],
|
||||
name = arr[0],
|
||||
filter = filters[name];
|
||||
if (filter) {
|
||||
arr[0] = val;
|
||||
//now arr looks like [val, arg1, arg2]
|
||||
val = filter.apply(data, arr);
|
||||
} else {
|
||||
throw new Error('Invalid filter: ' + name);
|
||||
}
|
||||
}
|
||||
if (opts.autoEscape && name !== opts.autoEscape && name !== 'safe') {
|
||||
//auto escape if not explicitly safe or already escaped
|
||||
val = filters[opts.autoEscape].call(data, val);
|
||||
}
|
||||
output.push(val);
|
||||
};
|
||||
var each = function(obj, loopvar, fn1, fn2) {
|
||||
if (obj == null) return;
|
||||
var arr = isArray(obj) ? obj : getKeys(obj),
|
||||
len = arr.length;
|
||||
var ctx = {
|
||||
loop: {
|
||||
length: len,
|
||||
first: arr[0],
|
||||
last: arr[len - 1]
|
||||
}
|
||||
};
|
||||
push(ctx);
|
||||
for (var i = 0; i < len; i++) {
|
||||
extend(ctx.loop, {
|
||||
index: i + 1,
|
||||
index0: i
|
||||
});
|
||||
fn1(ctx[loopvar] = arr[i]);
|
||||
}
|
||||
if (len === 0 && fn2) fn2();
|
||||
pop();
|
||||
};
|
||||
var block = function(fn) {
|
||||
push();
|
||||
fn();
|
||||
pop();
|
||||
};
|
||||
var render = function() {
|
||||
return output.join('');
|
||||
};
|
||||
data = data || {};
|
||||
opts = extend(defaults, opts || {});
|
||||
var filters = extend({
|
||||
html: function(val) {
|
||||
return toString(val)
|
||||
.split('&').join('&')
|
||||
.split('<').join('<')
|
||||
.split('>').join('>')
|
||||
.split('"').join('"');
|
||||
},
|
||||
safe: function(val) {
|
||||
return val;
|
||||
},
|
||||
toJson: function(val) {
|
||||
if (typeof val === 'object') {
|
||||
return JSON.stringify(val);
|
||||
}
|
||||
return toString(val);
|
||||
}
|
||||
}, opts.filters || {});
|
||||
var stack = [create(data || {})],
|
||||
output = [];
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
push: push,
|
||||
pop: pop,
|
||||
write: write,
|
||||
filter: filter,
|
||||
each: each,
|
||||
block: block,
|
||||
render: render
|
||||
};
|
||||
};
|
||||
|
||||
var runtime;
|
||||
|
||||
jinja.compile = function(markup, opts) {
|
||||
opts = opts || {};
|
||||
var parser = new Parser();
|
||||
parser.readTemplateFile = this.readTemplateFile;
|
||||
var code = [];
|
||||
code.push('function render($) {');
|
||||
code.push('var get = $.get, set = $.set, push = $.push, pop = $.pop, write = $.write, filter = $.filter, each = $.each, block = $.block;');
|
||||
code.push.apply(code, parser.parse(markup));
|
||||
code.push('return $.render();');
|
||||
code.push('}');
|
||||
code = code.join('\n');
|
||||
if (opts.runtime === false) {
|
||||
var fn = new Function('data', 'options', 'return (' + code + ')(runtime(data, options))');
|
||||
} else {
|
||||
runtime = runtime || (runtime = getRuntime.toString());
|
||||
fn = new Function('data', 'options', 'return (' + code + ')((' + runtime + ')(data, options))');
|
||||
}
|
||||
return {
|
||||
render: fn
|
||||
};
|
||||
};
|
||||
|
||||
jinja.render = function(markup, data, opts) {
|
||||
var tmpl = jinja.compile(markup);
|
||||
return tmpl.render(data, opts);
|
||||
};
|
||||
|
||||
jinja.templateFiles = [];
|
||||
|
||||
jinja.readTemplateFile = function(name) {
|
||||
var templateFiles = this.templateFiles || [];
|
||||
var templateFile = templateFiles[name];
|
||||
if (templateFile == null) {
|
||||
throw new Error('Template file not found: ' + name);
|
||||
}
|
||||
return templateFile;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* Helpers
|
||||
*/
|
||||
|
||||
function trimLeft(str) {
|
||||
return str.replace(LEADING_SPACE, '');
|
||||
}
|
||||
|
||||
function trimRight(str) {
|
||||
return str.replace(TRAILING_SPACE, '');
|
||||
}
|
||||
|
||||
function matchAll(str, reg, fn) {
|
||||
//copy as global
|
||||
reg = new RegExp(reg.source, 'g' + (reg.ignoreCase ? 'i' : '') + (reg.multiline ? 'm' : ''));
|
||||
var match;
|
||||
while ((match = reg.exec(str))) {
|
||||
var result = fn(match[0], match.index, str);
|
||||
if (typeof result == 'number') {
|
||||
reg.lastIndex = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,429 @@
|
|||
if (typeof Object.assign !== 'function') {
|
||||
Object.assign = function() {
|
||||
let target = arguments[0];
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
let source = arguments[i];
|
||||
for (let key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
}
|
||||
|
||||
// 通用免嗅探播放
|
||||
let common_lazy = `js:
|
||||
let html = request(input);
|
||||
let hconf = html.match(/r player_.*?=(.*?)</)[1];
|
||||
let json = JSON5.parse(hconf);
|
||||
let url = json.url;
|
||||
if (json.encrypt == '1') {
|
||||
url = unescape(url);
|
||||
} else if (json.encrypt == '2') {
|
||||
url = unescape(base64Decode(url));
|
||||
}
|
||||
if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {
|
||||
input = {
|
||||
parse: 0,
|
||||
jx: 0,
|
||||
url: url,
|
||||
};
|
||||
} else {
|
||||
input;
|
||||
}`;
|
||||
// 默认嗅探播放
|
||||
|
||||
let def_lazy = `js:
|
||||
input = { parse: 1, url: input, js: '' };`;
|
||||
// 采集站播放
|
||||
|
||||
let cj_lazy = `js:
|
||||
if (/\\.(m3u8|mp4)/.test(input)) {
|
||||
input = { parse: 0, url: input };
|
||||
} else {
|
||||
if (rule.parse_url.startsWith('json:')) {
|
||||
let purl = rule.parse_url.replace('json:', '') + input;
|
||||
let html = request(purl);
|
||||
let json = JSON.parse(html);
|
||||
if (json.url) {
|
||||
input = { parse: 0, url: json.url };
|
||||
}
|
||||
} else {
|
||||
input = rule.parse_url + input;
|
||||
}
|
||||
}`;
|
||||
|
||||
function getMubans() {
|
||||
const mubanDict = { // 模板字典
|
||||
mx: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/vodshow/fyclass--------fypage---/',
|
||||
searchUrl: '/vodsearch/**----------fypage---/',
|
||||
class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: '.cbox_list;*;*;*;*;*',
|
||||
一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h2&&Text;.content_detail:eq(1)&&li&&a:eq(2)&&Text',
|
||||
img: '.vodlist_thumb&&data-original',
|
||||
desc: '.content_detail:eq(1)&&li:eq(1)&&Text;.content_detail:eq(1)&&li&&a&&Text;.content_detail:eq(1)&&li&&a:eq(1)&&Text;.content_detail:eq(1)&&li:eq(2)&&Text;.content_detail:eq(1)&&li:eq(3)&&Text',
|
||||
content: '.content_desc&&span&&Text',
|
||||
tabs: '.play_source_tab&&a',
|
||||
lists: '.content_playlist:eq(#id) li',
|
||||
},
|
||||
搜索: '*',
|
||||
},
|
||||
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(0):lt(10);a&&Text;a&&href;/(\\d+)',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.module-info-tag-link:eq(-1)&&Text',
|
||||
img: '.lazyload&&data-original||data-src||src',
|
||||
desc: '.module-info-item:eq(-2)&&Text;.module-info-tag-link&&Text;.module-info-tag-link:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(1)&&Text',
|
||||
content: '.module-info-introduction&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-play-list:eq(#id) a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '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: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||
一级: '.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(3)&&Text;.tag-link:eq(2)&&Text;.tag-link:eq(1)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(0)&&Text',
|
||||
content: '.vod_content&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-player-list:eq(#id)&&.scroll-content&&a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '.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(7);a&&Text;a&&href;/(\\d+).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.myui-content__detail .title--span&&Text;.myui-content__detail p.data:eq(3)&&Text',
|
||||
img: '.myui-content__thumb .lazyload&&data-original',
|
||||
desc: '.myui-content__detail p.otherbox&&Text;.year&&Text;.myui-content__detail p.data:eq(4)&&Text;.myui-content__detail p.data:eq(2)&&Text;.myui-content__detail p.data:eq(0)&&Text',
|
||||
content: '.content&&Text',
|
||||
tabs: '.myui-panel__head&&li',
|
||||
// tabs: '.nav-tabs&&li',
|
||||
lists: '.myui-content__list:eq(#id) li',
|
||||
},
|
||||
搜索: '#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&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;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.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)&&a&&Text',
|
||||
title1: '.stui-content__detail .title&&Text;.stui-content__detail&&p&&Text',
|
||||
img: '.stui-content__thumb .lazyload&&data-original',
|
||||
desc: '.stui-content__detail p&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(2)&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text;.stui-content__detail p:eq(1)&&Text',
|
||||
desc1: '.stui-content__detail p:eq(4)&&Text;;;.stui-content__detail p:eq(1)&&Text',
|
||||
content: '.detail&&Text',
|
||||
tabs: '.stui-pannel__head h3',
|
||||
tabs1: '.stui-vodlist__head h3',
|
||||
lists: '.stui-content__playlist:eq(#id) li',
|
||||
},
|
||||
搜索: 'ul.stui-vodlist__media,ul.stui-vodlist,#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||
},
|
||||
默认: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '',
|
||||
searchUrl: '',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
filter: '',
|
||||
filter_url: '',
|
||||
filter_def: {},
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: '#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||
cate_exclude: '',
|
||||
play_parse: true,
|
||||
lazy: def_lazy,
|
||||
double: true,
|
||||
推荐: '列表1;列表2;标题;图片;描述;链接;详情',
|
||||
一级: '列表;标题;图片;描述;链接;详情',
|
||||
二级: {
|
||||
title: 'vod_name;vod_type',
|
||||
img: '图片链接',
|
||||
desc: '主要信息;年代;地区;演员;导演',
|
||||
content: '简介',
|
||||
tabs: '',
|
||||
lists: 'xx:eq(#id)&&a',
|
||||
tab_text: 'body&&Text',
|
||||
list_text: 'body&&Text',
|
||||
list_url: 'a&&href',
|
||||
},
|
||||
搜索: '列表;标题;图片;描述;链接;详情',
|
||||
},
|
||||
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;a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||
一级: '.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: common_lazy,
|
||||
double: true,
|
||||
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.hl-dc-title&&Text;.hl-dc-content&&li:eq(6)&&Text',
|
||||
img: '.hl-lazy&&data-original',
|
||||
desc: '.hl-dc-content&&li:eq(10)&&Text;.hl-dc-content&&li:eq(4)&&Text;.hl-dc-content&&li:eq(5)&&Text;.hl-dc-content&&li:eq(2)&&Text;.hl-dc-content&&li:eq(3)&&Text',
|
||||
content: '.hl-content-text&&Text',
|
||||
tabs: '.hl-tabs&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
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: common_lazy,
|
||||
double: true,
|
||||
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
||||
一级: '.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: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||
一级: '.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=**&limit=50',
|
||||
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',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
推荐: '.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(2)--strong&&Text',
|
||||
img: '.detail-pic&&data-original',
|
||||
desc: '.slide-info-remarks&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(1)--strong&&Text;.info-parameter&&ul&&li:eq(3)&&Text',
|
||||
content: '#height_limit&&Text',
|
||||
tabs: '.anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
lists: '.anthology-list-box:eq(#id) li',
|
||||
},
|
||||
搜索: 'json:list;name;pic;;id',
|
||||
},
|
||||
采集1: {
|
||||
title: '',
|
||||
host: '',
|
||||
homeTid: '13',
|
||||
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||
detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
|
||||
searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
|
||||
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyclass',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA'
|
||||
},
|
||||
timeout: 5000, // class_name: '电影&电视剧&综艺&动漫',
|
||||
// class_url: '1&2&3&4',
|
||||
// class_parse:'js:let html=request(input);input=JSON.parse(html).class;',
|
||||
class_parse: 'json:class;',
|
||||
limit: 20,
|
||||
multi: 1,
|
||||
searchable: 2, //是否启用全局搜索,
|
||||
quickSearch: 1, //是否启用快速搜索,
|
||||
filterable: 0, //是否启用分类筛选,
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: cj_lazy,
|
||||
推荐: '*',
|
||||
一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
||||
二级: `js:
|
||||
let html=request(input);
|
||||
html=JSON.parse(html);
|
||||
let data=html.list;
|
||||
VOD=data[0];`,
|
||||
搜索: '*',
|
||||
},
|
||||
};
|
||||
return JSON.parse(JSON.stringify(mubanDict));
|
||||
}
|
||||
|
||||
var mubanDict = getMubans();
|
||||
var muban = getMubans();
|
||||
export default {
|
||||
muban,
|
||||
getMubans
|
||||
};
|
|
@ -0,0 +1,36 @@
|
|||
var rule = {
|
||||
title:'武享吧',
|
||||
host:'https://www.hula8.net',
|
||||
url: '/fyclass/page/fypage',
|
||||
searchUrl: '/page/fypage/?s=**',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
headers:{
|
||||
'User-Agent': 'PC_UA',
|
||||
'Referer': 'https://www.hula8.net/',
|
||||
'Cookie':'esc_search_captcha=1;result=12'
|
||||
},
|
||||
timeout:5000,//网站的全局请求超时,默认是3000毫秒
|
||||
class_parse: '#menu-xinjian&&li;a&&Text;a&&href;net/(.*)',
|
||||
play_parse:true,
|
||||
cate_exclude:'首 页|赛事预告|美国格斗赛|亚洲格斗赛|其他格斗赛|日本搏击赛|裸拳赛',
|
||||
limit:6,
|
||||
推荐: 'div.apc-grid-item;*;*;.views&&Text;a&&href',
|
||||
一级: '.site-main&&article;img&&alt;img&&data-original;.grid-inf-l&&Text;a&&href',
|
||||
二级: {
|
||||
"title": "h1&&Text;.module-info-tag&&Text",
|
||||
"img": ".aligncenter&&data-original",
|
||||
"desc": ";;;.views:eq(0)&&Text;",
|
||||
"content": "h1&&Text",
|
||||
"tabs": "js:TABS=['道长在线']",
|
||||
"lists": `js:
|
||||
var html = JSON.parse(request(input).match(/var bevideo_vids_.*?=({[\\s\\S]*?});/)[1]);
|
||||
let list = [];
|
||||
list = html.m3u8dplayer.map(function(item) {
|
||||
return item.pre + "$" + item.video
|
||||
});
|
||||
LISTS = [list];
|
||||
`
|
||||
},
|
||||
搜索: '*;*;*;.entry-meta&&Text;*',
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"author": "率性而活",
|
||||
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; OPPO R11t Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 8.1.0)",
|
||||
"homeUrl": "https://m.live.qq.com/directory/game/Basketball",
|
||||
"cateManual": {
|
||||
"篮球": "directory/game/Basketball",
|
||||
"足球": "directory/game/Football",
|
||||
"搏击": "directory/game/Fight",
|
||||
"网球/排球": "directory/game/Tennis",
|
||||
"台球": "directory/game/Billiards",
|
||||
"棒球/橄榄球/冰球": "directory/game/MLB",
|
||||
"NBA": "directory/game/NBA",
|
||||
"CBA": "directory/game/CBA",
|
||||
"综合": "directory/game/Billiards"
|
||||
},
|
||||
"homeVodNode": "//a[contains(@href,'/10')]",
|
||||
"homeVodName": "/div/following-sibling::p[1]/text()",
|
||||
"homeVodId": "/@href",
|
||||
"homeVodIdR": "/(\\S+)",
|
||||
"homeVodImg": "//div[contains(@style,'http')]/@style",
|
||||
"homeVodImgR": "(http.*?jpg)",
|
||||
"homeVodMark": "",
|
||||
"cateUrl": "https://m.live.qq.com/{cateId}",
|
||||
"cateVodNode": "//a[contains(@href,'/10')]",
|
||||
"cateVodName": "/div/following-sibling::p[1]/text()",
|
||||
"cateVodId": "/@href",
|
||||
"cateVodIdR": "/(\\S+)",
|
||||
"cateVodImg": "//div[contains(@style,'http')]/@style",
|
||||
"cateVodImgR": "(http.*?jpg)",
|
||||
"cateVodMark": "",
|
||||
"dtUrl": "https://m.live.qq.com/{vid}",
|
||||
"dtNode": "//body",
|
||||
"dtName": "//p[contains(@class,'p-title')]/text()",
|
||||
"dtNameR": "(“.*?”)",
|
||||
"dtImg": "//div[contains(@class,'share-bar')]/@data-pic",
|
||||
"dtImgR": "",
|
||||
"dtCate": "",
|
||||
"dtCateR": "",
|
||||
"dtYear": "",
|
||||
"dtYearR": "",
|
||||
"dtArea": "",
|
||||
"dtAreaR": "",
|
||||
"dtDirector": "",
|
||||
"dtDirectorR": "",
|
||||
"dtActor": "",
|
||||
"dtActorR": "",
|
||||
"dtDesc": "",
|
||||
"dtDescR": "",
|
||||
"dtFromNode": "//p[contains(@class,'p-title')]",
|
||||
"dtFromName": "/text()",
|
||||
"dtFromNameR": "(\\企鹅体育)",
|
||||
"dtUrlNode": "//div[contains(@class,'wenzi')]",
|
||||
"dtUrlSubNode": "/a",
|
||||
"dtUrlId": "/text()",
|
||||
"dtUrlIdR": "m.live.qq.com/(\\S+)",
|
||||
"dtUrlName": "/text()",
|
||||
"dtUrlNameR": "(\\d+)",
|
||||
"playUrl": "https://m.live.qq.com/{playUrl}",
|
||||
"playUa": "{\"User-Agent\":\"okhttp/3.12.11\"}"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,40 @@
|
|||
var rule={
|
||||
title: '56动漫',
|
||||
host: 'https://www.56dm.cc/',
|
||||
url: 'https://www.56dm.cc/type/fyclass-fypage.html',
|
||||
searchUrl: 'https://www.56dm.cc/search/**----------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: '.snui-header-menu-nav li:gt(0):lt(6);a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: `js:
|
||||
if(/\\.(m3u8|mp4)/.test(input)){
|
||||
input = {parse:0,url:input}
|
||||
}else{
|
||||
if(rule.parse_url.startsWith('json:')){
|
||||
let purl = rule.parse_url.replace('json:','')+input;
|
||||
let html = request(purl);
|
||||
input = {parse:0,url:JSON.parse(html).url}
|
||||
}else{
|
||||
input= rule.parse_url+input;
|
||||
}
|
||||
}
|
||||
`,
|
||||
limit: 6,
|
||||
推荐: '.cCBf_FAAEfbc;li;a&&title;.lazyload&&data-original;.dAD_BBCI&&Text;a&&href',
|
||||
double: true, // 推荐内容是否双层定位
|
||||
一级: '.cCBf_FAAEfbc li;a&&title;a&&data-original;.dAD_BBCI&&Text;a&&href',
|
||||
二级: {
|
||||
"title": "h1&&Text",
|
||||
"img": ".stui-content__thumb .lazyload&&data-original",
|
||||
"desc": ".cCBf_DABCcac__hcIdeE p:eq(0)&&Text;.cCBf_DABCcac__hcIdeE p:eq(1)&&Text;.cCBf_DABCcac__hcIdeE p:eq(2)&&Text;.cCBf_DABCcac__hcIdeE p:eq(3)&&Text;.cCBf_DABCcac__hcIdeE p:eq(4)&&Text",
|
||||
"content": ".detail&&Text",
|
||||
"tabs": ".channel-tab li",
|
||||
"lists": ".play-list-content:eq(#id) li"
|
||||
},
|
||||
搜索: '.cCBf_FAAEfbc__dbD;a&&title;.lazyload&&data-original;.dAD_BBCI&&Text;a&&href;.cCBf_FAAEfbc__hcIdeE&&p:eq(0) p&&Text',
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
muban.vfed.二级.title = 'h1&&Text;.fed-col-md3:eq(0)&&Text';
|
||||
muban.vfed.二级.desc = '.fed-col-md3:eq(3)&&Text;;;.fed-col-md6--span:eq(0)&&Text;.fed-col-md6--span:eq(1)&&Text';
|
||||
muban.vfed.二级.tabs = '.nav-tabs&&li';
|
||||
muban.vfed.二级.lists = '.myui-content__list:eq(#id)&&li';
|
||||
var rule = {
|
||||
title: '58动漫[漫]',
|
||||
模板: 'vfed',
|
||||
host: 'http://www.ting38.com',
|
||||
url: '/search.php?page=fypage&searchtype=5&tid=fyclassfyfilter',
|
||||
class_parse: '.fed-pops-navbar&&li;a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: "js:var html=JSON.parse(request(input).match(/r player_.*?=(.*?)</)[1]);var url=html.url;if(html.encrypt=='1'){url=unescape(url)}else if(html.encrypt=='2'){url=unescape(base64Decode(url))}if(/m3u8|mp4/.test(url)){input=url}else{input}",
|
||||
limit: 6,
|
||||
filterable: 1,//是否启用分类筛选,
|
||||
filter_url: '&order={{fl.by}}&area={{fl.area}}&year={{fl.year}}',
|
||||
filter: 'H4sIAAAAAAAAA+2TzUrDQBSF32XWWWTSX/sq0kXUAYsmhVCFULKSutJURAzFghu1EQoGLMWmtE+TjOYtzM9k7gU37pPdnO/MvTN3DjMmlPQOx+SM2aRHbKZbRCGmbrBUxZtVtN2l+lI/v2D5NjPDEz+58jOcCuIoBdVUrSFYvkRcA65hToFTzFXgKuL0QPJ0iXgXeBfzDvAO5m3gbcxbwFuYN4E3MYd5KZ6XwrwU5jWGFhM8Xzr9zCme/ciGR+fufRxO/zw699aJtxINRoN0a9k4CkMePAjndDCSBnf9n9s7YRwPDYOZJ9mxfYVodeaVy7xRZ165zJsoc91iOsp8HsQ34T8zj18WyexaUCFKL3mb8a8P4Qkh66YB3+zLukLIW3uvfL4UnhCy5/N7/LQrexZC1i0X33u3rCuE9D4DqBNC3mWyjraP5V0KgbOpv0QVvoTzCxTHT5vwCAAA',
|
||||
filter_def: {
|
||||
1: {cateId: '1'},
|
||||
2: {cateId: '2'},
|
||||
3: {cateId: '3'},
|
||||
4: {cateId: '4'}
|
||||
},
|
||||
searchUrl: '/search.php?page=fypage&searchword=**&searchtype=',
|
||||
搜索: '.fed-list-item;a&&title;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
// 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
|
||||
// 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
|
||||
// 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
|
||||
// 3个set-Cookie
|
||||
|
||||
var rule = {
|
||||
title:'Anime1动畫',
|
||||
host:'https://anime1.me',
|
||||
url: '/fyclass',
|
||||
detailUrl:'/?cat=fyid',
|
||||
searchUrl: '/page/fypage?s=**',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
headers:{'User-Agent': 'PC_UA'},
|
||||
timeout:5000,
|
||||
class_name:'連載中&2024&2023&2022&2021&2020&2019&2018&更早',
|
||||
class_url:'連載中&2024&2023&2022&2021&2020&2019&2018&2017',
|
||||
play_parse:true,
|
||||
lazy:`js:
|
||||
var apiurl = 'https://v.anime1.me/api';
|
||||
var html = request(apiurl, {
|
||||
headers: {
|
||||
'Referer': HOST,
|
||||
},
|
||||
body: 'd=' + input,
|
||||
method: 'POST',
|
||||
withHeaders: true
|
||||
});
|
||||
let json = JSON.parse(html);
|
||||
print(json);
|
||||
log(Object.keys(json));
|
||||
let setCk = Object.keys(json).filter(it => it.toLowerCase() === "set-cookie");
|
||||
let cookie = setCk ? json[setCk] : "";
|
||||
// 3个set-Cookie
|
||||
if (Array.isArray(cookie)) {
|
||||
cookie = cookie.join(';');
|
||||
}
|
||||
cookie = cookie.split(';').filter(function(it) {
|
||||
return ['e', 'p', 'h'].includes(it.split('=')[0])
|
||||
}).join(';');
|
||||
log(cookie);
|
||||
var purl = JSON.parse(json.body).s[0].src;
|
||||
if (purl.startsWith('/')) {
|
||||
purl = 'https:' + purl
|
||||
}
|
||||
input = {
|
||||
jx: 0,
|
||||
url: purl,
|
||||
parse: 0,
|
||||
header: JSON.stringify({
|
||||
'referer': HOST,
|
||||
'Cookie': cookie,
|
||||
'user-agent': PC_UA
|
||||
}),
|
||||
}
|
||||
`,
|
||||
limit:6,
|
||||
推荐: `js:
|
||||
var d = [];
|
||||
function stripHtmlTag(src) {
|
||||
return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
|
||||
}
|
||||
var timestamp = new Date().getTime();
|
||||
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
|
||||
var list = JSON.parse(json);
|
||||
let playKeys = Object.values(list).filter(function(x) {
|
||||
return x[2].includes('連載中');
|
||||
});
|
||||
playKeys.forEach(function(it) {
|
||||
d.push({
|
||||
title: stripHtmlTag(it[1]),
|
||||
img: 'https://sta.anicdn.com/playerImg/8.jpg',
|
||||
desc: it[2],
|
||||
url: it[0],
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
`,
|
||||
一级: `js:
|
||||
var d = [];
|
||||
function stripHtmlTag(src) {
|
||||
return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
|
||||
}
|
||||
var timestamp = new Date().getTime();
|
||||
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
|
||||
var list = JSON.parse(json);
|
||||
let playKeys = Object.values(list).filter(function(x) {
|
||||
if (MY_CATE === '連載中') return x[2].includes(MY_CATE);
|
||||
else if (MY_CATE === '2017') return x[3] <= MY_CATE;
|
||||
else return x[3] == MY_CATE;
|
||||
});
|
||||
playKeys.forEach(function(it) {
|
||||
d.push({
|
||||
title: stripHtmlTag(it[1]),
|
||||
img: 'https://sta.anicdn.com/playerImg/8.jpg',
|
||||
desc: it[2],
|
||||
url: it[0],
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
`,
|
||||
二级: `js:
|
||||
pdfh = jsp.pdfh; pdfa = jsp.pdfa; pd = jsp.pd;
|
||||
var html = request(input);
|
||||
var timestamp = new Date().getTime();
|
||||
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
|
||||
var list = JSON.parse(json);
|
||||
var vid = input.split('=')[1];
|
||||
let playKeys = Object.values(list).find(function(x) {
|
||||
return x[0] === parseInt(vid);
|
||||
});
|
||||
VOD = {
|
||||
vod_pic: 'https://sta.anicdn.com/playerImg/8.jpg',
|
||||
vod_id: playKeys[0],
|
||||
vod_name: playKeys[1],
|
||||
vod_content: playKeys[2],
|
||||
vod_year: playKeys[3],
|
||||
type_name: playKeys[4],
|
||||
vod_actor: playKeys[5],
|
||||
};
|
||||
var pageurl = pd(html, '.cat-links&&a&&href');
|
||||
var pagenum = 1;
|
||||
let vod_tab_list = [];
|
||||
let vlist = [];
|
||||
for (let p = 1; p < parseInt(pagenum) + 1; p++) {
|
||||
let phtml = request(pageurl + '/page/' + pagenum);
|
||||
let new_vod_list = [];
|
||||
let vodList = [];
|
||||
vodList = pdfa(phtml, '.site-main&&article');
|
||||
for (let i = 0; i < vodList.length; i++) {
|
||||
let it = vodList[i];
|
||||
let ptitle = pdfh(it, '.entry-title&&Text').replace(/\\[(.*)\\]/, '$1');
|
||||
let purl = pd(it, '.video-js&&data-apireq');
|
||||
new_vod_list.push(ptitle + '$' + purl);
|
||||
}
|
||||
vlist = vlist.concat(new_vod_list);
|
||||
try {
|
||||
pagenum = pd(phtml, '.nav-previous&&a&&href').split('/page/')[1];
|
||||
} catch(e) {}
|
||||
}
|
||||
let vlist2 = vlist.reverse().join("#");
|
||||
vod_tab_list.push(vlist2);
|
||||
VOD.vod_play_from = '道长在线';
|
||||
VOD.vod_play_url = vod_tab_list.join("$$$");
|
||||
`,
|
||||
搜索: `js:
|
||||
var d = [];
|
||||
function stripHtmlTag(src) {
|
||||
return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
|
||||
}
|
||||
var timestamp = new Date().getTime();
|
||||
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
|
||||
var list = JSON.parse(json);
|
||||
var wd = input.split('=')[1];
|
||||
let playKeys = Object.values(list).filter(function(x) {
|
||||
return x[1].includes(wd);
|
||||
});
|
||||
log(playKeys);
|
||||
playKeys.forEach(function(it) {
|
||||
d.push({
|
||||
title: stripHtmlTag(it[1]),
|
||||
img: 'https://sta.anicdn.com/playerImg/8.jpg',
|
||||
desc: it[2],
|
||||
url: it[0],
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
`,
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// http://www.ntdm.tv
|
||||
var rule={
|
||||
title:'NT动漫',
|
||||
host:'http://www.ntdm8.com',
|
||||
homeUrl:'/type/riben.html',
|
||||
// url:'/show/fyclass--------fypage---.html',
|
||||
url:'/show/fyclassfyfilter.html',
|
||||
filterable:1,//是否启用分类筛选,
|
||||
filter_url:'--{{fl.by}}-{{fl.class}}--{{fl.letter}}---fypage---{{fl.year}}',
|
||||
filter:{
|
||||
"riben":[{"key":"year","name":"年份:","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"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":"class","name":"类型:","value":[{"n":"全部","v":""},{"n":"搞笑","v":"搞笑"},{"n":"运动","v":"运动"},{"n":"励志","v":"励志"},{"n":"热血","v":"热血"},{"n":"战斗","v":"战斗"},{"n":"竞技","v":"竞技"},{"n":"校园","v":"校园"},{"n":"青春","v":"青春"},{"n":"爱情","v":"爱情"},{"n":"冒险","v":"冒险"},{"n":"后宫","v":"后宫"},{"n":"百合","v":"百合"},{"n":"治愈","v":"治愈"},{"n":"萝莉","v":"萝莉"},{"n":"魔法","v":"魔法"},{"n":"悬疑","v":"悬疑"},{"n":"推理","v":"推理"},{"n":"奇幻","v":"奇幻"},{"n":"科幻","v":"科幻"},{"n":"游戏","v":"游戏"},{"n":"神魔","v":"神魔"},{"n":"恐怖","v":"恐怖"},{"n":"血腥","v":"血腥"},{"n":"机战","v":"机战"},{"n":"战争","v":"战争"},{"n":"犯罪","v":"犯罪"},{"n":"历史","v":"历史"},{"n":"社会","v":"社会"},{"n":"职场","v":"职场"},{"n":"剧情","v":"剧情"},{"n":"伪娘","v":"伪娘"},{"n":"耽美","v":"耽美"},{"n":"童年","v":"童年"},{"n":"教育","v":"教育"},{"n":"亲子","v":"亲子"},{"n":"真人","v":"真人"},{"n":"歌舞","v":"歌舞"},{"n":"肉番","v":"肉番"},{"n":"美少女","v":"美少女"},{"n":"轻小说","v":"轻小说"},{"n":"吸血鬼","v":"吸血鬼"},{"n":"女性向","v":"女性向"},{"n":"泡面番","v":"泡面番"},{"n":"欢乐向","v":"欢乐向"}]},{"key":"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"},{"n":"0~9","v":"0~9"}]},{"key":"by","name":"排序:","value":[{"n":"更新时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||
"zhongguo":[{"key":"year","name":"年份:","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"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":"class","name":"类型:","value":[{"n":"全部","v":""},{"n":"搞笑","v":"搞笑"},{"n":"运动","v":"运动"},{"n":"励志","v":"励志"},{"n":"热血","v":"热血"},{"n":"战斗","v":"战斗"},{"n":"竞技","v":"竞技"},{"n":"校园","v":"校园"},{"n":"青春","v":"青春"},{"n":"爱情","v":"爱情"},{"n":"冒险","v":"冒险"},{"n":"后宫","v":"后宫"},{"n":"百合","v":"百合"},{"n":"治愈","v":"治愈"},{"n":"萝莉","v":"萝莉"},{"n":"魔法","v":"魔法"},{"n":"悬疑","v":"悬疑"},{"n":"推理","v":"推理"},{"n":"奇幻","v":"奇幻"},{"n":"科幻","v":"科幻"},{"n":"游戏","v":"游戏"},{"n":"神魔","v":"神魔"},{"n":"恐怖","v":"恐怖"},{"n":"血腥","v":"血腥"},{"n":"机战","v":"机战"},{"n":"战争","v":"战争"},{"n":"犯罪","v":"犯罪"},{"n":"历史","v":"历史"},{"n":"社会","v":"社会"},{"n":"职场","v":"职场"},{"n":"剧情","v":"剧情"},{"n":"伪娘","v":"伪娘"},{"n":"耽美","v":"耽美"},{"n":"童年","v":"童年"},{"n":"教育","v":"教育"},{"n":"亲子","v":"亲子"},{"n":"真人","v":"真人"},{"n":"歌舞","v":"歌舞"},{"n":"肉番","v":"肉番"},{"n":"美少女","v":"美少女"},{"n":"轻小说","v":"轻小说"},{"n":"吸血鬼","v":"吸血鬼"},{"n":"女性向","v":"女性向"},{"n":"泡面番","v":"泡面番"},{"n":"欢乐向","v":"欢乐向"}]},{"key":"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"},{"n":"0~9","v":"0~9"}]},{"key":"by","name":"排序:","value":[{"n":"更新时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||
"omei":[{"key":"year","name":"年份:","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"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":"class","name":"类型:","value":[{"n":"全部","v":""},{"n":"搞笑","v":"搞笑"},{"n":"运动","v":"运动"},{"n":"励志","v":"励志"},{"n":"热血","v":"热血"},{"n":"战斗","v":"战斗"},{"n":"竞技","v":"竞技"},{"n":"校园","v":"校园"},{"n":"青春","v":"青春"},{"n":"爱情","v":"爱情"},{"n":"冒险","v":"冒险"},{"n":"后宫","v":"后宫"},{"n":"百合","v":"百合"},{"n":"治愈","v":"治愈"},{"n":"萝莉","v":"萝莉"},{"n":"魔法","v":"魔法"},{"n":"悬疑","v":"悬疑"},{"n":"推理","v":"推理"},{"n":"奇幻","v":"奇幻"},{"n":"科幻","v":"科幻"},{"n":"游戏","v":"游戏"},{"n":"神魔","v":"神魔"},{"n":"恐怖","v":"恐怖"},{"n":"血腥","v":"血腥"},{"n":"机战","v":"机战"},{"n":"战争","v":"战争"},{"n":"犯罪","v":"犯罪"},{"n":"历史","v":"历史"},{"n":"社会","v":"社会"},{"n":"职场","v":"职场"},{"n":"剧情","v":"剧情"},{"n":"伪娘","v":"伪娘"},{"n":"耽美","v":"耽美"},{"n":"童年","v":"童年"},{"n":"教育","v":"教育"},{"n":"亲子","v":"亲子"},{"n":"真人","v":"真人"},{"n":"歌舞","v":"歌舞"},{"n":"肉番","v":"肉番"},{"n":"美少女","v":"美少女"},{"n":"轻小说","v":"轻小说"},{"n":"吸血鬼","v":"吸血鬼"},{"n":"女性向","v":"女性向"},{"n":"泡面番","v":"泡面番"},{"n":"欢乐向","v":"欢乐向"}]},{"key":"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"},{"n":"0~9","v":"0~9"}]},{"key":"by","name":"排序:","value":[{"n":"更新时间","v":"time"},{"n":"人气","v":"hits"},{"n":"评分","v":"score"}]}]
|
||||
},
|
||||
searchUrl:'/search/**----------fypage---.html',
|
||||
searchable:2,//是否启用全局搜索,
|
||||
quickSearch:0,//是否启用快速搜索,
|
||||
headers:{//网站的请求头,完整支持所有的,常带ua和cookies
|
||||
'User-Agent':'MOBILE_UA',
|
||||
},
|
||||
class_parse: '.search-tag li;a&&Text;a&&href;.*/(\\w+).html',
|
||||
play_parse:true,
|
||||
detailUrl:'',
|
||||
lazy:"",
|
||||
limit:6,
|
||||
推荐:'*',
|
||||
一级:'.blockcontent1&&.blockdif2;img&&alt;img&&src;.newname&&Text;a&&href',
|
||||
二级访问前:'',
|
||||
二级:{
|
||||
"title":"h4&&Text;.detail_imform_value:eq(6)&&Text",
|
||||
"img":".poster&&src",
|
||||
"desc":".detail_imform_kv:eq(0)&&Text;.detail_imform_value:eq(5)&&Text;.detail_imform_value:eq(2)&&Text;.detail_imform_kv:eq(0)&&Text;.detail_imform_kv:eq(3)&&Text",
|
||||
"content":".detail_imform_desc_pre&&Text",
|
||||
"tabs":"#menu0&&li",
|
||||
"lists":".movurl:eq(#id)&&li"},
|
||||
搜索:'*',
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
muban.短视2.二级.img = '.detail-pic&&img&&data-src';
|
||||
var rule = {
|
||||
title: 'NyaFun',
|
||||
模板:'短视2',
|
||||
host: 'https://www.nyafun.net',
|
||||
homeUrl:'/map.html',
|
||||
url: '/index.php/api/vod#type=fyclass&page=fypage',
|
||||
class_name:'番剧&剧场',
|
||||
class_url:'2&1',
|
||||
detailUrl:'/bangumi/fyid.html',
|
||||
推荐:'.border-box .public-list-box;a&&title;.lazy&&data-src;.public-list-prb&&Text;a&&href',
|
||||
double: false, // 推荐内容是否双层定位
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,607 @@
|
|||
/*!
|
||||
* Jinja Templating for JavaScript v0.1.8
|
||||
* https://github.com/sstur/jinja-js
|
||||
*
|
||||
* This is a slimmed-down Jinja2 implementation [http://jinja.pocoo.org/]
|
||||
*
|
||||
* In the interest of simplicity, it deviates from Jinja2 as follows:
|
||||
* - Line statements, cycle, super, macro tags and block nesting are not implemented
|
||||
* - auto escapes html by default (the filter is "html" not "e")
|
||||
* - Only "html" and "safe" filters are built in
|
||||
* - Filters are not valid in expressions; `foo|length > 1` is not valid
|
||||
* - Expression Tests (`if num is odd`) not implemented (`is` translates to `==` and `isnot` to `!=`)
|
||||
*
|
||||
* Notes:
|
||||
* - if property is not found, but method '_get' exists, it will be called with the property name (and cached)
|
||||
* - `{% for n in obj %}` iterates the object's keys; get the value with `{% for n in obj %}{{ obj[n] }}{% endfor %}`
|
||||
* - subscript notation `a[0]` takes literals or simple variables but not `a[item.key]`
|
||||
* - `.2` is not a valid number literal; use `0.2`
|
||||
*
|
||||
*/
|
||||
/*global require, exports, module, define */
|
||||
|
||||
(function(global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jinja = {}));
|
||||
})(this, (function(jinja) {
|
||||
"use strict";
|
||||
var STRINGS = /'(\\.|[^'])*'|"(\\.|[^"'"])*"/g;
|
||||
var IDENTS_AND_NUMS = /([$_a-z][$\w]*)|([+-]?\d+(\.\d+)?)/g;
|
||||
var NUMBER = /^[+-]?\d+(\.\d+)?$/;
|
||||
//non-primitive literals (array and object literals)
|
||||
var NON_PRIMITIVES = /\[[@#~](,[@#~])*\]|\[\]|\{([@i]:[@#~])(,[@i]:[@#~])*\}|\{\}/g;
|
||||
//bare identifiers such as variables and in object literals: {foo: 'value'}
|
||||
var IDENTIFIERS = /[$_a-z][$\w]*/ig;
|
||||
var VARIABLES = /i(\.i|\[[@#i]\])*/g;
|
||||
var ACCESSOR = /(\.i|\[[@#i]\])/g;
|
||||
var OPERATORS = /(===?|!==?|>=?|<=?|&&|\|\||[+\-\*\/%])/g;
|
||||
//extended (english) operators
|
||||
var EOPS = /(^|[^$\w])(and|or|not|is|isnot)([^$\w]|$)/g;
|
||||
var LEADING_SPACE = /^\s+/;
|
||||
var TRAILING_SPACE = /\s+$/;
|
||||
|
||||
var START_TOKEN = /\{\{\{|\{\{|\{%|\{#/;
|
||||
var TAGS = {
|
||||
'{{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}\}/,
|
||||
'{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}/,
|
||||
'{%': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?%\}/,
|
||||
'{#': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?#\}/
|
||||
};
|
||||
|
||||
var delimeters = {
|
||||
'{%': 'directive',
|
||||
'{{': 'output',
|
||||
'{#': 'comment'
|
||||
};
|
||||
|
||||
var operators = {
|
||||
and: '&&',
|
||||
or: '||',
|
||||
not: '!',
|
||||
is: '==',
|
||||
isnot: '!='
|
||||
};
|
||||
|
||||
var constants = {
|
||||
'true': true,
|
||||
'false': false,
|
||||
'null': null
|
||||
};
|
||||
|
||||
function Parser() {
|
||||
this.nest = [];
|
||||
this.compiled = [];
|
||||
this.childBlocks = 0;
|
||||
this.parentBlocks = 0;
|
||||
this.isSilent = false;
|
||||
}
|
||||
|
||||
Parser.prototype.push = function(line) {
|
||||
if (!this.isSilent) {
|
||||
this.compiled.push(line);
|
||||
}
|
||||
};
|
||||
|
||||
Parser.prototype.parse = function(src) {
|
||||
this.tokenize(src);
|
||||
return this.compiled;
|
||||
};
|
||||
|
||||
Parser.prototype.tokenize = function(src) {
|
||||
var lastEnd = 0,
|
||||
parser = this,
|
||||
trimLeading = false;
|
||||
matchAll(src, START_TOKEN, function(open, index, src) {
|
||||
//here we match the rest of the src against a regex for this tag
|
||||
var match = src.slice(index + open.length).match(TAGS[open]);
|
||||
match = (match ? match[0] : '');
|
||||
//here we sub out strings so we don't get false matches
|
||||
var simplified = match.replace(STRINGS, '@');
|
||||
//if we don't have a close tag or there is a nested open tag
|
||||
if (!match || ~simplified.indexOf(open)) {
|
||||
return index + 1;
|
||||
}
|
||||
var inner = match.slice(0, 0 - open.length);
|
||||
//check for white-space collapse syntax
|
||||
if (inner.charAt(0) === '-') var wsCollapseLeft = true;
|
||||
if (inner.slice(-1) === '-') var wsCollapseRight = true;
|
||||
inner = inner.replace(/^-|-$/g, '').trim();
|
||||
//if we're in raw mode and we are not looking at an "endraw" tag, move along
|
||||
if (parser.rawMode && (open + inner) !== '{%endraw') {
|
||||
return index + 1;
|
||||
}
|
||||
var text = src.slice(lastEnd, index);
|
||||
lastEnd = index + open.length + match.length;
|
||||
if (trimLeading) text = trimLeft(text);
|
||||
if (wsCollapseLeft) text = trimRight(text);
|
||||
if (wsCollapseRight) trimLeading = true;
|
||||
if (open === '{{{') {
|
||||
//liquid-style: make {{{x}}} => {{x|safe}}
|
||||
open = '{{';
|
||||
inner += '|safe';
|
||||
}
|
||||
parser.textHandler(text);
|
||||
parser.tokenHandler(open, inner);
|
||||
});
|
||||
var text = src.slice(lastEnd);
|
||||
if (trimLeading) text = trimLeft(text);
|
||||
this.textHandler(text);
|
||||
};
|
||||
|
||||
Parser.prototype.textHandler = function(text) {
|
||||
this.push('write(' + JSON.stringify(text) + ');');
|
||||
};
|
||||
|
||||
Parser.prototype.tokenHandler = function(open, inner) {
|
||||
var type = delimeters[open];
|
||||
if (type === 'directive') {
|
||||
this.compileTag(inner);
|
||||
} else if (type === 'output') {
|
||||
var extracted = this.extractEnt(inner, STRINGS, '@');
|
||||
//replace || operators with ~
|
||||
extracted.src = extracted.src.replace(/\|\|/g, '~').split('|');
|
||||
//put back || operators
|
||||
extracted.src = extracted.src.map(function(part) {
|
||||
return part.split('~').join('||');
|
||||
});
|
||||
var parts = this.injectEnt(extracted, '@');
|
||||
if (parts.length > 1) {
|
||||
var filters = parts.slice(1).map(this.parseFilter.bind(this));
|
||||
this.push('filter(' + this.parseExpr(parts[0]) + ',' + filters.join(',') + ');');
|
||||
} else {
|
||||
this.push('filter(' + this.parseExpr(parts[0]) + ');');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Parser.prototype.compileTag = function(str) {
|
||||
var directive = str.split(' ')[0];
|
||||
var handler = tagHandlers[directive];
|
||||
if (!handler) {
|
||||
throw new Error('Invalid tag: ' + str);
|
||||
}
|
||||
handler.call(this, str.slice(directive.length).trim());
|
||||
};
|
||||
|
||||
Parser.prototype.parseFilter = function(src) {
|
||||
src = src.trim();
|
||||
var match = src.match(/[:(]/);
|
||||
var i = match ? match.index : -1;
|
||||
if (i < 0) return JSON.stringify([src]);
|
||||
var name = src.slice(0, i);
|
||||
var args = src.charAt(i) === ':' ? src.slice(i + 1) : src.slice(i + 1, -1);
|
||||
args = this.parseExpr(args, {
|
||||
terms: true
|
||||
});
|
||||
return '[' + JSON.stringify(name) + ',' + args + ']';
|
||||
};
|
||||
|
||||
Parser.prototype.extractEnt = function(src, regex, placeholder) {
|
||||
var subs = [],
|
||||
isFunc = typeof placeholder == 'function';
|
||||
src = src.replace(regex, function(str) {
|
||||
var replacement = isFunc ? placeholder(str) : placeholder;
|
||||
if (replacement) {
|
||||
subs.push(str);
|
||||
return replacement;
|
||||
}
|
||||
return str;
|
||||
});
|
||||
return {
|
||||
src: src,
|
||||
subs: subs
|
||||
};
|
||||
};
|
||||
|
||||
Parser.prototype.injectEnt = function(extracted, placeholder) {
|
||||
var src = extracted.src,
|
||||
subs = extracted.subs,
|
||||
isArr = Array.isArray(src);
|
||||
var arr = (isArr) ? src : [src];
|
||||
var re = new RegExp('[' + placeholder + ']', 'g'),
|
||||
i = 0;
|
||||
arr.forEach(function(src, index) {
|
||||
arr[index] = src.replace(re, function() {
|
||||
return subs[i++];
|
||||
});
|
||||
});
|
||||
return isArr ? arr : arr[0];
|
||||
};
|
||||
|
||||
//replace complex literals without mistaking subscript notation with array literals
|
||||
Parser.prototype.replaceComplex = function(s) {
|
||||
var parsed = this.extractEnt(s, /i(\.i|\[[@#i]\])+/g, 'v');
|
||||
parsed.src = parsed.src.replace(NON_PRIMITIVES, '~');
|
||||
return this.injectEnt(parsed, 'v');
|
||||
};
|
||||
|
||||
//parse expression containing literals (including objects/arrays) and variables (including dot and subscript notation)
|
||||
//valid expressions: `a + 1 > b.c or c == null`, `a and b[1] != c`, `(a < b) or (c < d and e)`, 'a || [1]`
|
||||
Parser.prototype.parseExpr = function(src, opts) {
|
||||
opts = opts || {};
|
||||
//extract string literals -> @
|
||||
var parsed1 = this.extractEnt(src, STRINGS, '@');
|
||||
//note: this will catch {not: 1} and a.is; could we replace temporarily and then check adjacent chars?
|
||||
parsed1.src = parsed1.src.replace(EOPS, function(s, before, op, after) {
|
||||
return (op in operators) ? before + operators[op] + after : s;
|
||||
});
|
||||
//sub out non-string literals (numbers/true/false/null) -> #
|
||||
// the distinction is necessary because @ can be object identifiers, # cannot
|
||||
var parsed2 = this.extractEnt(parsed1.src, IDENTS_AND_NUMS, function(s) {
|
||||
return (s in constants || NUMBER.test(s)) ? '#' : null;
|
||||
});
|
||||
//sub out object/variable identifiers -> i
|
||||
var parsed3 = this.extractEnt(parsed2.src, IDENTIFIERS, 'i');
|
||||
//remove white-space
|
||||
parsed3.src = parsed3.src.replace(/\s+/g, '');
|
||||
|
||||
//the rest of this is simply to boil the expression down and check validity
|
||||
var simplified = parsed3.src;
|
||||
//sub out complex literals (objects/arrays) -> ~
|
||||
// the distinction is necessary because @ and # can be subscripts but ~ cannot
|
||||
while (simplified !== (simplified = this.replaceComplex(simplified)));
|
||||
//now @ represents strings, # represents other primitives and ~ represents non-primitives
|
||||
//replace complex variables (those with dot/subscript accessors) -> v
|
||||
while (simplified !== (simplified = simplified.replace(/i(\.i|\[[@#i]\])+/, 'v')));
|
||||
//empty subscript or complex variables in subscript, are not permitted
|
||||
simplified = simplified.replace(/[iv]\[v?\]/g, 'x');
|
||||
//sub in "i" for @ and # and ~ and v (now "i" represents all literals, variables and identifiers)
|
||||
simplified = simplified.replace(/[@#~v]/g, 'i');
|
||||
//sub out operators
|
||||
simplified = simplified.replace(OPERATORS, '%');
|
||||
//allow 'not' unary operator
|
||||
simplified = simplified.replace(/!+[i]/g, 'i');
|
||||
var terms = opts.terms ? simplified.split(',') : [simplified];
|
||||
terms.forEach(function(term) {
|
||||
//simplify logical grouping
|
||||
while (term !== (term = term.replace(/\(i(%i)*\)/g, 'i')));
|
||||
if (!term.match(/^i(%i)*/)) {
|
||||
throw new Error('Invalid expression: ' + src + " " + term);
|
||||
}
|
||||
});
|
||||
parsed3.src = parsed3.src.replace(VARIABLES, this.parseVar.bind(this));
|
||||
parsed2.src = this.injectEnt(parsed3, 'i');
|
||||
parsed1.src = this.injectEnt(parsed2, '#');
|
||||
return this.injectEnt(parsed1, '@');
|
||||
};
|
||||
|
||||
Parser.prototype.parseVar = function(src) {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var str = args.pop(),
|
||||
index = args.pop();
|
||||
//quote bare object identifiers (might be a reserved word like {while: 1})
|
||||
if (src === 'i' && str.charAt(index + 1) === ':') {
|
||||
return '"i"';
|
||||
}
|
||||
var parts = ['"i"'];
|
||||
src.replace(ACCESSOR, function(part) {
|
||||
if (part === '.i') {
|
||||
parts.push('"i"');
|
||||
} else if (part === '[i]') {
|
||||
parts.push('get("i")');
|
||||
} else {
|
||||
parts.push(part.slice(1, -1));
|
||||
}
|
||||
});
|
||||
return 'get(' + parts.join(',') + ')';
|
||||
};
|
||||
|
||||
//escapes a name to be used as a javascript identifier
|
||||
Parser.prototype.escName = function(str) {
|
||||
return str.replace(/\W/g, function(s) {
|
||||
return '$' + s.charCodeAt(0).toString(16);
|
||||
});
|
||||
};
|
||||
|
||||
Parser.prototype.parseQuoted = function(str) {
|
||||
if (str.charAt(0) === "'") {
|
||||
str = str.slice(1, -1).replace(/\\.|"/, function(s) {
|
||||
if (s === "\\'") return "'";
|
||||
return s.charAt(0) === '\\' ? s : ('\\' + s);
|
||||
});
|
||||
str = '"' + str + '"';
|
||||
}
|
||||
//todo: try/catch or deal with invalid characters (linebreaks, control characters)
|
||||
return JSON.parse(str);
|
||||
};
|
||||
|
||||
|
||||
//the context 'this' inside tagHandlers is the parser instance
|
||||
var tagHandlers = {
|
||||
'if': function(expr) {
|
||||
this.push('if (' + this.parseExpr(expr) + ') {');
|
||||
this.nest.unshift('if');
|
||||
},
|
||||
'else': function() {
|
||||
if (this.nest[0] === 'for') {
|
||||
this.push('}, function() {');
|
||||
} else {
|
||||
this.push('} else {');
|
||||
}
|
||||
},
|
||||
'elseif': function(expr) {
|
||||
this.push('} else if (' + this.parseExpr(expr) + ') {');
|
||||
},
|
||||
'endif': function() {
|
||||
this.nest.shift();
|
||||
this.push('}');
|
||||
},
|
||||
'for': function(str) {
|
||||
var i = str.indexOf(' in ');
|
||||
var name = str.slice(0, i).trim();
|
||||
var expr = str.slice(i + 4).trim();
|
||||
this.push('each(' + this.parseExpr(expr) + ',' + JSON.stringify(name) + ',function() {');
|
||||
this.nest.unshift('for');
|
||||
},
|
||||
'endfor': function() {
|
||||
this.nest.shift();
|
||||
this.push('});');
|
||||
},
|
||||
'raw': function() {
|
||||
this.rawMode = true;
|
||||
},
|
||||
'endraw': function() {
|
||||
this.rawMode = false;
|
||||
},
|
||||
'set': function(stmt) {
|
||||
var i = stmt.indexOf('=');
|
||||
var name = stmt.slice(0, i).trim();
|
||||
var expr = stmt.slice(i + 1).trim();
|
||||
this.push('set(' + JSON.stringify(name) + ',' + this.parseExpr(expr) + ');');
|
||||
},
|
||||
'block': function(name) {
|
||||
if (this.isParent) {
|
||||
++this.parentBlocks;
|
||||
var blockName = 'block_' + (this.escName(name) || this.parentBlocks);
|
||||
this.push('block(typeof ' + blockName + ' == "function" ? ' + blockName + ' : function() {');
|
||||
} else if (this.hasParent) {
|
||||
this.isSilent = false;
|
||||
++this.childBlocks;
|
||||
blockName = 'block_' + (this.escName(name) || this.childBlocks);
|
||||
this.push('function ' + blockName + '() {');
|
||||
}
|
||||
this.nest.unshift('block');
|
||||
},
|
||||
'endblock': function() {
|
||||
this.nest.shift();
|
||||
if (this.isParent) {
|
||||
this.push('});');
|
||||
} else if (this.hasParent) {
|
||||
this.push('}');
|
||||
this.isSilent = true;
|
||||
}
|
||||
},
|
||||
'extends': function(name) {
|
||||
name = this.parseQuoted(name);
|
||||
var parentSrc = this.readTemplateFile(name);
|
||||
this.isParent = true;
|
||||
this.tokenize(parentSrc);
|
||||
this.isParent = false;
|
||||
this.hasParent = true;
|
||||
//silence output until we enter a child block
|
||||
this.isSilent = true;
|
||||
},
|
||||
'include': function(name) {
|
||||
name = this.parseQuoted(name);
|
||||
var incSrc = this.readTemplateFile(name);
|
||||
this.isInclude = true;
|
||||
this.tokenize(incSrc);
|
||||
this.isInclude = false;
|
||||
}
|
||||
};
|
||||
|
||||
//liquid style
|
||||
tagHandlers.assign = tagHandlers.set;
|
||||
//python/django style
|
||||
tagHandlers.elif = tagHandlers.elseif;
|
||||
|
||||
var getRuntime = function runtime(data, opts) {
|
||||
var defaults = {
|
||||
autoEscape: 'toJson'
|
||||
};
|
||||
var _toString = Object.prototype.toString;
|
||||
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var getKeys = Object.keys || function(obj) {
|
||||
var keys = [];
|
||||
for (var n in obj)
|
||||
if (_hasOwnProperty.call(obj, n)) keys.push(n);
|
||||
return keys;
|
||||
};
|
||||
var isArray = Array.isArray || function(obj) {
|
||||
return _toString.call(obj) === '[object Array]';
|
||||
};
|
||||
var create = Object.create || function(obj) {
|
||||
function F() {}
|
||||
|
||||
F.prototype = obj;
|
||||
return new F();
|
||||
};
|
||||
var toString = function(val) {
|
||||
if (val == null) return '';
|
||||
return (typeof val.toString == 'function') ? val.toString() : _toString.call(val);
|
||||
};
|
||||
var extend = function(dest, src) {
|
||||
var keys = getKeys(src);
|
||||
for (var i = 0, len = keys.length; i < len; i++) {
|
||||
var key = keys[i];
|
||||
dest[key] = src[key];
|
||||
}
|
||||
return dest;
|
||||
};
|
||||
//get a value, lexically, starting in current context; a.b -> get("a","b")
|
||||
var get = function() {
|
||||
var val, n = arguments[0],
|
||||
c = stack.length;
|
||||
while (c--) {
|
||||
val = stack[c][n];
|
||||
if (typeof val != 'undefined') break;
|
||||
}
|
||||
for (var i = 1, len = arguments.length; i < len; i++) {
|
||||
if (val == null) continue;
|
||||
n = arguments[i];
|
||||
val = (_hasOwnProperty.call(val, n)) ? val[n] : (typeof val._get == 'function' ? (val[n] = val._get(n)) : null);
|
||||
}
|
||||
return (val == null) ? '' : val;
|
||||
};
|
||||
var set = function(n, val) {
|
||||
stack[stack.length - 1][n] = val;
|
||||
};
|
||||
var push = function(ctx) {
|
||||
stack.push(ctx || {});
|
||||
};
|
||||
var pop = function() {
|
||||
stack.pop();
|
||||
};
|
||||
var write = function(str) {
|
||||
output.push(str);
|
||||
};
|
||||
var filter = function(val) {
|
||||
for (var i = 1, len = arguments.length; i < len; i++) {
|
||||
var arr = arguments[i],
|
||||
name = arr[0],
|
||||
filter = filters[name];
|
||||
if (filter) {
|
||||
arr[0] = val;
|
||||
//now arr looks like [val, arg1, arg2]
|
||||
val = filter.apply(data, arr);
|
||||
} else {
|
||||
throw new Error('Invalid filter: ' + name);
|
||||
}
|
||||
}
|
||||
if (opts.autoEscape && name !== opts.autoEscape && name !== 'safe') {
|
||||
//auto escape if not explicitly safe or already escaped
|
||||
val = filters[opts.autoEscape].call(data, val);
|
||||
}
|
||||
output.push(val);
|
||||
};
|
||||
var each = function(obj, loopvar, fn1, fn2) {
|
||||
if (obj == null) return;
|
||||
var arr = isArray(obj) ? obj : getKeys(obj),
|
||||
len = arr.length;
|
||||
var ctx = {
|
||||
loop: {
|
||||
length: len,
|
||||
first: arr[0],
|
||||
last: arr[len - 1]
|
||||
}
|
||||
};
|
||||
push(ctx);
|
||||
for (var i = 0; i < len; i++) {
|
||||
extend(ctx.loop, {
|
||||
index: i + 1,
|
||||
index0: i
|
||||
});
|
||||
fn1(ctx[loopvar] = arr[i]);
|
||||
}
|
||||
if (len === 0 && fn2) fn2();
|
||||
pop();
|
||||
};
|
||||
var block = function(fn) {
|
||||
push();
|
||||
fn();
|
||||
pop();
|
||||
};
|
||||
var render = function() {
|
||||
return output.join('');
|
||||
};
|
||||
data = data || {};
|
||||
opts = extend(defaults, opts || {});
|
||||
var filters = extend({
|
||||
html: function(val) {
|
||||
return toString(val)
|
||||
.split('&').join('&')
|
||||
.split('<').join('<')
|
||||
.split('>').join('>')
|
||||
.split('"').join('"');
|
||||
},
|
||||
safe: function(val) {
|
||||
return val;
|
||||
},
|
||||
toJson: function(val) {
|
||||
if (typeof val === 'object') {
|
||||
return JSON.stringify(val);
|
||||
}
|
||||
return toString(val);
|
||||
}
|
||||
}, opts.filters || {});
|
||||
var stack = [create(data || {})],
|
||||
output = [];
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
push: push,
|
||||
pop: pop,
|
||||
write: write,
|
||||
filter: filter,
|
||||
each: each,
|
||||
block: block,
|
||||
render: render
|
||||
};
|
||||
};
|
||||
|
||||
var runtime;
|
||||
|
||||
jinja.compile = function(markup, opts) {
|
||||
opts = opts || {};
|
||||
var parser = new Parser();
|
||||
parser.readTemplateFile = this.readTemplateFile;
|
||||
var code = [];
|
||||
code.push('function render($) {');
|
||||
code.push('var get = $.get, set = $.set, push = $.push, pop = $.pop, write = $.write, filter = $.filter, each = $.each, block = $.block;');
|
||||
code.push.apply(code, parser.parse(markup));
|
||||
code.push('return $.render();');
|
||||
code.push('}');
|
||||
code = code.join('\n');
|
||||
if (opts.runtime === false) {
|
||||
var fn = new Function('data', 'options', 'return (' + code + ')(runtime(data, options))');
|
||||
} else {
|
||||
runtime = runtime || (runtime = getRuntime.toString());
|
||||
fn = new Function('data', 'options', 'return (' + code + ')((' + runtime + ')(data, options))');
|
||||
}
|
||||
return {
|
||||
render: fn
|
||||
};
|
||||
};
|
||||
|
||||
jinja.render = function(markup, data, opts) {
|
||||
var tmpl = jinja.compile(markup);
|
||||
return tmpl.render(data, opts);
|
||||
};
|
||||
|
||||
jinja.templateFiles = [];
|
||||
|
||||
jinja.readTemplateFile = function(name) {
|
||||
var templateFiles = this.templateFiles || [];
|
||||
var templateFile = templateFiles[name];
|
||||
if (templateFile == null) {
|
||||
throw new Error('Template file not found: ' + name);
|
||||
}
|
||||
return templateFile;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* Helpers
|
||||
*/
|
||||
|
||||
function trimLeft(str) {
|
||||
return str.replace(LEADING_SPACE, '');
|
||||
}
|
||||
|
||||
function trimRight(str) {
|
||||
return str.replace(TRAILING_SPACE, '');
|
||||
}
|
||||
|
||||
function matchAll(str, reg, fn) {
|
||||
//copy as global
|
||||
reg = new RegExp(reg.source, 'g' + (reg.ignoreCase ? 'i' : '') + (reg.multiline ? 'm' : ''));
|
||||
var match;
|
||||
while ((match = reg.exec(str))) {
|
||||
var result = fn(match[0], match.index, str);
|
||||
if (typeof result == 'number') {
|
||||
reg.lastIndex = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,62 @@
|
|||
var rule = {
|
||||
author: '小可乐/240526/第一版',
|
||||
title: '动漫巴士[漫]',
|
||||
host: 'http://dm84.site',
|
||||
hostJs: 'print(HOST);let html=request(HOST,{headers:{"User-Agent":MOBILE_UA}});let src= jsp.pdfh(html,"ul&&a:eq(0)&&href");print(src);HOST=src',
|
||||
headers: {'User-Agent': 'MOBILE_UA'},
|
||||
编码: 'utf-8',
|
||||
timeout: 5000,
|
||||
|
||||
homeUrl: '/',
|
||||
url: '/show-fyclass--fyfilter-fypage.html',
|
||||
filter_url: '{{fl.by}}-{{fl.class}}--{{fl.year}}',
|
||||
detailUrl: '',
|
||||
searchUrl: '/s-**---------fypage.html',
|
||||
searchable: 1,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
|
||||
class_name: '国产动漫&日本动漫&欧美动漫&电影',
|
||||
class_url: '1&2&3&4',
|
||||
filter_def: {},
|
||||
|
||||
proxy_rule: '',
|
||||
sniffer: 0,
|
||||
isVideo: '',
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: `js:
|
||||
let html = request(input);
|
||||
let kurl = pdfh(html,'body&&iframe').match(/src="(.*?)"/)[1];
|
||||
input= kurl
|
||||
`,
|
||||
|
||||
limit: 9,
|
||||
double: false,
|
||||
推荐: '*',
|
||||
//列表;标题;图片;描述;链接;详情(可不写)
|
||||
一级: '.v_list li;a&&title;a&&data-bg;.desc&&Text;a&&href',
|
||||
二级: {
|
||||
//名称;类型
|
||||
"title": "h1&&Text;meta[name*=class]&&content",
|
||||
//图片
|
||||
"img": "img&&src",
|
||||
//主要描述;年份;地区;演员;导演
|
||||
"desc": "meta[name*=update_date]&&content;meta[name*=release_date]&&content;meta[name*=area]&&content;meta[name*=actor]&&content;meta[name*=director]&&content",
|
||||
//简介
|
||||
"content": "p:eq(-2)&&Text",
|
||||
//线路数组
|
||||
"tabs": ".tab_control&&li",
|
||||
//线路标题
|
||||
"tab_text": "body&&Text",
|
||||
//播放数组 选集列表
|
||||
"lists": ".play_list:eq(#id)&&a",
|
||||
//选集标题
|
||||
"list_text": "body&&Text",
|
||||
//选集链接
|
||||
"list_url": "a&&href"
|
||||
},
|
||||
搜索: '*',
|
||||
|
||||
filter: 'H4sIAAAAAAAAA+2WbUsqQRTH3+/HmNe+0LWn21eJXlgIRU+Q3UBEsLTaCrYtSm9cb2RQ2YOVFUFa9mWcGf0Wjc6cMxPFstDlcgXf7e/39+zo2XPUlEUiZHTMSpGZeJKMksnZWCJBQmQ+NhcXyKt1erQteDk2+1OIsRSZF5quldvZckcLIOmQsqcb9LmurALImPOL5QsqUwAZd3O6TgFmF2+tpy3IJGB2vmvUScDzKmfNxjGcJwHrspVWKQN1EiBrZV55w1WZArynd8Svd+GeEvCzb5VZZoW9XPF97ICp0uPpEDY5GY8t6h6zwlO78Biwx3bYHlCue2n4qPZR00e0j5je1t42fVj7sOEjP9CLS8OPaD9i+mHth00/pP2Q6Qe1H/zYr4mk0S13j9Z2PnVLN1HA0rR4Kdy5Wauxu32VTE0vJfSzvs1RZ10licmFxXjnWGs8ZBH7r+3E+l778AImQkKQnfDbJeq59OYKMgl6Dqv0rYAT2AU877hEf1fgPAlBdoIVa+LdQZ2EIDvBVq95HjMJmN3XWc6BTAK+l8MG9SBTgHUrHsvkoU4CZm6Ze/A8Fei6be5Usa4LmD2U2n9O+MElxMj9re2prY3+z1vr92vlW+e3mT7b9+UW9ee5l+Z54F/Ms/ib0nwt6v8sHfj2POeLdPMc6iQE+eb3nWenyrJrcJ6E/jz3zjxb6XeqCRqqbAwAAA=='
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
var rule ={
|
||||
title: '动画片大全',
|
||||
host: 'https://www.dhpdq2.com/',
|
||||
url: 'https://www.dhpdq2.com/katong/fyclass-fypage/',
|
||||
searchUrl: '/vodsearch/**----------fypage---/',
|
||||
class_parse: '.c_class li;a&&Text;a&&href;.*/(.*?)/',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
play_parse: true,
|
||||
lazy: '',
|
||||
limit: 6,
|
||||
推荐: '.stui-vodlist;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
double: true,
|
||||
一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.detail_list&&ul:eq(1)&&li&&a:eq(2)&&Text',
|
||||
img: '.vodlist_thumb&&data-original',
|
||||
desc: '.playinfo&&p:eq(0)&&Text;.playinfo&&p:eq(1)&&Text;.playinfo&&p:eq(2)&&Text;.playinfo&&p:eq(3)&&Text',
|
||||
content: '.content:eq(1)',
|
||||
tabs: '.relatesdh .title h3',
|
||||
lists: '.relatesdh:eq(#id) li',
|
||||
},
|
||||
搜索: '*',
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
muban.vfed.二级.title = 'h1&&Text;.fed-col-md3--span:eq(0)&&Text';
|
||||
muban.vfed.二级.desc = '.fed-col-md3:eq(3)&&Text;;;.fed-col-md6:eq(0)&&Text;.fed-col-md6--span:eq(1)&&Text';
|
||||
var rule = {
|
||||
title: '去看吧',
|
||||
模板:'vfed',
|
||||
host: 'https://www.k9dm.com',
|
||||
// url: '/index.php/vod/show/id/fyclass/page/fypage.html',
|
||||
url: '/index.php/vod/show/id/fyclassfyfilter.html',
|
||||
filterable:1,//是否启用分类筛选,
|
||||
filter_url:'{{fl.area}}{{fl.by}}{{fl.class}}/page/fypage{{fl.year}}',
|
||||
filter:{
|
||||
"33":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"搞笑","v":"/class/搞笑"},{"n":"经典","v":"/class/经典"},{"n":"热血","v":"/class/热血"},{"n":"催泪","v":"/class/催泪"},{"n":"治愈","v":"/class/治愈"},{"n":"猎奇","v":"/class/猎奇"},{"n":"励志","v":"/class/励志"},{"n":"战斗","v":"/class/战斗"},{"n":"后宫","v":"/class/后宫"},{"n":"机战","v":"/class/机战"},{"n":"恋爱","v":"/class/恋爱"},{"n":"百合","v":"/class/百合"},{"n":"科幻","v":"/class/科幻"},{"n":"奇幻","v":"/class/奇幻"},{"n":"推理","v":"/class/推理"},{"n":"校园","v":"/class/校园"},{"n":"运动","v":"/class/运动"},{"n":"魔法","v":"/class/魔法"},{"n":"历史","v":"/class/历史"},{"n":"伪娘","v":"/class/伪娘"},{"n":"美少女","v":"/class/美少女"},{"n":"萝莉","v":"/class/萝莉"},{"n":"亲子","v":"/class/亲子"},{"n":"青春","v":"/class/青春"},{"n":"冒险","v":"/class/冒险"},{"n":"竞技","v":"/class/竞技"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"},{"n":"2007","v":"/year/2007"},{"n":"2006","v":"/year/2006"},{"n":"2005","v":"/year/2005"},{"n":"2004","v":"/year/2004"},{"n":"2003","v":"/year/2003"},{"n":"2002","v":"/year/2002"},{"n":"2001","v":"/year/2001"},{"n":"2000","v":"/year/2000"},{"n":"1999","v":"/year/1999"},{"n":"1998","v":"/year/1998"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"21":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"搞笑","v":"/class/搞笑"},{"n":"经典","v":"/class/经典"},{"n":"热血","v":"/class/热血"},{"n":"催泪","v":"/class/催泪"},{"n":"治愈","v":"/class/治愈"},{"n":"猎奇","v":"/class/猎奇"},{"n":"励志","v":"/class/励志"},{"n":"战斗","v":"/class/战斗"},{"n":"后宫","v":"/class/后宫"},{"n":"机战","v":"/class/机战"},{"n":"恋爱","v":"/class/恋爱"},{"n":"百合","v":"/class/百合"},{"n":"科幻","v":"/class/科幻"},{"n":"奇幻","v":"/class/奇幻"},{"n":"推理","v":"/class/推理"},{"n":"校园","v":"/class/校园"},{"n":"运动","v":"/class/运动"},{"n":"魔法","v":"/class/魔法"},{"n":"历史","v":"/class/历史"},{"n":"伪娘","v":"/class/伪娘"},{"n":"美少女","v":"/class/美少女"},{"n":"萝莉","v":"/class/萝莉"},{"n":"亲子","v":"/class/亲子"},{"n":"青春","v":"/class/青春"},{"n":"冒险","v":"/class/冒险"},{"n":"竞技","v":"/class/竞技"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"/area/大陆"},{"n":"美国","v":"/area/美国"},{"n":"韩国","v":"/area/韩国"},{"n":"日本","v":"/area/日本"},{"n":"泰国","v":"/area/泰国"},{"n":"新加坡","v":"/area/新加坡"},{"n":"马来西亚","v":"/area/马来西亚"},{"n":"印度","v":"/area/印度"},{"n":"英国","v":"/area/英国"},{"n":"法国","v":"/area/法国"},{"n":"加拿大","v":"/area/加拿大"},{"n":"西班牙","v":"/area/西班牙"},{"n":"俄罗斯","v":"/area/俄罗斯"},{"n":"其它","v":"/area/其它"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"},{"n":"2007","v":"/year/2007"},{"n":"2006","v":"/year/2006"},{"n":"2005","v":"/year/2005"},{"n":"2004","v":"/year/2004"},{"n":"2003","v":"/year/2003"},{"n":"2002","v":"/year/2002"},{"n":"2001","v":"/year/2001"},{"n":"2000","v":"/year/2000"},{"n":"1999","v":"/year/1999"},{"n":"1998","v":"/year/1998"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"50":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"搞笑","v":"/class/搞笑"},{"n":"经典","v":"/class/经典"},{"n":"热血","v":"/class/热血"},{"n":"催泪","v":"/class/催泪"},{"n":"治愈","v":"/class/治愈"},{"n":"猎奇","v":"/class/猎奇"},{"n":"励志","v":"/class/励志"},{"n":"战斗","v":"/class/战斗"},{"n":"后宫","v":"/class/后宫"},{"n":"机战","v":"/class/机战"},{"n":"恋爱","v":"/class/恋爱"},{"n":"百合","v":"/class/百合"},{"n":"科幻","v":"/class/科幻"},{"n":"奇幻","v":"/class/奇幻"},{"n":"推理","v":"/class/推理"},{"n":"校园","v":"/class/校园"},{"n":"运动","v":"/class/运动"},{"n":"魔法","v":"/class/魔法"},{"n":"历史","v":"/class/历史"},{"n":"伪娘","v":"/class/伪娘"},{"n":"美少女","v":"/class/美少女"},{"n":"萝莉","v":"/class/萝莉"},{"n":"亲子","v":"/class/亲子"},{"n":"青春","v":"/class/青春"},{"n":"冒险","v":"/class/冒险"},{"n":"竞技","v":"/class/竞技"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"/area/大陆"},{"n":"美国","v":"/area/美国"},{"n":"韩国","v":"/area/韩国"},{"n":"日本","v":"/area/日本"},{"n":"泰国","v":"/area/泰国"},{"n":"新加坡","v":"/area/新加坡"},{"n":"马来西亚","v":"/area/马来西亚"},{"n":"印度","v":"/area/印度"},{"n":"英国","v":"/area/英国"},{"n":"法国","v":"/area/法国"},{"n":"加拿大","v":"/area/加拿大"},{"n":"西班牙","v":"/area/西班牙"},{"n":"俄罗斯","v":"/area/俄罗斯"},{"n":"其它","v":"/area/其它"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"},{"n":"2007","v":"/year/2007"},{"n":"2006","v":"/year/2006"},{"n":"2005","v":"/year/2005"},{"n":"2004","v":"/year/2004"},{"n":"2003","v":"/year/2003"},{"n":"2002","v":"/year/2002"},{"n":"2001","v":"/year/2001"},{"n":"2000","v":"/year/2000"},{"n":"1999","v":"/year/1999"},{"n":"1998","v":"/year/1998"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"24":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"搞笑","v":"/class/搞笑"},{"n":"经典","v":"/class/经典"},{"n":"热血","v":"/class/热血"},{"n":"催泪","v":"/class/催泪"},{"n":"治愈","v":"/class/治愈"},{"n":"猎奇","v":"/class/猎奇"},{"n":"励志","v":"/class/励志"},{"n":"战斗","v":"/class/战斗"},{"n":"后宫","v":"/class/后宫"},{"n":"机战","v":"/class/机战"},{"n":"恋爱","v":"/class/恋爱"},{"n":"百合","v":"/class/百合"},{"n":"科幻","v":"/class/科幻"},{"n":"奇幻","v":"/class/奇幻"},{"n":"推理","v":"/class/推理"},{"n":"校园","v":"/class/校园"},{"n":"运动","v":"/class/运动"},{"n":"魔法","v":"/class/魔法"},{"n":"历史","v":"/class/历史"},{"n":"伪娘","v":"/class/伪娘"},{"n":"美少女","v":"/class/美少女"},{"n":"萝莉","v":"/class/萝莉"},{"n":"亲子","v":"/class/亲子"},{"n":"青春","v":"/class/青春"},{"n":"冒险","v":"/class/冒险"},{"n":"竞技","v":"/class/竞技"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"/area/大陆"},{"n":"美国","v":"/area/美国"},{"n":"韩国","v":"/area/韩国"},{"n":"日本","v":"/area/日本"},{"n":"泰国","v":"/area/泰国"},{"n":"新加坡","v":"/area/新加坡"},{"n":"马来西亚","v":"/area/马来西亚"},{"n":"印度","v":"/area/印度"},{"n":"英国","v":"/area/英国"},{"n":"法国","v":"/area/法国"},{"n":"加拿大","v":"/area/加拿大"},{"n":"西班牙","v":"/area/西班牙"},{"n":"俄罗斯","v":"/area/俄罗斯"},{"n":"其它","v":"/area/其它"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"},{"n":"2007","v":"/year/2007"},{"n":"2006","v":"/year/2006"},{"n":"2005","v":"/year/2005"},{"n":"2004","v":"/year/2004"},{"n":"2003","v":"/year/2003"},{"n":"2002","v":"/year/2002"},{"n":"2001","v":"/year/2001"},{"n":"2000","v":"/year/2000"},{"n":"1999","v":"/year/1999"},{"n":"1998","v":"/year/1998"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"22":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"搞笑","v":"/class/搞笑"},{"n":"经典","v":"/class/经典"},{"n":"热血","v":"/class/热血"},{"n":"催泪","v":"/class/催泪"},{"n":"治愈","v":"/class/治愈"},{"n":"猎奇","v":"/class/猎奇"},{"n":"励志","v":"/class/励志"},{"n":"战斗","v":"/class/战斗"},{"n":"后宫","v":"/class/后宫"},{"n":"机战","v":"/class/机战"},{"n":"恋爱","v":"/class/恋爱"},{"n":"百合","v":"/class/百合"},{"n":"科幻","v":"/class/科幻"},{"n":"奇幻","v":"/class/奇幻"},{"n":"推理","v":"/class/推理"},{"n":"校园","v":"/class/校园"},{"n":"运动","v":"/class/运动"},{"n":"魔法","v":"/class/魔法"},{"n":"历史","v":"/class/历史"},{"n":"伪娘","v":"/class/伪娘"},{"n":"美少女","v":"/class/美少女"},{"n":"萝莉","v":"/class/萝莉"},{"n":"亲子","v":"/class/亲子"},{"n":"青春","v":"/class/青春"},{"n":"冒险","v":"/class/冒险"},{"n":"竞技","v":"/class/竞技"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"/area/日本"},{"n":"欧美","v":"/area/欧美"},{"n":"其他","v":"/area/其他"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"},{"n":"2007","v":"/year/2007"},{"n":"2006","v":"/year/2006"},{"n":"2005","v":"/year/2005"},{"n":"2004","v":"/year/2004"},{"n":"2003","v":"/year/2003"},{"n":"2002","v":"/year/2002"},{"n":"2001","v":"/year/2001"},{"n":"2000","v":"/year/2000"},{"n":"1999","v":"/year/1999"},{"n":"1998","v":"/year/1998"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}]
|
||||
},
|
||||
class_parse: '.fed-pops-list:eq(0)&&li:gt(0):lt(6);a&&Text;a&&href;.*/(.*?).html',
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
var rule = {
|
||||
模板: 'mxpro',
|
||||
title: '大米动漫[漫]',
|
||||
host: 'https://damidm.com/',
|
||||
url: 'show/fyclass--------fypage---.html',
|
||||
searchUrl: '/search/**----------fypage---.html',
|
||||
class_parse: '.navbar-items li;a&&Text;a&&href;/(\\d+).html',
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
var rule={
|
||||
title:'奇米动漫',
|
||||
host:'http://www.qimiqimi.net',
|
||||
url:'/show/fyclassfyfilter.html',
|
||||
filterable:1,//是否启用分类筛选,
|
||||
filter_url:'{{fl.area}}{{fl.by}}{{fl.class}}{{fl.letter}}/page/fypage{{fl.year}}',
|
||||
filter: {
|
||||
"xinfan":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"冒险","v":"/class/冒险"},{"n":"热血","v":"/class/热血"},{"n":"奇幻","v":"/class/奇幻"},{"n":"恋爱","v":"/class/恋爱"},{"n":"校园","v":"/class/校园"},{"n":"后宫","v":"/class/后宫"},{"n":"搞笑","v":"/class/搞笑"},{"n":"治愈","v":"/class/治愈"},{"n":"神魔","v":"/class/神魔"},{"n":"魔法","v":"/class/魔法"},{"n":"百合","v":"/class/百合"},{"n":"推理","v":"/class/推理"},{"n":"科幻","v":"/class/科幻"},{"n":"竞技","v":"/class/竞技"},{"n":"悬疑","v":"/class/悬疑"},{"n":"青春","v":"/class/青春"},{"n":"战争","v":"/class/战争"},{"n":"萝莉","v":"/class/萝莉"},{"n":"魔幻","v":"/class/魔幻"},{"n":"战斗","v":"/class/战斗"},{"n":"日常","v":"/class/日常"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"/area/日本/"},{"n":"大陆","v":"/area/中国/"},{"n":"欧美","v":"/area/欧美/"},{"n":"韩国","v":"/area/韩国/"},{"n":"港台","v":"/area/港台/"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"},{"n":"2007","v":"/year/2007"},{"n":"2006","v":"/year/2006"},{"n":"2005","v":"/year/2005"},{"n":"2004","v":"/year/2004"},{"n":"2003","v":"/year/2003"},{"n":"2002","v":"/year/2002"},{"n":"2001","v":"/year/2001"},{"n":"2000","v":"/year/2000"}]},{"key":"letter","name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"/letter/A"},{"n":"B","v":"/letter/B"},{"n":"C","v":"/letter/C"},{"n":"D","v":"/letter/D"},{"n":"E","v":"/letter/E"},{"n":"F","v":"/letter/F"},{"n":"G","v":"/letter/G"},{"n":"H","v":"/letter/H"},{"n":"I","v":"/letter/I"},{"n":"J","v":"/letter/J"},{"n":"K","v":"/letter/K"},{"n":"L","v":"/letter/L"},{"n":"M","v":"/letter/M"},{"n":"N","v":"/letter/N"},{"n":"O","v":"/letter/O"},{"n":"P","v":"/letter/P"},{"n":"Q","v":"/letter/Q"},{"n":"R","v":"/letter/R"},{"n":"S","v":"/letter/S"},{"n":"T","v":"/letter/T"},{"n":"U","v":"/letter/U"},{"n":"V","v":"/letter/V"},{"n":"W","v":"/letter/W"},{"n":"X","v":"/letter/X"},{"n":"Y","v":"/letter/Y"},{"n":"Z","v":"/letter/Z"},{"n":"0-9","v":"/letter/0-9"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"riman":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"冒险","v":"/class/冒险"},{"n":"热血","v":"/class/热血"},{"n":"奇幻","v":"/class/奇幻"},{"n":"恋爱","v":"/class/恋爱"},{"n":"校园","v":"/class/校园"},{"n":"后宫","v":"/class/后宫"},{"n":"搞笑","v":"/class/搞笑"},{"n":"治愈","v":"/class/治愈"},{"n":"神魔","v":"/class/神魔"},{"n":"魔法","v":"/class/魔法"},{"n":"百合","v":"/class/百合"},{"n":"推理","v":"/class/推理"},{"n":"科幻","v":"/class/科幻"},{"n":"竞技","v":"/class/竞技"},{"n":"悬疑","v":"/class/悬疑"},{"n":"青春","v":"/class/青春"},{"n":"战争","v":"/class/战争"},{"n":"萝莉","v":"/class/萝莉"},{"n":"魔幻","v":"/class/魔幻"},{"n":"战斗","v":"/class/战斗"},{"n":"日常","v":"/class/日常"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"/area/日本/"},{"n":"大陆","v":"/area/中国/"},{"n":"欧美","v":"/area/欧美/"},{"n":"韩国","v":"/area/韩国/"},{"n":"港台","v":"/area/港台/"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"},{"n":"2007","v":"/year/2007"},{"n":"2006","v":"/year/2006"},{"n":"2005","v":"/year/2005"},{"n":"2004","v":"/year/2004"},{"n":"2003","v":"/year/2003"},{"n":"2002","v":"/year/2002"},{"n":"2001","v":"/year/2001"},{"n":"2000","v":"/year/2000"}]},{"key":"letter","name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"/letter/A"},{"n":"B","v":"/letter/B"},{"n":"C","v":"/letter/C"},{"n":"D","v":"/letter/D"},{"n":"E","v":"/letter/E"},{"n":"F","v":"/letter/F"},{"n":"G","v":"/letter/G"},{"n":"H","v":"/letter/H"},{"n":"I","v":"/letter/I"},{"n":"J","v":"/letter/J"},{"n":"K","v":"/letter/K"},{"n":"L","v":"/letter/L"},{"n":"M","v":"/letter/M"},{"n":"N","v":"/letter/N"},{"n":"O","v":"/letter/O"},{"n":"P","v":"/letter/P"},{"n":"Q","v":"/letter/Q"},{"n":"R","v":"/letter/R"},{"n":"S","v":"/letter/S"},{"n":"T","v":"/letter/T"},{"n":"U","v":"/letter/U"},{"n":"V","v":"/letter/V"},{"n":"W","v":"/letter/W"},{"n":"X","v":"/letter/X"},{"n":"Y","v":"/letter/Y"},{"n":"Z","v":"/letter/Z"},{"n":"0-9","v":"/letter/0-9"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"guoman":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"冒险","v":"/class/冒险"},{"n":"热血","v":"/class/热血"},{"n":"奇幻","v":"/class/奇幻"},{"n":"恋爱","v":"/class/恋爱"},{"n":"校园","v":"/class/校园"},{"n":"后宫","v":"/class/后宫"},{"n":"搞笑","v":"/class/搞笑"},{"n":"治愈","v":"/class/治愈"},{"n":"神魔","v":"/class/神魔"},{"n":"魔法","v":"/class/魔法"},{"n":"百合","v":"/class/百合"},{"n":"推理","v":"/class/推理"},{"n":"科幻","v":"/class/科幻"},{"n":"竞技","v":"/class/竞技"},{"n":"悬疑","v":"/class/悬疑"},{"n":"青春","v":"/class/青春"},{"n":"战争","v":"/class/战争"},{"n":"萝莉","v":"/class/萝莉"},{"n":"魔幻","v":"/class/魔幻"},{"n":"战斗","v":"/class/战斗"},{"n":"日常","v":"/class/日常"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"/area/日本/"},{"n":"大陆","v":"/area/中国/"},{"n":"欧美","v":"/area/欧美/"},{"n":"韩国","v":"/area/韩国/"},{"n":"港台","v":"/area/港台/"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"},{"n":"2007","v":"/year/2007"},{"n":"2006","v":"/year/2006"},{"n":"2005","v":"/year/2005"},{"n":"2004","v":"/year/2004"},{"n":"2003","v":"/year/2003"},{"n":"2002","v":"/year/2002"},{"n":"2001","v":"/year/2001"},{"n":"2000","v":"/year/2000"}]},{"key":"letter","name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"/letter/A"},{"n":"B","v":"/letter/B"},{"n":"C","v":"/letter/C"},{"n":"D","v":"/letter/D"},{"n":"E","v":"/letter/E"},{"n":"F","v":"/letter/F"},{"n":"G","v":"/letter/G"},{"n":"H","v":"/letter/H"},{"n":"I","v":"/letter/I"},{"n":"J","v":"/letter/J"},{"n":"K","v":"/letter/K"},{"n":"L","v":"/letter/L"},{"n":"M","v":"/letter/M"},{"n":"N","v":"/letter/N"},{"n":"O","v":"/letter/O"},{"n":"P","v":"/letter/P"},{"n":"Q","v":"/letter/Q"},{"n":"R","v":"/letter/R"},{"n":"S","v":"/letter/S"},{"n":"T","v":"/letter/T"},{"n":"U","v":"/letter/U"},{"n":"V","v":"/letter/V"},{"n":"W","v":"/letter/W"},{"n":"X","v":"/letter/X"},{"n":"Y","v":"/letter/Y"},{"n":"Z","v":"/letter/Z"},{"n":"0-9","v":"/letter/0-9"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"jcdm":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"冒险","v":"/class/冒险"},{"n":"热血","v":"/class/热血"},{"n":"奇幻","v":"/class/奇幻"},{"n":"恋爱","v":"/class/恋爱"},{"n":"校园","v":"/class/校园"},{"n":"后宫","v":"/class/后宫"},{"n":"搞笑","v":"/class/搞笑"},{"n":"治愈","v":"/class/治愈"},{"n":"神魔","v":"/class/神魔"},{"n":"魔法","v":"/class/魔法"},{"n":"百合","v":"/class/百合"},{"n":"推理","v":"/class/推理"},{"n":"科幻","v":"/class/科幻"},{"n":"竞技","v":"/class/竞技"},{"n":"悬疑","v":"/class/悬疑"},{"n":"青春","v":"/class/青春"},{"n":"战争","v":"/class/战争"},{"n":"萝莉","v":"/class/萝莉"},{"n":"魔幻","v":"/class/魔幻"},{"n":"战斗","v":"/class/战斗"},{"n":"日常","v":"/class/日常"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"/area/日本/"},{"n":"大陆","v":"/area/中国/"},{"n":"欧美","v":"/area/欧美/"},{"n":"韩国","v":"/area/韩国/"},{"n":"港台","v":"/area/港台/"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"},{"n":"2007","v":"/year/2007"},{"n":"2006","v":"/year/2006"},{"n":"2005","v":"/year/2005"},{"n":"2004","v":"/year/2004"},{"n":"2003","v":"/year/2003"},{"n":"2002","v":"/year/2002"},{"n":"2001","v":"/year/2001"},{"n":"2000","v":"/year/2000"}]},{"key":"letter","name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"/letter/A"},{"n":"B","v":"/letter/B"},{"n":"C","v":"/letter/C"},{"n":"D","v":"/letter/D"},{"n":"E","v":"/letter/E"},{"n":"F","v":"/letter/F"},{"n":"G","v":"/letter/G"},{"n":"H","v":"/letter/H"},{"n":"I","v":"/letter/I"},{"n":"J","v":"/letter/J"},{"n":"K","v":"/letter/K"},{"n":"L","v":"/letter/L"},{"n":"M","v":"/letter/M"},{"n":"N","v":"/letter/N"},{"n":"O","v":"/letter/O"},{"n":"P","v":"/letter/P"},{"n":"Q","v":"/letter/Q"},{"n":"R","v":"/letter/R"},{"n":"S","v":"/letter/S"},{"n":"T","v":"/letter/T"},{"n":"U","v":"/letter/U"},{"n":"V","v":"/letter/V"},{"n":"W","v":"/letter/W"},{"n":"X","v":"/letter/X"},{"n":"Y","v":"/letter/Y"},{"n":"Z","v":"/letter/Z"},{"n":"0-9","v":"/letter/0-9"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}]
|
||||
},
|
||||
searchable:2,//是否启用全局搜索,
|
||||
headers:{//网站的请求头,完整支持所有的,常带ua和cookies
|
||||
'User-Agent': 'PC_UA',
|
||||
},
|
||||
class_parse: '#nav li;a&&Text;a&&href;.*/(\\w+).html',
|
||||
cate_exclude:'番组专题|最近更新',
|
||||
play_parse: true,
|
||||
lazy:`js:
|
||||
var html = JSON.parse(request(input).match(/r player_.*?=(.*?)</)[1]);
|
||||
var url = html.url;
|
||||
if (html.encrypt == '1') {
|
||||
url = unescape(url)
|
||||
} else if (html.encrypt == '2') {
|
||||
url = unescape(base64Decode(url))
|
||||
}
|
||||
if (/\\.m3u8|\\.mp4/.test(url)) {
|
||||
input = {
|
||||
jx: 0,
|
||||
url: url,
|
||||
parse: 0
|
||||
}
|
||||
} else {
|
||||
input
|
||||
}
|
||||
`,
|
||||
limit:6,
|
||||
推荐:'*;*;*;.text&&Text;*',
|
||||
一级:'.img-list li;a&&title;img&&src;i&&Text;a&&href',
|
||||
二级:{
|
||||
"title":"h1&&Text;dl.fn-left:eq(3)&&Text",
|
||||
"img":".detail-pic&&img&&src",
|
||||
"desc":"dl.fn-left:eq(2)&&Text;;;.nyzhuy--dt&&Text;.fn-right:eq(0)--dt&&Text",
|
||||
"content":".tjuqing&&Text",
|
||||
"tabs":".down-title h2",
|
||||
"lists":".video_list:eq(#id) a"
|
||||
},
|
||||
searchUrl:'/index.php/ajax/suggest?mid=1&wd=**&limit=50',
|
||||
detailUrl:'/detail/fyid.html', //非必填,二级详情拼接链接
|
||||
搜索:'json:list;name;pic;;id',
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
var rule={
|
||||
title: '好看动漫',
|
||||
host: 'https://www.youjiula.com/',
|
||||
url: 'https://www.youjiula.com/youjiu/fyclass-fypage.html',
|
||||
searchUrl: 'https://www.youjiula.com/search.php?page=fypage&searchword=**&searchtype=',
|
||||
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": "#desc&&Text",
|
||||
"tabs": ".stui-pannel-box h3",
|
||||
"lists": ".stui-content__playlist:eq(#id) li"
|
||||
},
|
||||
搜索: 'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
var rule={
|
||||
title:'异世界动漫',
|
||||
host:'https://www.dmmiku.com/',
|
||||
homeUrl:'/index.php/vod/show/id/22.html',
|
||||
// url:'/index.php/vod/show/class/fyclass/id/20/page/fypage.html',
|
||||
url:'/index.php/vod/show/fyclassfyfilter.html',
|
||||
filterable:1,
|
||||
filter_url:'{{fl.type}}/id/20/page/fypage{{fl.year}}',
|
||||
filter: {
|
||||
"area/日本":[{"key":"type","name":"类型","value":[{"n":"全部","v":""},{"n":"OVA","v":"/class/OVA"},{"n":"剧场版","v":"/class/剧场版"},{"n":"无修","v":"/class/BD无修"},{"n":"萝莉","v":"/class/萝莉"},{"n":"学園","v":"/class/学園"},{"n":"后宫","v":"/class/后宫"},{"n":"恋爱","v":"/class/恋爱"},{"n":"热血","v":"/class/热血"},{"n":"神魔","v":"/class/神魔"},{"n":"奇幻","v":"/class/奇幻"},{"n":"治愈","v":"/class/治愈"},{"n":"搞笑","v":"/class/搞笑"},{"n":"百合","v":"/class/百合"},{"n":"冒险","v":"/class/冒险"},{"n":"魔法","v":"/class/魔法"},{"n":"机战","v":"/class/机战"},{"n":"战争","v":"/class/战争"},{"n":"犯罪","v":"/class/犯罪"},{"n":"悬疑","v":"/class/悬疑"},{"n":"推理","v":"/class/推理"},{"n":"科幻","v":"/class/科幻"},{"n":"竞技","v":"/class/竞技"},{"n":"运动","v":"/class/运动"},{"n":"耽美","v":"/class/耽美"},{"n":"其他","v":"/class/其他"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"}]}],
|
||||
"area/中國":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"},{"n":"2008","v":"/year/2008"}]}]
|
||||
},
|
||||
searchUrl:'/index.php/vod/search/page/fypage/wd/**.html',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA'
|
||||
},
|
||||
timeout:5000,//网站的全局请求超时,默认是3000毫秒
|
||||
class_name:'日漫&国漫',
|
||||
class_url:'area/日本&area/中國',
|
||||
play_parse:true,
|
||||
lazy:`js:
|
||||
var html = JSON.parse(request(input).match(/r player_.*?=(.*?)</)[1]);
|
||||
var url = html.url;
|
||||
var from = html.from;
|
||||
if (html.encrypt == '1') {
|
||||
url = unescape(url)
|
||||
} else if (html.encrypt == '2') {
|
||||
url = unescape(base64Decode(url))
|
||||
}
|
||||
if (/m3u8|mp4/.test(url)) {
|
||||
input = url
|
||||
} else {
|
||||
var MacPlayerConfig={};
|
||||
eval(fetch(HOST + "/static/js/playerconfig.js").replace('var Mac','Mac'));
|
||||
var jx = MacPlayerConfig.player_list[from].parse;
|
||||
if (jx == '') {
|
||||
jx = MacPlayerConfig.parse
|
||||
};
|
||||
if (jx.startsWith("/")) {
|
||||
jx = "https:" + jx;
|
||||
}
|
||||
input={
|
||||
jx:0,
|
||||
url:jx+url,
|
||||
parse:1,
|
||||
header: JSON.stringify({
|
||||
'referer': HOST
|
||||
})
|
||||
}
|
||||
}
|
||||
`,
|
||||
limit:6,
|
||||
// 图片来源:'@Referer=https://api.douban.com/@User-Agent=Mozilla/5.0%20(Windows%20NT%2010.0;%20Win64;%20x64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/113.0.0.0%20Safari/537.36',
|
||||
推荐:'*',
|
||||
一级:'.vodlist_wi&&li;.lazyload&&title;.lazyload&&data-original;.pic_text&&Text;a&&href',
|
||||
二级:{
|
||||
"title": "h2&&Text;li.data--span:eq(0)&&Text",
|
||||
"img": ".lazyload&&data-original",
|
||||
"desc": "li.data--span:eq(1)&&Text;;;li.data--span:eq(2)&&Text;li.data--span:eq(3)&&Text",
|
||||
"content": ".full_text&&span&&Text",
|
||||
"tabs": `js:
|
||||
TABS = [];
|
||||
let tabs = pdfa(html, '#NumTab&&a');
|
||||
tabs.forEach((it) => {
|
||||
TABS.push(pdfh(it, 'a&&alt'))
|
||||
});
|
||||
`,
|
||||
// "lists": ".content_playlist:not(.list_scroll):eq(#id) a"
|
||||
"lists": "div.playlist_full:eq(#id) li"
|
||||
},
|
||||
搜索:'li.searchlist_item;*;*;*;*',
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
// 发布页 https://acgfans.org/pub.html
|
||||
var rule={
|
||||
title:'怡萱动漫',
|
||||
// host:'https://www.yxdmlove.com',
|
||||
host:'https://acgfans.org/pub.html',
|
||||
hostJs:'print(HOST);let html=request(HOST,{headers:{"User-Agent":PC_UA}});let src = jsp.pdfh(html,"p:eq(0)&&a&&Text");print(src);HOST=src',//网页域名根动态抓取js代码。通过HOST=赋值
|
||||
// url:'/category.html?channel=17&zhonglei=fyclass&orderby=pubdate&totalresult=2999&pageno=fypage',
|
||||
url:'/category.html?channel=17&zhonglei=fyclassfyfilter&pageno=fypage',
|
||||
filterable:1,//是否启用分类筛选,
|
||||
filter_url:'&{{fl.by or "orderby=pubdate"}}&{{fl.year}}&{{fl.area}}&{{fl.sta}}&{{fl.class}}',
|
||||
filter: {
|
||||
"TV":[{"key":"sta","name":"进度","value":[{"n":"全部","v":""},{"n":"连载中","v":"status=连载中"},{"n":"已完结","v":"status=已完结"},{"n":"未播放","v":"status=未播放"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"area=日本"},{"n":"中国","v":"area=中国"},{"n":"欧美","v":"area=欧美"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"year=2024"},{"n":"2023","v":"year=2023"},{"n":"2022","v":"year=2022"},{"n":"2021","v":"year=2021"},{"n":"2020","v":"year=2020"},{"n":"2019","v":"year=2019"},{"n":"2018","v":"year=2018"},{"n":"2017","v":"year=2017"},{"n":"2016","v":"year=2016"},{"n":"2015","v":"year=2015"},{"n":"2014","v":"year=2014"},{"n":"2013","v":"year=2013"},{"n":"2012","v":"year=2012"},{"n":"2011","v":"year=2011"},{"n":"2010","v":"year=2010"},{"n":"更早","v":"year=2010前"}]},{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"冒险","v":"jqlx=冒险"},{"n":"热血","v":"jqlx=热血"},{"n":"爱情","v":"jqlx=爱情"},{"n":"搞笑","v":"jqlx=搞笑"},{"n":"后宫","v":"jqlx=后宫"},{"n":"校园","v":"jqlx=校园"},{"n":"机战","v":"jqlx=机战"},{"n":"幻想","v":"jqlx=幻想"},{"n":"科幻","v":"jqlx=科幻"},{"n":"竞技","v":"jqlx=竞技"},{"n":"百合","v":"jqlx=百合"},{"n":"耽美","v":"jqlx=耽美"},{"n":"悬疑","v":"jqlx=悬疑"},{"n":"剧情","v":"jqlx=剧情"},{"n":"战争","v":"jqlx=战争"},{"n":"恐怖","v":"jqlx=恐怖"},{"n":"运动","v":"jqlx=运动"},{"n":"动作","v":"jqlx=动作"},{"n":"童话","v":"jqlx=童话"},{"n":"历史","v":"jqlx=历史"},{"n":"真人","v":"jqlx=真人"},{"n":"女性向","v":"jqlx=女性向"},{"n":"泡面番","v":"jqlx=泡面番"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"orderby=pubdate"},{"n":"热度","v":"orderby=click"}]}],
|
||||
"剧场版":[{"key":"sta","name":"进度","value":[{"n":"全部","v":""},{"n":"连载中","v":"status=连载中"},{"n":"已完结","v":"status=已完结"},{"n":"未播放","v":"status=未播放"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"area=日本"},{"n":"中国","v":"area=中国"},{"n":"欧美","v":"area=欧美"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"year=2024"},{"n":"2023","v":"year=2023"},{"n":"2022","v":"year=2022"},{"n":"2021","v":"year=2021"},{"n":"2020","v":"year=2020"},{"n":"2019","v":"year=2019"},{"n":"2018","v":"year=2018"},{"n":"2017","v":"year=2017"},{"n":"2016","v":"year=2016"},{"n":"2015","v":"year=2015"},{"n":"2014","v":"year=2014"},{"n":"2013","v":"year=2013"},{"n":"2012","v":"year=2012"},{"n":"2011","v":"year=2011"},{"n":"2010","v":"year=2010"},{"n":"更早","v":"year=2010前"}]},{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"冒险","v":"jqlx=冒险"},{"n":"热血","v":"jqlx=热血"},{"n":"爱情","v":"jqlx=爱情"},{"n":"搞笑","v":"jqlx=搞笑"},{"n":"后宫","v":"jqlx=后宫"},{"n":"校园","v":"jqlx=校园"},{"n":"机战","v":"jqlx=机战"},{"n":"幻想","v":"jqlx=幻想"},{"n":"科幻","v":"jqlx=科幻"},{"n":"竞技","v":"jqlx=竞技"},{"n":"百合","v":"jqlx=百合"},{"n":"耽美","v":"jqlx=耽美"},{"n":"悬疑","v":"jqlx=悬疑"},{"n":"剧情","v":"jqlx=剧情"},{"n":"战争","v":"jqlx=战争"},{"n":"恐怖","v":"jqlx=恐怖"},{"n":"运动","v":"jqlx=运动"},{"n":"动作","v":"jqlx=动作"},{"n":"童话","v":"jqlx=童话"},{"n":"历史","v":"jqlx=历史"},{"n":"真人","v":"jqlx=真人"},{"n":"女性向","v":"jqlx=女性向"},{"n":"泡面番","v":"jqlx=泡面番"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"orderby=pubdate"},{"n":"热度","v":"orderby=click"}]}],
|
||||
"OVA":[{"key":"sta","name":"进度","value":[{"n":"全部","v":""},{"n":"连载中","v":"status=连载中"},{"n":"已完结","v":"status=已完结"},{"n":"未播放","v":"status=未播放"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"area=日本"},{"n":"中国","v":"area=中国"},{"n":"欧美","v":"area=欧美"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"year=2024"},{"n":"2023","v":"year=2023"},{"n":"2022","v":"year=2022"},{"n":"2021","v":"year=2021"},{"n":"2020","v":"year=2020"},{"n":"2019","v":"year=2019"},{"n":"2018","v":"year=2018"},{"n":"2017","v":"year=2017"},{"n":"2016","v":"year=2016"},{"n":"2015","v":"year=2015"},{"n":"2014","v":"year=2014"},{"n":"2013","v":"year=2013"},{"n":"2012","v":"year=2012"},{"n":"2011","v":"year=2011"},{"n":"2010","v":"year=2010"},{"n":"更早","v":"year=2010前"}]},{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"冒险","v":"jqlx=冒险"},{"n":"热血","v":"jqlx=热血"},{"n":"爱情","v":"jqlx=爱情"},{"n":"搞笑","v":"jqlx=搞笑"},{"n":"后宫","v":"jqlx=后宫"},{"n":"校园","v":"jqlx=校园"},{"n":"机战","v":"jqlx=机战"},{"n":"幻想","v":"jqlx=幻想"},{"n":"科幻","v":"jqlx=科幻"},{"n":"竞技","v":"jqlx=竞技"},{"n":"百合","v":"jqlx=百合"},{"n":"耽美","v":"jqlx=耽美"},{"n":"悬疑","v":"jqlx=悬疑"},{"n":"剧情","v":"jqlx=剧情"},{"n":"战争","v":"jqlx=战争"},{"n":"恐怖","v":"jqlx=恐怖"},{"n":"运动","v":"jqlx=运动"},{"n":"动作","v":"jqlx=动作"},{"n":"童话","v":"jqlx=童话"},{"n":"历史","v":"jqlx=历史"},{"n":"真人","v":"jqlx=真人"},{"n":"女性向","v":"jqlx=女性向"},{"n":"泡面番","v":"jqlx=泡面番"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"orderby=pubdate"},{"n":"热度","v":"orderby=click"}]}],
|
||||
"其他":[{"key":"sta","name":"进度","value":[{"n":"全部","v":""},{"n":"连载中","v":"status=连载中"},{"n":"已完结","v":"status=已完结"},{"n":"未播放","v":"status=未播放"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"area=日本"},{"n":"中国","v":"area=中国"},{"n":"欧美","v":"area=欧美"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"year=2024"},{"n":"2023","v":"year=2023"},{"n":"2022","v":"year=2022"},{"n":"2021","v":"year=2021"},{"n":"2020","v":"year=2020"},{"n":"2019","v":"year=2019"},{"n":"2018","v":"year=2018"},{"n":"2017","v":"year=2017"},{"n":"2016","v":"year=2016"},{"n":"2015","v":"year=2015"},{"n":"2014","v":"year=2014"},{"n":"2013","v":"year=2013"},{"n":"2012","v":"year=2012"},{"n":"2011","v":"year=2011"},{"n":"2010","v":"year=2010"},{"n":"更早","v":"year=2010前"}]},{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"冒险","v":"jqlx=冒险"},{"n":"热血","v":"jqlx=热血"},{"n":"爱情","v":"jqlx=爱情"},{"n":"搞笑","v":"jqlx=搞笑"},{"n":"后宫","v":"jqlx=后宫"},{"n":"校园","v":"jqlx=校园"},{"n":"机战","v":"jqlx=机战"},{"n":"幻想","v":"jqlx=幻想"},{"n":"科幻","v":"jqlx=科幻"},{"n":"竞技","v":"jqlx=竞技"},{"n":"百合","v":"jqlx=百合"},{"n":"耽美","v":"jqlx=耽美"},{"n":"悬疑","v":"jqlx=悬疑"},{"n":"剧情","v":"jqlx=剧情"},{"n":"战争","v":"jqlx=战争"},{"n":"恐怖","v":"jqlx=恐怖"},{"n":"运动","v":"jqlx=运动"},{"n":"动作","v":"jqlx=动作"},{"n":"童话","v":"jqlx=童话"},{"n":"历史","v":"jqlx=历史"},{"n":"真人","v":"jqlx=真人"},{"n":"女性向","v":"jqlx=女性向"},{"n":"泡面番","v":"jqlx=泡面番"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"orderby=pubdate"},{"n":"热度","v":"orderby=click"}]}]
|
||||
},
|
||||
// filter_def:{
|
||||
// TV:{by:'orderby=pubdate'},
|
||||
// 剧场版:{by:'orderby=pubdate'},
|
||||
// OVA:{by:'orderby=pubdate'},
|
||||
// 其他:{by:'orderby=pubdate'}
|
||||
// },
|
||||
searchUrl:'/search.html?keyword=**&PageNo=fypage',
|
||||
searchable:2,//是否启用全局搜索,
|
||||
headers:{//网站的请求头,完整支持所有的,常带ua和cookies
|
||||
'User-Agent': 'PC_UA',
|
||||
},
|
||||
class_name:'TV&剧场版&OVA&其他',
|
||||
class_url:'TV&剧场版&OVA&其他',
|
||||
play_parse: true,
|
||||
lazy:'',
|
||||
limit:6,
|
||||
// 推荐:'.dhnew.adj li;*;*;*;*',
|
||||
推荐:'.dhnew.adj li;a&&title;img&&src;p:eq(-1)&&Text;a&&href',
|
||||
// 一级:'.dhnew li;a&&title;img&&src;p:eq(-1)&&Text;a&&href',
|
||||
一级:`js:
|
||||
let d = [];
|
||||
pdfh = jsp.pdfh;pdfa = jsp.pdfa;pd = jsp.pd;
|
||||
let html = '';
|
||||
let totalresult = getItem("totalresult_" + MY_CATE, '')
|
||||
if (totalresult == '') {
|
||||
html = request(input);
|
||||
totalresult = pdfh(html, ".pageinfo&&strong&&Text");
|
||||
setItem("totalresult_" + MY_CATE, totalresult)
|
||||
}
|
||||
input += '&totalresult=' + getItem("totalresult_" + MY_CATE, '');
|
||||
html = request(input);
|
||||
let list = pdfa(html, ".dhnew&&li");
|
||||
list.forEach(it => {
|
||||
d.push({
|
||||
title: pdfh(it, "a&&title"),
|
||||
desc: pdfh(it, "p:eq(-1)&&Text"),
|
||||
pic_url: pd(it, "img&&src"),
|
||||
url: pd(it, "a&&href")
|
||||
})
|
||||
});
|
||||
setResult(d)
|
||||
`,
|
||||
二级:{
|
||||
"title":"h1&&Text;.dhxx p:eq(4)&&Text",
|
||||
"img":".anime-img&&img&&src",
|
||||
"desc":".info1-left li:eq(1)&&Text;.dhxx p:eq(3)&&Text;.dhxx p:eq(2)&&Text;.info1-left li:eq(0)&&Text;.info1-left li:eq(2)&&Text",
|
||||
"content":".info2--strong&&Text",
|
||||
"tabs":".ol-select li",
|
||||
"lists":".ol-content:eq(#id) li"
|
||||
},
|
||||
// 搜索:'*;*;*;p:eq(3)&&Text;*',
|
||||
搜索:'.dhnew li;a&&title;img&&src;p:eq(3)&&Text;a&&href',
|
||||
}
|
|
@ -0,0 +1,429 @@
|
|||
if (typeof Object.assign !== 'function') {
|
||||
Object.assign = function() {
|
||||
let target = arguments[0];
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
let source = arguments[i];
|
||||
for (let key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
}
|
||||
|
||||
// 通用免嗅探播放
|
||||
let common_lazy = `js:
|
||||
let html = request(input);
|
||||
let hconf = html.match(/r player_.*?=(.*?)</)[1];
|
||||
let json = JSON5.parse(hconf);
|
||||
let url = json.url;
|
||||
if (json.encrypt == '1') {
|
||||
url = unescape(url);
|
||||
} else if (json.encrypt == '2') {
|
||||
url = unescape(base64Decode(url));
|
||||
}
|
||||
if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {
|
||||
input = {
|
||||
parse: 0,
|
||||
jx: 0,
|
||||
url: url,
|
||||
};
|
||||
} else {
|
||||
input;
|
||||
}`;
|
||||
// 默认嗅探播放
|
||||
|
||||
let def_lazy = `js:
|
||||
input = { parse: 1, url: input, js: '' };`;
|
||||
// 采集站播放
|
||||
|
||||
let cj_lazy = `js:
|
||||
if (/\\.(m3u8|mp4)/.test(input)) {
|
||||
input = { parse: 0, url: input };
|
||||
} else {
|
||||
if (rule.parse_url.startsWith('json:')) {
|
||||
let purl = rule.parse_url.replace('json:', '') + input;
|
||||
let html = request(purl);
|
||||
let json = JSON.parse(html);
|
||||
if (json.url) {
|
||||
input = { parse: 0, url: json.url };
|
||||
}
|
||||
} else {
|
||||
input = rule.parse_url + input;
|
||||
}
|
||||
}`;
|
||||
|
||||
function getMubans() {
|
||||
const mubanDict = { // 模板字典
|
||||
mx: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/vodshow/fyclass--------fypage---/',
|
||||
searchUrl: '/vodsearch/**----------fypage---/',
|
||||
class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: '.cbox_list;*;*;*;*;*',
|
||||
一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h2&&Text;.content_detail:eq(1)&&li&&a:eq(2)&&Text',
|
||||
img: '.vodlist_thumb&&data-original',
|
||||
desc: '.content_detail:eq(1)&&li:eq(1)&&Text;.content_detail:eq(1)&&li&&a&&Text;.content_detail:eq(1)&&li&&a:eq(1)&&Text;.content_detail:eq(1)&&li:eq(2)&&Text;.content_detail:eq(1)&&li:eq(3)&&Text',
|
||||
content: '.content_desc&&span&&Text',
|
||||
tabs: '.play_source_tab&&a',
|
||||
lists: '.content_playlist:eq(#id) li',
|
||||
},
|
||||
搜索: '*',
|
||||
},
|
||||
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(0):lt(10);a&&Text;a&&href;/(\\d+)',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.module-info-tag-link:eq(-1)&&Text',
|
||||
img: '.lazyload&&data-original||data-src||src',
|
||||
desc: '.module-info-item:eq(-2)&&Text;.module-info-tag-link&&Text;.module-info-tag-link:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(1)&&Text',
|
||||
content: '.module-info-introduction&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-play-list:eq(#id) a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '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: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||
一级: '.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(3)&&Text;.tag-link:eq(2)&&Text;.tag-link:eq(1)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(0)&&Text',
|
||||
content: '.vod_content&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-player-list:eq(#id)&&.scroll-content&&a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '.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(7);a&&Text;a&&href;/(\\d+).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.myui-content__detail .title--span&&Text;.myui-content__detail p.data:eq(3)&&Text',
|
||||
img: '.myui-content__thumb .lazyload&&data-original',
|
||||
desc: '.myui-content__detail p.otherbox&&Text;.year&&Text;.myui-content__detail p.data:eq(4)&&Text;.myui-content__detail p.data:eq(2)&&Text;.myui-content__detail p.data:eq(0)&&Text',
|
||||
content: '.content&&Text',
|
||||
tabs: '.myui-panel__head&&li',
|
||||
// tabs: '.nav-tabs&&li',
|
||||
lists: '.myui-content__list:eq(#id) li',
|
||||
},
|
||||
搜索: '#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&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;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.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)&&a&&Text',
|
||||
title1: '.stui-content__detail .title&&Text;.stui-content__detail&&p&&Text',
|
||||
img: '.stui-content__thumb .lazyload&&data-original',
|
||||
desc: '.stui-content__detail p&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(2)&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text;.stui-content__detail p:eq(1)&&Text',
|
||||
desc1: '.stui-content__detail p:eq(4)&&Text;;;.stui-content__detail p:eq(1)&&Text',
|
||||
content: '.detail&&Text',
|
||||
tabs: '.stui-pannel__head h3',
|
||||
tabs1: '.stui-vodlist__head h3',
|
||||
lists: '.stui-content__playlist:eq(#id) li',
|
||||
},
|
||||
搜索: 'ul.stui-vodlist__media,ul.stui-vodlist,#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||
},
|
||||
默认: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '',
|
||||
searchUrl: '',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
filter: '',
|
||||
filter_url: '',
|
||||
filter_def: {},
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: '#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||
cate_exclude: '',
|
||||
play_parse: true,
|
||||
lazy: def_lazy,
|
||||
double: true,
|
||||
推荐: '列表1;列表2;标题;图片;描述;链接;详情',
|
||||
一级: '列表;标题;图片;描述;链接;详情',
|
||||
二级: {
|
||||
title: 'vod_name;vod_type',
|
||||
img: '图片链接',
|
||||
desc: '主要信息;年代;地区;演员;导演',
|
||||
content: '简介',
|
||||
tabs: '',
|
||||
lists: 'xx:eq(#id)&&a',
|
||||
tab_text: 'body&&Text',
|
||||
list_text: 'body&&Text',
|
||||
list_url: 'a&&href',
|
||||
},
|
||||
搜索: '列表;标题;图片;描述;链接;详情',
|
||||
},
|
||||
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;a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||
一级: '.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: common_lazy,
|
||||
double: true,
|
||||
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.hl-dc-title&&Text;.hl-dc-content&&li:eq(6)&&Text',
|
||||
img: '.hl-lazy&&data-original',
|
||||
desc: '.hl-dc-content&&li:eq(10)&&Text;.hl-dc-content&&li:eq(4)&&Text;.hl-dc-content&&li:eq(5)&&Text;.hl-dc-content&&li:eq(2)&&Text;.hl-dc-content&&li:eq(3)&&Text',
|
||||
content: '.hl-content-text&&Text',
|
||||
tabs: '.hl-tabs&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
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: common_lazy,
|
||||
double: true,
|
||||
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
||||
一级: '.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: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||
一级: '.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=**&limit=50',
|
||||
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',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
推荐: '.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(2)--strong&&Text',
|
||||
img: '.detail-pic&&data-original',
|
||||
desc: '.slide-info-remarks&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(1)--strong&&Text;.info-parameter&&ul&&li:eq(3)&&Text',
|
||||
content: '#height_limit&&Text',
|
||||
tabs: '.anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
lists: '.anthology-list-box:eq(#id) li',
|
||||
},
|
||||
搜索: 'json:list;name;pic;;id',
|
||||
},
|
||||
采集1: {
|
||||
title: '',
|
||||
host: '',
|
||||
homeTid: '13',
|
||||
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||
detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
|
||||
searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
|
||||
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyclass',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA'
|
||||
},
|
||||
timeout: 5000, // class_name: '电影&电视剧&综艺&动漫',
|
||||
// class_url: '1&2&3&4',
|
||||
// class_parse:'js:let html=request(input);input=JSON.parse(html).class;',
|
||||
class_parse: 'json:class;',
|
||||
limit: 20,
|
||||
multi: 1,
|
||||
searchable: 2, //是否启用全局搜索,
|
||||
quickSearch: 1, //是否启用快速搜索,
|
||||
filterable: 0, //是否启用分类筛选,
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: cj_lazy,
|
||||
推荐: '*',
|
||||
一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
||||
二级: `js:
|
||||
let html=request(input);
|
||||
html=JSON.parse(html);
|
||||
let data=html.list;
|
||||
VOD=data[0];`,
|
||||
搜索: '*',
|
||||
},
|
||||
};
|
||||
return JSON.parse(JSON.stringify(mubanDict));
|
||||
}
|
||||
|
||||
var mubanDict = getMubans();
|
||||
var muban = getMubans();
|
||||
export default {
|
||||
muban,
|
||||
getMubans
|
||||
};
|
|
@ -0,0 +1,8 @@
|
|||
var rule = {
|
||||
模板: '首图',
|
||||
title: '樱花动漫[漫]',
|
||||
host: 'https://katedm.com/',
|
||||
url: '/list/fyclass-fypage.html',
|
||||
searchUrl: '/search/**----------fypage---.html',
|
||||
搜索: '#searchList li;a&&title;.lazyload&&data-original;.pic-tag&&Text;a&&href',
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
muban.短视2.二级.img = '.detail-pic&&img&&data-src';
|
||||
var rule = {
|
||||
title: '爱弹幕',
|
||||
模板:'短视2',
|
||||
host: 'https://anime.girigirilove.com',
|
||||
homeUrl:'/map/',
|
||||
// url:'/show/fyclass--------fypage---/'
|
||||
url: '/show/fyclassfyfilter/',
|
||||
filterable:1,//是否启用分类筛选,
|
||||
filter_url:'-{{fl.area}}-{{fl.by}}-{{fl.class}}-{{fl.lang}}-{{fl.letter}}---fypage---{{fl.year}}',
|
||||
filter: {
|
||||
"2":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"恐怖","v":"恐怖"},{"n":"动作","v":"动作"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"战争","v":"战争"},{"n":"奇幻","v":"奇幻"},{"n":"冒险","v":"冒险"},{"n":"悬疑","v":"悬疑"},{"n":"校园","v":"校园"},{"n":"后宫","v":"后宫"},{"n":"热血","v":"热血"},{"n":"运动","v":"运动"},{"n":"百合","v":"百合"},{"n":"乙女","v":"乙女"},{"n":"机甲","v":"机甲"},{"n":"日常","v":"日常"},{"n":"魔法少女","v":"魔法少女"},{"n":"异世界","v":"异世界"},{"n":"爱抖露","v":"爱抖露"},{"n":"音乐","v":"音乐"},{"n":"萌","v":"萌"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"一月","v":"一月"},{"n":"四月","v":"四月"},{"n":"七月","v":"七月"},{"n":"十月","v":"十月"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"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":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"日语","v":"日语"},{"n":"国语","v":"国语"}]},{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||
"3":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"搞笑","v":"搞笑"},{"n":"爱情","v":"爱情"},{"n":"恐怖","v":"恐怖"},{"n":"动作","v":"动作"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"战争","v":"战争"},{"n":"奇幻","v":"奇幻"},{"n":"冒险","v":"冒险"},{"n":"悬疑","v":"悬疑"},{"n":"校园","v":"校园"},{"n":"后宫","v":"后宫"},{"n":"热血","v":"热血"},{"n":"运动","v":"运动"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"内地","v":"内地"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"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"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"}]},{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||
"21":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"恐怖","v":"恐怖"},{"n":"动作","v":"动作"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"战争","v":"战争"},{"n":"奇幻","v":"奇幻"},{"n":"冒险","v":"冒险"},{"n":"悬疑","v":"悬疑"},{"n":"校园","v":"校园"},{"n":"后宫","v":"后宫"},{"n":"热血","v":"热血"},{"n":"运动","v":"运动"},{"n":"百合","v":"百合"},{"n":"耽美","v":"耽美"},{"n":"机甲","v":"机甲"},{"n":"日常","v":"日常"},{"n":"魔法少女","v":"魔法少女"},{"n":"异世界","v":"异世界"},{"n":"爱抖露","v":"爱抖露"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"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"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"日语","v":"日语"},{"n":"中文","v":"中文"},{"n":"英语","v":"英语"}]},{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||
"20":[{"key":"class","name":"类型","value":[{"n":"全部","v":""},{"n":"爱情","v":"爱情"},{"n":"科幻","v":"科幻"},{"n":"经典","v":"经典"},{"n":"冒险","v":"冒险"},{"n":"剧情","v":"剧情"},{"n":"动作","v":"动作"},{"n":"同性","v":"同性"},{"n":"喜剧","v":"喜剧"},{"n":"奇幻","v":"奇幻"},{"n":"恐怖","v":"恐怖"},{"n":"悬疑.惊悚","v":"悬疑.惊悚"},{"n":"战争","v":"战争"},{"n":"欧美","v":"欧美"},{"n":"歌舞","v":"歌舞"},{"n":"灾难","v":"灾难"},{"n":"记录.泰剧","v":"记录.泰剧"},{"n":"体育","v":"体育"},{"n":"烧脑","v":"烧脑"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"日本"},{"n":"欧美","v":"欧美"},{"n":"泰国","v":"泰国"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"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.2003","v":"2004.2003"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"日语","v":"日语"},{"n":"英语","v":"英语"},{"n":"泰语","v":"泰语"}]},{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||
"24":[{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],
|
||||
"26":[{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}]
|
||||
},
|
||||
searchUrl: '/search/**----------fypage---/',
|
||||
class_name:'日番&美番&劇場版&真人番劇&BD副音軌&其他',
|
||||
class_url:'2&3&21&20&24&26',
|
||||
play_parse:true,
|
||||
lazy:`js:
|
||||
var html = JSON.parse(request(input).match(/r player_.*?=(.*?)</)[1]);
|
||||
var url = html.url;
|
||||
var from = html.from;
|
||||
var next = html.link_next;
|
||||
if (html.encrypt == '1') {
|
||||
url = unescape(url)
|
||||
} else if (html.encrypt == '2') {
|
||||
url = unescape(base64Decode(url))
|
||||
} else if (html.encrypt == '3') {
|
||||
url = url.substring(8, url.length);
|
||||
url = base64Decode(url);
|
||||
url = url.substring(8, (url.length) - 8)
|
||||
}
|
||||
if (/\\.m3u8|\\.mp4/.test(url)) {
|
||||
input = {
|
||||
jx: 0,
|
||||
url: url,
|
||||
parse: 0
|
||||
}
|
||||
} else {
|
||||
var paurl = request(HOST + '/static/player/' + from + '.js').match(/ src="(.*?)'/)[1];
|
||||
if (/https/.test(paurl)) {
|
||||
var purl = paurl + url + '&next=' + next + '&title=';
|
||||
input = {
|
||||
jx: 0,
|
||||
url: purl,
|
||||
parse: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
推荐:'.border-box&&.public-list-box;a&&title;.lazy&&data-src;.public-list-prb&&Text;a&&href',
|
||||
double: false, // 推荐内容是否双层定位
|
||||
一级:'.border-box .public-list-box;a&&title;.lazy&&data-src;.public-list-prb&&Text;a&&href',
|
||||
搜索:'.row-right&&.search-box;.thumb-txt&&Text;.lazy&&data-src;.public-list-prb&&Text;a&&href',
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
var rule = {
|
||||
title: '花子动漫[漫]',
|
||||
host: 'https://www.huazidm.com',
|
||||
class_name: 'TV动漫&剧场&特摄',
|
||||
class_url: '1&2&3',
|
||||
searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
url: '/index.php/api/vod#type=fyclassfyfilter&page=fypage',
|
||||
filterable: 0,
|
||||
filter_url: '&class={{fl.class}}&year={{fl.year}}&letter={{fl.letter}}&by={{fl.by}}',
|
||||
filter: 'H4sIAAAAAAAAA+2W204TURSG32WuMdnT0nbDnZzP57PhopImEhETWk0IIUFOloNQDLSigGJCLCIWhJCWgr4MM9O+hdPO2mstDzE10cSYudv/989u55t0uteUpmuVd6a0+6FJrVIbGQuGw1qZNh58ELKjdZo19lbs/Dg49ihUvG7cxsZCMj+XLGA7aNNlQK9mb9Jxa2sVCsrqCmv7sxGLQg0Bd8fWjI9HaqsTcN/ccW5/Ru1zAnaXKSt6qjonYHf4JXexrDon4PcdPDUyWfV9TlCdGX1hxhPQQSjlPs3YnvVhQ+1zAnaJAyOdVp0T8D7fbdC9QMB9n7LmvHpmELB7s2+8OladE7B7skLPBQI6LD7Pbx8qByfgvrWkFVtU+5yA3c6l/TRU5wTV5V+f3WRi0EFQXS62m1tbgg4C3WfMnInjfRYDdnPL5uxL1TkBu7P9/O5ba+u9qjHjFem0GV03NzPqCsz4HE7Wc6lzuoIyfsbVkbWZZZ+BGd0WlHRhNT1c4M67NBkKTtCrZGTOb7LXJb5KHuEpB1ZcMu4l7uXcQ9zDuU5c51wQF4zrFcjtJeOSuOQ8QDzAuZ+4n3MfcR/n5KtzX518de6rk6/OfXXy1bmvTr469xXkK7ivIF/BfQX5Cu4ryFdwX0G+gvsK8hXcV5Cv4L6CfAX3FeQruK8gX0G+ekWF8i0uGZfEJecB4gHO/cT9nPuI+zgvJ17OuZe4l3MPcQ/nOnGdc0Gc+0ryldxXkq/kvpJ8JfeV5Cu5ryRfyX0l+UruK8lXcl9JvpL7SvKV3FeSr73kfztjoUgkxP94jhNm6lmJfzy3AdxGUgWkCkk1kGokNUBqkNQCqUVSB6QOST2QeiQNQBqQNAJpRNIEpAlJM5BmJC1AWpC0AmlF0gakDUk7kHYkHUA6kHQC6UTSBaQLSTeQbiQ9QHqQ9ALpRdIHpA9JP5B+JANABpAMAhlEMgRkCIm4pd6Bwor/VO5O0s/ETFzkE+c//EzM1SVzZ8aMn8BHREbtq/F0LJb2QAblvdFImJe51LwRVbNEeOThRKjw9cNlmuefGDl/OVb+hdHxvxgPf3cEdAcidyByByK1dAcidyByByJ3IPp+IPL+qYFoOXlzvaOObieUMrb8dMRwj2736HaPbrV0j2736HaPbvfo/vbonv4K+TrlXkAbAAA=',
|
||||
filter_def: {},
|
||||
detailUrl: '/voddetail/fyid.html',
|
||||
play_parse: true,
|
||||
sniffer: 1,
|
||||
is_video: 'obj/tos|bd.xhscdn|/ugc/',
|
||||
lazy: $js.toString(() => {
|
||||
input = {
|
||||
parse: 1,
|
||||
url: input,
|
||||
//js:'try{let urls=Array.from(document.querySelectorAll("iframe")).filter(x=>x.src.includes("?url="));if(urls){location.href=urls[0].src}}catch{}document.querySelector("button").click()',
|
||||
js: 'try{location.href=document.querySelector("#playleft iframe").src}catch{}document.querySelector("button.swal-button--confirm").click()',
|
||||
parse_extra: '&is_pc=1&custom_regex=' + rule.is_video,
|
||||
}
|
||||
}),
|
||||
limit: 6,
|
||||
推荐: '.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href',
|
||||
一级: $js.toString(() => {
|
||||
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',
|
||||
搜索: $js.toString(() => {
|
||||
let html = fetch(input);
|
||||
let list = pdfa(html, ".public-list-box");
|
||||
VODS = list.map(x => {
|
||||
return {
|
||||
vod_name: pdfh(x, ".thumb-txt&&Text"),
|
||||
vod_pic: pdfh(x, ".lazy&&data-src"),
|
||||
vod_remarks: pdfh(x, ".public-list-prb&&Text"),
|
||||
vod_content: pdfh(x, ".thumb-blurb&&Text"),
|
||||
vod_id: pdfh(x, "a&&href")
|
||||
}
|
||||
});
|
||||
}),
|
||||
图片替换: '&=>&'
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
var rule = {
|
||||
title: "路漫漫",
|
||||
host: "http://www.lmm36.com",
|
||||
url: "/vod/show/id/fyclassfyfilter.html",
|
||||
searchUrl: 'http://www.lmm88.com/vod/search/page/fypage/wd/**.html',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 1,
|
||||
filter: "H4sIAAAAAAAAAO2Su04CURCG32XqNXu/wKsYitVsAlHRcEs2hISoECuJxqhRYqMFxkIKKFgLXoY9Lm/hHtB1mPqUU87//Tt7kvm6YEN5vwtHUQxlSBez1dcraFAPTyI8d8LjdrQp1mU8mKwvJjLOB+hp29QyLOc30+MobOibAFGbUhtTi1ILU5NSE1ODUgNRs0RoHiAaUBpg6lPqY+pR6mHqUuoWVDzPxMM75c6eWQryp1dkbXsRcX2bJqP/ixTz7kXEuJ8tb+TW++nf1oNYb9Xyj4p/jvvrj8dVkojpHepUa60m6WSfl+nVEHWah6eNnUXp29P3+SKbv6BS+0y+vKKBw0axUUqNctkoNkqpUR4bxUYpNcpno9gopUYFbBQbpdCo3g8SNsur7Q0AAA==",
|
||||
filter_url: "{{fl.排序}}{{fl.年代}}/page/fypage",
|
||||
filter_def: "",
|
||||
headers: {
|
||||
"User-Agent": "MOBILE_UA"
|
||||
},
|
||||
timeout: 5000,
|
||||
class_name: "日本动漫&国产动漫&欧美动漫&日本动画电影&国产动画电影&欧美动画电影",
|
||||
class_url: "6&7&8&3&4&5",
|
||||
class_parse: "",
|
||||
cate_exclude: "",
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
input = {parse: 1, url: input, js: ''};
|
||||
}),
|
||||
double: false,
|
||||
推荐: "*",
|
||||
一级: ".video-img-box;h6.title&&Text;.lazyload&&data-src;.label&&Text;a&&href",
|
||||
二级: {
|
||||
title: ".page-title&&Text;.tag-link&&Text",
|
||||
img: ".module-item-pic&&.lazyload&&src",
|
||||
desc: ".video-info-items:eq(3)&&Text;.video-info-items:eq(2)&&Text;;.video-info-items:eq(1)&&Text;.video-info-items:eq(0)&&Text",
|
||||
content: ".video-info-content&&Text",
|
||||
tabs: ".module-tab-item.tab-item",
|
||||
lists: ".module-player-list:eq(#id) a",
|
||||
tab_text: "body&&Text",
|
||||
list_text: "body&&Text",
|
||||
list_url: "a&&href"
|
||||
},
|
||||
detailUrl: "",
|
||||
搜索: '.row .video-img-box;h6 a&&Text;.lazyload&&data-src;.label&&Text;a&&href',
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
/**
|
||||
* 传参 ?type=url¶ms=http://122.228.85.203:1000@泽少1
|
||||
* 传参 ?type=url¶ms=http://122.228.85.203:1000@泽少2
|
||||
*/
|
||||
|
||||
var rule = {
|
||||
title: 'APPV2[模板]',
|
||||
author: '道长',
|
||||
version: '20241012 beta1',
|
||||
update_info: `
|
||||
20241012:
|
||||
1.根据群友嗷呜的appv2模板修改成可传参源,类似采集之王用法传参
|
||||
`.trim(),
|
||||
host: '',
|
||||
url: '/api.php/app/video?tid=fyclassfyfilter&limit=20&pg=fypage',
|
||||
filter_url: '',
|
||||
filter: {},
|
||||
homeUrl: '/api.php/app/index_video',
|
||||
detailUrl: '/api.php/app/video_detail?id=fyid',
|
||||
searchUrl: '/api.php/app/search?text=**&pg=fypage',
|
||||
parseUrl: '',
|
||||
searchable: 2,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/4.1.0'
|
||||
},
|
||||
params: 'http://122.228.85.203:1000$http://122.228.85.203:1000/play?url=',
|
||||
hostJs: $js.toString(() => {
|
||||
HOST = rule.params.split('$')[0];
|
||||
}),
|
||||
预处理: $js.toString(() => {
|
||||
log(`传入参数:${rule.params}`);
|
||||
let _host = rule.params.split('$')[0];
|
||||
rule.parseUrl = rule.params.split('$')[1];
|
||||
let _url = _host.rstrip('/') + '/api.php/app/nav?token';
|
||||
let _headers = {'User-Agent': 'Dart/2.14 (dart:io)'};
|
||||
let html = request(_url, {headers: _headers});
|
||||
let data = JSON.parse(html);
|
||||
let _classes = [];
|
||||
let _filter = {};
|
||||
let _filter_url = '';
|
||||
let dy = {"class": "类型", "area": "地区", "lang": "语言", "year": "年份", "letter": "字母", "by": "排序"};
|
||||
let jsonData = data.list;
|
||||
for (let k = 0; k < jsonData.length; k++) {
|
||||
let hasNonEmptyField = false;
|
||||
let _obj = {
|
||||
type_name: jsonData[k].type_name,
|
||||
type_id: jsonData[k].type_id,
|
||||
};
|
||||
_classes.push(_obj);
|
||||
for (let key in dy) {
|
||||
if (key in jsonData[k].type_extend && jsonData[k].type_extend[key].trim() !== "") {
|
||||
hasNonEmptyField = true;
|
||||
break
|
||||
}
|
||||
}
|
||||
if (hasNonEmptyField) {
|
||||
_filter[String(jsonData[k].type_id)] = [];
|
||||
for (let dkey in jsonData[k].type_extend) {
|
||||
if (dkey in dy && jsonData[k].type_extend[dkey].trim() !== "") {
|
||||
if (k === 0) {
|
||||
_filter_url += `&${dkey}={{fl.${dkey}}}`
|
||||
}
|
||||
let values = jsonData[k].type_extend[dkey].split(',');
|
||||
let valueArray = values.map(value => ({"n": value.trim(), "v": value.trim()}));
|
||||
_filter[String(jsonData[k].type_id)].push({"key": dkey, "name": dy[dkey], "value": valueArray})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rule.classes = _classes;
|
||||
rule.filter = _filter;
|
||||
rule.filter_url = _filter_url;
|
||||
}),
|
||||
class_parse: $js.toString(() => {
|
||||
input = rule.classes;
|
||||
}),
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
if (!/^http/.test(input)) {
|
||||
input = rule.parseUrl + input
|
||||
} else {
|
||||
input = {
|
||||
url: input,
|
||||
parse: 0,
|
||||
header: ''
|
||||
}
|
||||
}
|
||||
|
||||
}),
|
||||
推荐: $js.toString(() => {
|
||||
let data = JSON.parse(request(input)).list;
|
||||
let com = [];
|
||||
data.forEach(item => {
|
||||
if (Array.isArray(item.vlist) && item.vlist.length !== 0) {
|
||||
com = com.concat(item.vlist)
|
||||
}
|
||||
})
|
||||
VODS = com
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
VODS = JSON.parse(request(input)).list
|
||||
}),
|
||||
二级: $js.toString(() => {
|
||||
VOD = JSON.parse(request(input)).data
|
||||
}),
|
||||
搜索: '*',
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,607 @@
|
|||
/*!
|
||||
* Jinja Templating for JavaScript v0.1.8
|
||||
* https://github.com/sstur/jinja-js
|
||||
*
|
||||
* This is a slimmed-down Jinja2 implementation [http://jinja.pocoo.org/]
|
||||
*
|
||||
* In the interest of simplicity, it deviates from Jinja2 as follows:
|
||||
* - Line statements, cycle, super, macro tags and block nesting are not implemented
|
||||
* - auto escapes html by default (the filter is "html" not "e")
|
||||
* - Only "html" and "safe" filters are built in
|
||||
* - Filters are not valid in expressions; `foo|length > 1` is not valid
|
||||
* - Expression Tests (`if num is odd`) not implemented (`is` translates to `==` and `isnot` to `!=`)
|
||||
*
|
||||
* Notes:
|
||||
* - if property is not found, but method '_get' exists, it will be called with the property name (and cached)
|
||||
* - `{% for n in obj %}` iterates the object's keys; get the value with `{% for n in obj %}{{ obj[n] }}{% endfor %}`
|
||||
* - subscript notation `a[0]` takes literals or simple variables but not `a[item.key]`
|
||||
* - `.2` is not a valid number literal; use `0.2`
|
||||
*
|
||||
*/
|
||||
/*global require, exports, module, define */
|
||||
|
||||
(function(global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jinja = {}));
|
||||
})(this, (function(jinja) {
|
||||
"use strict";
|
||||
var STRINGS = /'(\\.|[^'])*'|"(\\.|[^"'"])*"/g;
|
||||
var IDENTS_AND_NUMS = /([$_a-z][$\w]*)|([+-]?\d+(\.\d+)?)/g;
|
||||
var NUMBER = /^[+-]?\d+(\.\d+)?$/;
|
||||
//non-primitive literals (array and object literals)
|
||||
var NON_PRIMITIVES = /\[[@#~](,[@#~])*\]|\[\]|\{([@i]:[@#~])(,[@i]:[@#~])*\}|\{\}/g;
|
||||
//bare identifiers such as variables and in object literals: {foo: 'value'}
|
||||
var IDENTIFIERS = /[$_a-z][$\w]*/ig;
|
||||
var VARIABLES = /i(\.i|\[[@#i]\])*/g;
|
||||
var ACCESSOR = /(\.i|\[[@#i]\])/g;
|
||||
var OPERATORS = /(===?|!==?|>=?|<=?|&&|\|\||[+\-\*\/%])/g;
|
||||
//extended (english) operators
|
||||
var EOPS = /(^|[^$\w])(and|or|not|is|isnot)([^$\w]|$)/g;
|
||||
var LEADING_SPACE = /^\s+/;
|
||||
var TRAILING_SPACE = /\s+$/;
|
||||
|
||||
var START_TOKEN = /\{\{\{|\{\{|\{%|\{#/;
|
||||
var TAGS = {
|
||||
'{{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}\}/,
|
||||
'{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}/,
|
||||
'{%': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?%\}/,
|
||||
'{#': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?#\}/
|
||||
};
|
||||
|
||||
var delimeters = {
|
||||
'{%': 'directive',
|
||||
'{{': 'output',
|
||||
'{#': 'comment'
|
||||
};
|
||||
|
||||
var operators = {
|
||||
and: '&&',
|
||||
or: '||',
|
||||
not: '!',
|
||||
is: '==',
|
||||
isnot: '!='
|
||||
};
|
||||
|
||||
var constants = {
|
||||
'true': true,
|
||||
'false': false,
|
||||
'null': null
|
||||
};
|
||||
|
||||
function Parser() {
|
||||
this.nest = [];
|
||||
this.compiled = [];
|
||||
this.childBlocks = 0;
|
||||
this.parentBlocks = 0;
|
||||
this.isSilent = false;
|
||||
}
|
||||
|
||||
Parser.prototype.push = function(line) {
|
||||
if (!this.isSilent) {
|
||||
this.compiled.push(line);
|
||||
}
|
||||
};
|
||||
|
||||
Parser.prototype.parse = function(src) {
|
||||
this.tokenize(src);
|
||||
return this.compiled;
|
||||
};
|
||||
|
||||
Parser.prototype.tokenize = function(src) {
|
||||
var lastEnd = 0,
|
||||
parser = this,
|
||||
trimLeading = false;
|
||||
matchAll(src, START_TOKEN, function(open, index, src) {
|
||||
//here we match the rest of the src against a regex for this tag
|
||||
var match = src.slice(index + open.length).match(TAGS[open]);
|
||||
match = (match ? match[0] : '');
|
||||
//here we sub out strings so we don't get false matches
|
||||
var simplified = match.replace(STRINGS, '@');
|
||||
//if we don't have a close tag or there is a nested open tag
|
||||
if (!match || ~simplified.indexOf(open)) {
|
||||
return index + 1;
|
||||
}
|
||||
var inner = match.slice(0, 0 - open.length);
|
||||
//check for white-space collapse syntax
|
||||
if (inner.charAt(0) === '-') var wsCollapseLeft = true;
|
||||
if (inner.slice(-1) === '-') var wsCollapseRight = true;
|
||||
inner = inner.replace(/^-|-$/g, '').trim();
|
||||
//if we're in raw mode and we are not looking at an "endraw" tag, move along
|
||||
if (parser.rawMode && (open + inner) !== '{%endraw') {
|
||||
return index + 1;
|
||||
}
|
||||
var text = src.slice(lastEnd, index);
|
||||
lastEnd = index + open.length + match.length;
|
||||
if (trimLeading) text = trimLeft(text);
|
||||
if (wsCollapseLeft) text = trimRight(text);
|
||||
if (wsCollapseRight) trimLeading = true;
|
||||
if (open === '{{{') {
|
||||
//liquid-style: make {{{x}}} => {{x|safe}}
|
||||
open = '{{';
|
||||
inner += '|safe';
|
||||
}
|
||||
parser.textHandler(text);
|
||||
parser.tokenHandler(open, inner);
|
||||
});
|
||||
var text = src.slice(lastEnd);
|
||||
if (trimLeading) text = trimLeft(text);
|
||||
this.textHandler(text);
|
||||
};
|
||||
|
||||
Parser.prototype.textHandler = function(text) {
|
||||
this.push('write(' + JSON.stringify(text) + ');');
|
||||
};
|
||||
|
||||
Parser.prototype.tokenHandler = function(open, inner) {
|
||||
var type = delimeters[open];
|
||||
if (type === 'directive') {
|
||||
this.compileTag(inner);
|
||||
} else if (type === 'output') {
|
||||
var extracted = this.extractEnt(inner, STRINGS, '@');
|
||||
//replace || operators with ~
|
||||
extracted.src = extracted.src.replace(/\|\|/g, '~').split('|');
|
||||
//put back || operators
|
||||
extracted.src = extracted.src.map(function(part) {
|
||||
return part.split('~').join('||');
|
||||
});
|
||||
var parts = this.injectEnt(extracted, '@');
|
||||
if (parts.length > 1) {
|
||||
var filters = parts.slice(1).map(this.parseFilter.bind(this));
|
||||
this.push('filter(' + this.parseExpr(parts[0]) + ',' + filters.join(',') + ');');
|
||||
} else {
|
||||
this.push('filter(' + this.parseExpr(parts[0]) + ');');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Parser.prototype.compileTag = function(str) {
|
||||
var directive = str.split(' ')[0];
|
||||
var handler = tagHandlers[directive];
|
||||
if (!handler) {
|
||||
throw new Error('Invalid tag: ' + str);
|
||||
}
|
||||
handler.call(this, str.slice(directive.length).trim());
|
||||
};
|
||||
|
||||
Parser.prototype.parseFilter = function(src) {
|
||||
src = src.trim();
|
||||
var match = src.match(/[:(]/);
|
||||
var i = match ? match.index : -1;
|
||||
if (i < 0) return JSON.stringify([src]);
|
||||
var name = src.slice(0, i);
|
||||
var args = src.charAt(i) === ':' ? src.slice(i + 1) : src.slice(i + 1, -1);
|
||||
args = this.parseExpr(args, {
|
||||
terms: true
|
||||
});
|
||||
return '[' + JSON.stringify(name) + ',' + args + ']';
|
||||
};
|
||||
|
||||
Parser.prototype.extractEnt = function(src, regex, placeholder) {
|
||||
var subs = [],
|
||||
isFunc = typeof placeholder == 'function';
|
||||
src = src.replace(regex, function(str) {
|
||||
var replacement = isFunc ? placeholder(str) : placeholder;
|
||||
if (replacement) {
|
||||
subs.push(str);
|
||||
return replacement;
|
||||
}
|
||||
return str;
|
||||
});
|
||||
return {
|
||||
src: src,
|
||||
subs: subs
|
||||
};
|
||||
};
|
||||
|
||||
Parser.prototype.injectEnt = function(extracted, placeholder) {
|
||||
var src = extracted.src,
|
||||
subs = extracted.subs,
|
||||
isArr = Array.isArray(src);
|
||||
var arr = (isArr) ? src : [src];
|
||||
var re = new RegExp('[' + placeholder + ']', 'g'),
|
||||
i = 0;
|
||||
arr.forEach(function(src, index) {
|
||||
arr[index] = src.replace(re, function() {
|
||||
return subs[i++];
|
||||
});
|
||||
});
|
||||
return isArr ? arr : arr[0];
|
||||
};
|
||||
|
||||
//replace complex literals without mistaking subscript notation with array literals
|
||||
Parser.prototype.replaceComplex = function(s) {
|
||||
var parsed = this.extractEnt(s, /i(\.i|\[[@#i]\])+/g, 'v');
|
||||
parsed.src = parsed.src.replace(NON_PRIMITIVES, '~');
|
||||
return this.injectEnt(parsed, 'v');
|
||||
};
|
||||
|
||||
//parse expression containing literals (including objects/arrays) and variables (including dot and subscript notation)
|
||||
//valid expressions: `a + 1 > b.c or c == null`, `a and b[1] != c`, `(a < b) or (c < d and e)`, 'a || [1]`
|
||||
Parser.prototype.parseExpr = function(src, opts) {
|
||||
opts = opts || {};
|
||||
//extract string literals -> @
|
||||
var parsed1 = this.extractEnt(src, STRINGS, '@');
|
||||
//note: this will catch {not: 1} and a.is; could we replace temporarily and then check adjacent chars?
|
||||
parsed1.src = parsed1.src.replace(EOPS, function(s, before, op, after) {
|
||||
return (op in operators) ? before + operators[op] + after : s;
|
||||
});
|
||||
//sub out non-string literals (numbers/true/false/null) -> #
|
||||
// the distinction is necessary because @ can be object identifiers, # cannot
|
||||
var parsed2 = this.extractEnt(parsed1.src, IDENTS_AND_NUMS, function(s) {
|
||||
return (s in constants || NUMBER.test(s)) ? '#' : null;
|
||||
});
|
||||
//sub out object/variable identifiers -> i
|
||||
var parsed3 = this.extractEnt(parsed2.src, IDENTIFIERS, 'i');
|
||||
//remove white-space
|
||||
parsed3.src = parsed3.src.replace(/\s+/g, '');
|
||||
|
||||
//the rest of this is simply to boil the expression down and check validity
|
||||
var simplified = parsed3.src;
|
||||
//sub out complex literals (objects/arrays) -> ~
|
||||
// the distinction is necessary because @ and # can be subscripts but ~ cannot
|
||||
while (simplified !== (simplified = this.replaceComplex(simplified)));
|
||||
//now @ represents strings, # represents other primitives and ~ represents non-primitives
|
||||
//replace complex variables (those with dot/subscript accessors) -> v
|
||||
while (simplified !== (simplified = simplified.replace(/i(\.i|\[[@#i]\])+/, 'v')));
|
||||
//empty subscript or complex variables in subscript, are not permitted
|
||||
simplified = simplified.replace(/[iv]\[v?\]/g, 'x');
|
||||
//sub in "i" for @ and # and ~ and v (now "i" represents all literals, variables and identifiers)
|
||||
simplified = simplified.replace(/[@#~v]/g, 'i');
|
||||
//sub out operators
|
||||
simplified = simplified.replace(OPERATORS, '%');
|
||||
//allow 'not' unary operator
|
||||
simplified = simplified.replace(/!+[i]/g, 'i');
|
||||
var terms = opts.terms ? simplified.split(',') : [simplified];
|
||||
terms.forEach(function(term) {
|
||||
//simplify logical grouping
|
||||
while (term !== (term = term.replace(/\(i(%i)*\)/g, 'i')));
|
||||
if (!term.match(/^i(%i)*/)) {
|
||||
throw new Error('Invalid expression: ' + src + " " + term);
|
||||
}
|
||||
});
|
||||
parsed3.src = parsed3.src.replace(VARIABLES, this.parseVar.bind(this));
|
||||
parsed2.src = this.injectEnt(parsed3, 'i');
|
||||
parsed1.src = this.injectEnt(parsed2, '#');
|
||||
return this.injectEnt(parsed1, '@');
|
||||
};
|
||||
|
||||
Parser.prototype.parseVar = function(src) {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var str = args.pop(),
|
||||
index = args.pop();
|
||||
//quote bare object identifiers (might be a reserved word like {while: 1})
|
||||
if (src === 'i' && str.charAt(index + 1) === ':') {
|
||||
return '"i"';
|
||||
}
|
||||
var parts = ['"i"'];
|
||||
src.replace(ACCESSOR, function(part) {
|
||||
if (part === '.i') {
|
||||
parts.push('"i"');
|
||||
} else if (part === '[i]') {
|
||||
parts.push('get("i")');
|
||||
} else {
|
||||
parts.push(part.slice(1, -1));
|
||||
}
|
||||
});
|
||||
return 'get(' + parts.join(',') + ')';
|
||||
};
|
||||
|
||||
//escapes a name to be used as a javascript identifier
|
||||
Parser.prototype.escName = function(str) {
|
||||
return str.replace(/\W/g, function(s) {
|
||||
return '$' + s.charCodeAt(0).toString(16);
|
||||
});
|
||||
};
|
||||
|
||||
Parser.prototype.parseQuoted = function(str) {
|
||||
if (str.charAt(0) === "'") {
|
||||
str = str.slice(1, -1).replace(/\\.|"/, function(s) {
|
||||
if (s === "\\'") return "'";
|
||||
return s.charAt(0) === '\\' ? s : ('\\' + s);
|
||||
});
|
||||
str = '"' + str + '"';
|
||||
}
|
||||
//todo: try/catch or deal with invalid characters (linebreaks, control characters)
|
||||
return JSON.parse(str);
|
||||
};
|
||||
|
||||
|
||||
//the context 'this' inside tagHandlers is the parser instance
|
||||
var tagHandlers = {
|
||||
'if': function(expr) {
|
||||
this.push('if (' + this.parseExpr(expr) + ') {');
|
||||
this.nest.unshift('if');
|
||||
},
|
||||
'else': function() {
|
||||
if (this.nest[0] === 'for') {
|
||||
this.push('}, function() {');
|
||||
} else {
|
||||
this.push('} else {');
|
||||
}
|
||||
},
|
||||
'elseif': function(expr) {
|
||||
this.push('} else if (' + this.parseExpr(expr) + ') {');
|
||||
},
|
||||
'endif': function() {
|
||||
this.nest.shift();
|
||||
this.push('}');
|
||||
},
|
||||
'for': function(str) {
|
||||
var i = str.indexOf(' in ');
|
||||
var name = str.slice(0, i).trim();
|
||||
var expr = str.slice(i + 4).trim();
|
||||
this.push('each(' + this.parseExpr(expr) + ',' + JSON.stringify(name) + ',function() {');
|
||||
this.nest.unshift('for');
|
||||
},
|
||||
'endfor': function() {
|
||||
this.nest.shift();
|
||||
this.push('});');
|
||||
},
|
||||
'raw': function() {
|
||||
this.rawMode = true;
|
||||
},
|
||||
'endraw': function() {
|
||||
this.rawMode = false;
|
||||
},
|
||||
'set': function(stmt) {
|
||||
var i = stmt.indexOf('=');
|
||||
var name = stmt.slice(0, i).trim();
|
||||
var expr = stmt.slice(i + 1).trim();
|
||||
this.push('set(' + JSON.stringify(name) + ',' + this.parseExpr(expr) + ');');
|
||||
},
|
||||
'block': function(name) {
|
||||
if (this.isParent) {
|
||||
++this.parentBlocks;
|
||||
var blockName = 'block_' + (this.escName(name) || this.parentBlocks);
|
||||
this.push('block(typeof ' + blockName + ' == "function" ? ' + blockName + ' : function() {');
|
||||
} else if (this.hasParent) {
|
||||
this.isSilent = false;
|
||||
++this.childBlocks;
|
||||
blockName = 'block_' + (this.escName(name) || this.childBlocks);
|
||||
this.push('function ' + blockName + '() {');
|
||||
}
|
||||
this.nest.unshift('block');
|
||||
},
|
||||
'endblock': function() {
|
||||
this.nest.shift();
|
||||
if (this.isParent) {
|
||||
this.push('});');
|
||||
} else if (this.hasParent) {
|
||||
this.push('}');
|
||||
this.isSilent = true;
|
||||
}
|
||||
},
|
||||
'extends': function(name) {
|
||||
name = this.parseQuoted(name);
|
||||
var parentSrc = this.readTemplateFile(name);
|
||||
this.isParent = true;
|
||||
this.tokenize(parentSrc);
|
||||
this.isParent = false;
|
||||
this.hasParent = true;
|
||||
//silence output until we enter a child block
|
||||
this.isSilent = true;
|
||||
},
|
||||
'include': function(name) {
|
||||
name = this.parseQuoted(name);
|
||||
var incSrc = this.readTemplateFile(name);
|
||||
this.isInclude = true;
|
||||
this.tokenize(incSrc);
|
||||
this.isInclude = false;
|
||||
}
|
||||
};
|
||||
|
||||
//liquid style
|
||||
tagHandlers.assign = tagHandlers.set;
|
||||
//python/django style
|
||||
tagHandlers.elif = tagHandlers.elseif;
|
||||
|
||||
var getRuntime = function runtime(data, opts) {
|
||||
var defaults = {
|
||||
autoEscape: 'toJson'
|
||||
};
|
||||
var _toString = Object.prototype.toString;
|
||||
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var getKeys = Object.keys || function(obj) {
|
||||
var keys = [];
|
||||
for (var n in obj)
|
||||
if (_hasOwnProperty.call(obj, n)) keys.push(n);
|
||||
return keys;
|
||||
};
|
||||
var isArray = Array.isArray || function(obj) {
|
||||
return _toString.call(obj) === '[object Array]';
|
||||
};
|
||||
var create = Object.create || function(obj) {
|
||||
function F() {}
|
||||
|
||||
F.prototype = obj;
|
||||
return new F();
|
||||
};
|
||||
var toString = function(val) {
|
||||
if (val == null) return '';
|
||||
return (typeof val.toString == 'function') ? val.toString() : _toString.call(val);
|
||||
};
|
||||
var extend = function(dest, src) {
|
||||
var keys = getKeys(src);
|
||||
for (var i = 0, len = keys.length; i < len; i++) {
|
||||
var key = keys[i];
|
||||
dest[key] = src[key];
|
||||
}
|
||||
return dest;
|
||||
};
|
||||
//get a value, lexically, starting in current context; a.b -> get("a","b")
|
||||
var get = function() {
|
||||
var val, n = arguments[0],
|
||||
c = stack.length;
|
||||
while (c--) {
|
||||
val = stack[c][n];
|
||||
if (typeof val != 'undefined') break;
|
||||
}
|
||||
for (var i = 1, len = arguments.length; i < len; i++) {
|
||||
if (val == null) continue;
|
||||
n = arguments[i];
|
||||
val = (_hasOwnProperty.call(val, n)) ? val[n] : (typeof val._get == 'function' ? (val[n] = val._get(n)) : null);
|
||||
}
|
||||
return (val == null) ? '' : val;
|
||||
};
|
||||
var set = function(n, val) {
|
||||
stack[stack.length - 1][n] = val;
|
||||
};
|
||||
var push = function(ctx) {
|
||||
stack.push(ctx || {});
|
||||
};
|
||||
var pop = function() {
|
||||
stack.pop();
|
||||
};
|
||||
var write = function(str) {
|
||||
output.push(str);
|
||||
};
|
||||
var filter = function(val) {
|
||||
for (var i = 1, len = arguments.length; i < len; i++) {
|
||||
var arr = arguments[i],
|
||||
name = arr[0],
|
||||
filter = filters[name];
|
||||
if (filter) {
|
||||
arr[0] = val;
|
||||
//now arr looks like [val, arg1, arg2]
|
||||
val = filter.apply(data, arr);
|
||||
} else {
|
||||
throw new Error('Invalid filter: ' + name);
|
||||
}
|
||||
}
|
||||
if (opts.autoEscape && name !== opts.autoEscape && name !== 'safe') {
|
||||
//auto escape if not explicitly safe or already escaped
|
||||
val = filters[opts.autoEscape].call(data, val);
|
||||
}
|
||||
output.push(val);
|
||||
};
|
||||
var each = function(obj, loopvar, fn1, fn2) {
|
||||
if (obj == null) return;
|
||||
var arr = isArray(obj) ? obj : getKeys(obj),
|
||||
len = arr.length;
|
||||
var ctx = {
|
||||
loop: {
|
||||
length: len,
|
||||
first: arr[0],
|
||||
last: arr[len - 1]
|
||||
}
|
||||
};
|
||||
push(ctx);
|
||||
for (var i = 0; i < len; i++) {
|
||||
extend(ctx.loop, {
|
||||
index: i + 1,
|
||||
index0: i
|
||||
});
|
||||
fn1(ctx[loopvar] = arr[i]);
|
||||
}
|
||||
if (len === 0 && fn2) fn2();
|
||||
pop();
|
||||
};
|
||||
var block = function(fn) {
|
||||
push();
|
||||
fn();
|
||||
pop();
|
||||
};
|
||||
var render = function() {
|
||||
return output.join('');
|
||||
};
|
||||
data = data || {};
|
||||
opts = extend(defaults, opts || {});
|
||||
var filters = extend({
|
||||
html: function(val) {
|
||||
return toString(val)
|
||||
.split('&').join('&')
|
||||
.split('<').join('<')
|
||||
.split('>').join('>')
|
||||
.split('"').join('"');
|
||||
},
|
||||
safe: function(val) {
|
||||
return val;
|
||||
},
|
||||
toJson: function(val) {
|
||||
if (typeof val === 'object') {
|
||||
return JSON.stringify(val);
|
||||
}
|
||||
return toString(val);
|
||||
}
|
||||
}, opts.filters || {});
|
||||
var stack = [create(data || {})],
|
||||
output = [];
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
push: push,
|
||||
pop: pop,
|
||||
write: write,
|
||||
filter: filter,
|
||||
each: each,
|
||||
block: block,
|
||||
render: render
|
||||
};
|
||||
};
|
||||
|
||||
var runtime;
|
||||
|
||||
jinja.compile = function(markup, opts) {
|
||||
opts = opts || {};
|
||||
var parser = new Parser();
|
||||
parser.readTemplateFile = this.readTemplateFile;
|
||||
var code = [];
|
||||
code.push('function render($) {');
|
||||
code.push('var get = $.get, set = $.set, push = $.push, pop = $.pop, write = $.write, filter = $.filter, each = $.each, block = $.block;');
|
||||
code.push.apply(code, parser.parse(markup));
|
||||
code.push('return $.render();');
|
||||
code.push('}');
|
||||
code = code.join('\n');
|
||||
if (opts.runtime === false) {
|
||||
var fn = new Function('data', 'options', 'return (' + code + ')(runtime(data, options))');
|
||||
} else {
|
||||
runtime = runtime || (runtime = getRuntime.toString());
|
||||
fn = new Function('data', 'options', 'return (' + code + ')((' + runtime + ')(data, options))');
|
||||
}
|
||||
return {
|
||||
render: fn
|
||||
};
|
||||
};
|
||||
|
||||
jinja.render = function(markup, data, opts) {
|
||||
var tmpl = jinja.compile(markup);
|
||||
return tmpl.render(data, opts);
|
||||
};
|
||||
|
||||
jinja.templateFiles = [];
|
||||
|
||||
jinja.readTemplateFile = function(name) {
|
||||
var templateFiles = this.templateFiles || [];
|
||||
var templateFile = templateFiles[name];
|
||||
if (templateFile == null) {
|
||||
throw new Error('Template file not found: ' + name);
|
||||
}
|
||||
return templateFile;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* Helpers
|
||||
*/
|
||||
|
||||
function trimLeft(str) {
|
||||
return str.replace(LEADING_SPACE, '');
|
||||
}
|
||||
|
||||
function trimRight(str) {
|
||||
return str.replace(TRAILING_SPACE, '');
|
||||
}
|
||||
|
||||
function matchAll(str, reg, fn) {
|
||||
//copy as global
|
||||
reg = new RegExp(reg.source, 'g' + (reg.ignoreCase ? 'i' : '') + (reg.multiline ? 'm' : ''));
|
||||
var match;
|
||||
while ((match = reg.exec(str))) {
|
||||
var result = fn(match[0], match.index, str);
|
||||
if (typeof result == 'number') {
|
||||
reg.lastIndex = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,99 @@
|
|||
var rule = {
|
||||
title: '360影视[官]',
|
||||
host: 'https://www.360kan.com',
|
||||
homeUrl: 'https://api.web.360kan.com/v1/rank?cat=2&size=9',
|
||||
detailUrl: 'https://api.web.360kan.com/v1/detail?cat=fyclass&id=fyid',
|
||||
searchUrl: 'https://api.so.360kan.com/index?force_v=1&kw=**&from=&pageno=fypage&v_ap=1&tab=all',
|
||||
url: 'https://api.web.360kan.com/v1/fyfilter&size=35&pageno=fypage&callback=',
|
||||
filterable: 1,
|
||||
filter_url: 'filter/list?catid=fyclass&rank={{fl.排序}}&cat={{fl.类型}}&year={{fl.年代}}&area={{fl.地区}}',
|
||||
filter: "H4sIAAAAAAAAA+2YS08jRxCA/4vPHGbMvrK3/IJcor1Eq4gDUqIlbLQhkVYrJINt1jYPA8vLa2MgYJtlMdhAiD1e4z8z3TP+Fxm7Xu0oGs2BQBRx81fVXV3V3VNV7XcxO/b8u3exV5NvY89jXrOjyouxsdj0xE+TJv82MfXr5HDgdCBW6eN+8nggDiA2O4bSrZLK1lCKQDov09TJNOoQeF7u2O2WaB4A6fTcqk5soQ6BbdbWVLtDNgHYZrYm6yHwvNy51z2heQA8r/JebCKwL5kd18mSLwCsmz/1ttZIB2DE5210JL4B8Lyt937WoXkA7Kdzorqb5CcA6dwv+/5ZA3UIbLO+5GfKZBOAfckf+Ye8LwCsW1lQ+QvSAbDNZE7PfySbAOJL1VtdYF+GwDbT126Hzg9h9uVACxdOlRpqyZELxxzpwi2kg/Fk/KjWL8jCbquuit1+taBb5zgCYXSEyjd0+4Y3ZAgc9GUjGEFBA/Dh3KyIDoF0/b1PokNgm9sVXTolmwCy3qa53qY5z19sig6B9+HmT9EhsG65oZwq6QAiH077yu0cGodDHOVw4lb8EcqGPw35uMjHTXlc5HFTbovcNuWWyC1Dbn/F8uCnIX8m8mem/KnIn5ryJyJ/Ysofi/yxKZd4bTNeW+K1zXhtidc247UlLtuMy5K4LDMuS+KyzLgsicuSuHTxSm9/Qs3UzPdvJyfejJy6XllXTl5OnXn01HUp4ffWvGRd7+yjtTcT069+eD0jSw2HuK3c6JCpiZnJX0ZGqfy2qnT985Qx6ufXP07PDBx7ORaL31aJ8o8TUhYQopSM0BQXUvbCykI/2VWtecoSAGxz7lol82QTIFIKXyi6ziLpADj2elUtUdlDiJL6Va6pettcvobAWbBS9s93KQsC8HqN5aBI0noAHPvuut6pUOxDMLdNnV0rp05LDmFEHdYwJNO6QBkfQQpj1b2hm4gQqZm4uyIGcFdFLKwYhRWxsOIXVqj0VkPl9tXuATc8xA9l56Hs/OfKzvitlZ1UU+UPvVqCPgtm/qJKe67jyAhh9ne17J1yKQHgbzWRlakIkrw+q2VuAAHYr7Oe38iQUwBmIk3tGYk0APZ2Y09fcbIE4HmFj+4XfikASE65dNurnFOGwL7MLakSvYQQjHzTPyRfECSHXasGrwfAulZLZ6iMIvC+NNZUqkf7AsBZtfvBn6dyiGC+ys7odYVgFBG9WZAiMgD5AC6Mlx5AlBebf/W716EYEHhes+t36WwRWLde1zkqsQj/j1dZ2AvqtBZcD9IB3EuSGeaPR7eVPwJP/ANODQBRGpdBaQ5uduXSKNXA/EXWN2Q2As/u5FW6RVMBojSFYV+WWljvF6gMIETJcHrlWBpwBNbNLXqZJukAWHfR0SnKcAjsS7ujk7Q1CDxv/0AVqQNFMNpPL8sxAMi1cKTpReCr7VyoOmU/BLaZ6gXfPdkE4AzQWw1WoQwAEOWBoRMn4icC60L+y/KKOV2gTIUQ0rjLvM8V4zEAILqyzvENBojSzntHN1JNEOQhtGg82AD+Vk+zdPTCUsP+UN2mMYKZRnzz4mtRI5Du2xeigt9Gj+ttnoz85zcikjfOktf5MPrfoCm6k3wclkv/scl/aNPvvU2XeG0z3n+3fQ9A4rXMeC2J1zLjtSReS+IdeQYg3FeBnv0LfL9z7fwYAAA=",
|
||||
filter_def: {},
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA'
|
||||
},
|
||||
timeout: 5000,
|
||||
class_name: '电视剧&电影&综艺&动漫',
|
||||
class_url: '2&1&3&4',
|
||||
limit: 5,
|
||||
multi: 1,
|
||||
searchable: 2,
|
||||
play_parse: true,
|
||||
lazy: 'js:input=input.split("?")[0];log(input);',
|
||||
// 疑似t4专用的
|
||||
// lazy:'js:input={parse: 1, playUrl: "", jx: 1, url: input.split("?")[0]}',
|
||||
// 手动调用解析请求json的url,此lazy不方便
|
||||
// lazy:'js:input="https://cache.json.icu/home/api?type=ys&uid=292796&key=fnoryABDEFJNPQV269&url="+input.split("?")[0];log(input);let html=JSON.parse(request(input));log(html);input=html.url||input',
|
||||
推荐: 'json:data;title;cover;comment;cat+ent_id;description',
|
||||
一级: 'json:data.movies;title;cover;pubdate;id;description',
|
||||
二级: '',
|
||||
二级: $js.toString(() => {
|
||||
let html = JSON.parse(fetch(input, fetch_params));
|
||||
let data = html.data;
|
||||
let tilte = data.title;
|
||||
let img = data.cdncover;
|
||||
let vod_type = data.moviecategory.join(",");
|
||||
let area = data.area.join(",");
|
||||
let director = data.director.join(",");
|
||||
let actor = data.actor.join(",");
|
||||
let content = data.description;
|
||||
let base_vod = {
|
||||
vod_id: input,
|
||||
vod_name: tilte,
|
||||
type_name: vod_type,
|
||||
vod_actor: actor,
|
||||
vod_director: director,
|
||||
vod_content: content,
|
||||
vod_remarks: area,
|
||||
vod_pic: urljoin2(input, img)
|
||||
};
|
||||
let delta = 50;
|
||||
let vod_play = {};
|
||||
let sites = data.playlink_sites;
|
||||
sites.forEach(function (site) {
|
||||
let playList = "";
|
||||
let vodItems = [];
|
||||
print(data)
|
||||
if (data.allupinfo) {
|
||||
let total = parseInt(data.allupinfo[site]);
|
||||
print(total)
|
||||
for (let j = 1; j < total; j += delta) {
|
||||
let end = Math.min(total, j + delta - 1);
|
||||
print(end)
|
||||
let url2 = buildUrl(input, { start: j, end: end, site: site });
|
||||
let vod_data = JSON.parse(fetch(url2), fetch_params).data;
|
||||
if (vod_data != null) {
|
||||
if (vod_data.allepidetail) {
|
||||
vod_data = vod_data.allepidetail[site];
|
||||
vod_data.forEach(function (item, index) {
|
||||
vodItems.push((item.playlink_num || "") + "$" + urlDeal(item.url || ""))
|
||||
})
|
||||
} else {
|
||||
vod_data = vod_data.defaultepisode;
|
||||
vod_data.forEach(function (item, index) {
|
||||
vodItems.push((item.period || "") + (item.name || "") + "$" + urlDeal(item.url) || "")
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let item = data.playlinksdetail[site];
|
||||
vodItems.push((item.sort || "") + "$" + urlDeal(item.default_url || ""))
|
||||
} if (vodItems.length > 0) {
|
||||
playList = vodItems.join("#")
|
||||
} if (playList.length < 1) {
|
||||
return
|
||||
} vod_play[site] = playList
|
||||
});
|
||||
let tabs = Object.keys(vod_play);
|
||||
let playUrls = []; for (let id in tabs) {
|
||||
print("id:" + id); playUrls.push(vod_play[tabs[id]])
|
||||
} if (tabs.length > 0) {
|
||||
let vod_play_from = tabs.join("$$$"); let vod_play_url = playUrls.join("$$$");
|
||||
base_vod.vod_play_from = vod_play_from;
|
||||
base_vod.vod_play_url = vod_play_url
|
||||
}
|
||||
VOD = base_vod;
|
||||
}),
|
||||
搜索: 'json:data.longData.rows;titleTxt||titlealias;cover;cat_name;cat_id+en_id;description',
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,12 @@
|
|||
Object.assign(muban.mxpro.二级, {
|
||||
tab_text: 'div--small&&Text',
|
||||
});
|
||||
var rule = {
|
||||
模板: 'mxpro',
|
||||
title: '剧圈圈',
|
||||
host: 'https://www.jqqzx.cc/',
|
||||
url: '/vodshow/id/fyclass/page/fypage.html',
|
||||
searchUrl: '/vodsearch**/page/fypage.html',
|
||||
class_parse: '.navbar-items li:gt(2):lt(8);a&&Text;a&&href;.*/(.*?)\.html',
|
||||
cate_exclude: '今日更新|热榜',
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
/**
|
||||
* 影视TV 弹幕支持
|
||||
* https://t.me/fongmi_offical/
|
||||
* https://github.com/FongMi/Release/tree/main/apk
|
||||
* Cookie设置
|
||||
* Cookie获取方法 https://ghproxy.net/https://raw.githubusercontent.com/UndCover/PyramidStore/main/list.md
|
||||
* Cookie设置方法1: DR-PY 后台管理界面
|
||||
* CMS后台管理 > 设置中心 > 环境变量 > {"bili_cookie":"XXXXXXX","vmid":"XXXXXX"} > 保存
|
||||
* Cookie设置方法2: 手动替换Cookie
|
||||
* 底下代码 headers的
|
||||
* "Cookie":"$bili_cookie"
|
||||
* 手动替换为
|
||||
* "Cookie":"将获取的Cookie黏贴在这"
|
||||
* 客户端长期Cookie设置教程:
|
||||
* 抓包哔哩手机端搜索access_key,取任意链接里的access_key和appkey在drpy环境变量中增加同名的环境变量即可
|
||||
* 此时哔哩.js这个解析可用于此源的解析线路用
|
||||
*/
|
||||
|
||||
var rule = {
|
||||
title:'哔哩影视[官]',
|
||||
host:'https://api.bilibili.com',
|
||||
url:'/fyclass-fypage&vmid=$vmid',
|
||||
detailUrl:'/pgc/view/web/season?season_id=fyid',
|
||||
filter_url:'fl={{fl}}',
|
||||
vmid获取教程:'登录后访问https://api.bilibili.com/x/web-interface/nav,搜索mid就是,cookie需要 bili_jct,DedeUserID,SESSDATA参数',
|
||||
searchUrl:'/x/web-interface/search/type?keyword=**&page=fypage&search_type=',
|
||||
searchable:1,
|
||||
filterable:1,
|
||||
quickSearch:0,
|
||||
headers:{
|
||||
'User-Agent':'PC_UA',
|
||||
"Referer": "https://www.bilibili.com",
|
||||
"Cookie":"http://127.0.0.1:9978/file/TVBox/bilibili.txt"
|
||||
},
|
||||
tab_order:['bilibili','B站'],//线路顺序,按里面的顺序优先,没写的依次排后面
|
||||
timeout:5000,
|
||||
class_name:'番剧&国创&电影&电视剧&纪录片&综艺&全部&追番&追剧&时间表',
|
||||
class_url:'1&4&2&5&3&7&全部&追番&追剧&时间表',
|
||||
filter:{"全部":[{"key":"tid","name":"分类","value":[{"n":"番剧","v":"1"},{"n":"国创","v":"4"},{"n":"电影","v":"2"},{"n":"电视剧","v":"5"},{"n":"记录片","v":"3"},{"n":"综艺","v":"7"}]},{"key":"order","name":"排序","value":[{"n":"播放数量","v":"2"},{"n":"更新时间","v":"0"},{"n":"最高评分","v":"4"},{"n":"弹幕数量","v":"1"},{"n":"追看人数","v":"3"},{"n":"开播时间","v":"5"},{"n":"上映时间","v":"6"}]},{"key":"season_status","name":"付费","value":[{"n":"全部","v":"-1"},{"n":"免费","v":"1"},{"n":"付费","v":"2%2C6"},{"n":"大会员","v":"4%2C6"}]}],"时间表":[{"key":"tid","name":"分类","value":[{"n":"番剧","v":"1"},{"n":"国创","v":"4"}]}]},
|
||||
play_parse:true,
|
||||
// play_json:[{re:'*', json:{jx:1, parse:0,header:JSON.stringify({"user-agent":"PC_UA"})}}],
|
||||
pagecount:{"1":1,"2":1,"3":1,"4":1,"5":1,"7":1,"时间表":1},
|
||||
lazy:'',
|
||||
limit:5,
|
||||
推荐:'',
|
||||
推荐:'js:let d=[];function get_result(url){let videos=[];let html=request(url);let jo=JSON.parse(html);if(jo["code"]===0){let vodList=jo.result?jo.result.list:jo.data.list;vodList.forEach(function(vod){let aid=(vod["season_id"]+"").trim();let title=vod["title"].trim();let img=vod["cover"].trim();let remark=vod.new_ep?vod["new_ep"]["index_show"]:vod["index_show"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})})}return videos}function get_rank(tid,pg){return get_result("https://api.bilibili.com/pgc/web/rank/list?season_type="+tid+"&pagesize=20&page="+pg+"&day=3")}function get_rank2(tid,pg){return get_result("https://api.bilibili.com/pgc/season/rank/web/list?season_type="+tid+"&pagesize=20&page="+pg+"&day=3")}function home_video(){let videos=get_rank(1).slice(0,5);[4,2,5,3,7].forEach(function(i){videos=videos.concat(get_rank2(i).slice(0,5))});return videos}VODS=home_video();',
|
||||
一级:'',
|
||||
一级:'js:let d=[];let vmid=input.split("vmid=")[1].split("&")[0];function get_result(url){let videos=[];let html=request(url);let jo=JSON.parse(html);if(jo["code"]===0){let vodList=jo.result?jo.result.list:jo.data.list;vodList.forEach(function(vod){let aid=(vod["season_id"]+"").trim();let title=vod["title"].trim();let img=vod["cover"].trim();let remark=vod.new_ep?vod["new_ep"]["index_show"]:vod["index_show"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})})}return videos}function get_rank(tid,pg){return get_result("https://api.bilibili.com/pgc/web/rank/list?season_type="+tid+"&pagesize=20&page="+pg+"&day=3")}function get_rank2(tid,pg){return get_result("https://api.bilibili.com/pgc/season/rank/web/list?season_type="+tid+"&pagesize=20&page="+pg+"&day=3")}function get_zhui(pg,mode){let url="https://api.bilibili.com/x/space/bangumi/follow/list?type="+mode+"&follow_status=0&pn="+pg+"&ps=10&vmid="+vmid;return get_result(url)}function get_all(tid,pg,order,season_status){let url="https://api.bilibili.com/pgc/season/index/result?order="+order+"&pagesize=20&type=1&season_type="+tid+"&page="+pg+"&season_status="+season_status;return get_result(url)}function get_timeline(tid,pg){let videos=[];let url="https://api.bilibili.com/pgc/web/timeline/v2?season_type="+tid+"&day_before=2&day_after=4";let html=request(url);let jo=JSON.parse(html);if(jo["code"]===0){let videos1=[];let vodList=jo.result.latest;vodList.forEach(function(vod){let aid=(vod["season_id"]+"").trim();let title=vod["title"].trim();let img=vod["cover"].trim();let remark=vod["pub_index"]+" "+vod["follows"].replace("系列","");videos1.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})});let videos2=[];for(let i=0;i<7;i++){let vodList=jo["result"]["timeline"][i]["episodes"];vodList.forEach(function(vod){if(vod["published"]+""==="0"){let aid=(vod["season_id"]+"").trim();let title=vod["title"].trim();let img=vod["cover"].trim();let date=vod["pub_ts"];let remark=date+" "+vod["pub_index"];videos2.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})}})}videos=videos2.concat(videos1)}return videos}function cate_filter(d,cookie){if(MY_CATE==="1"){return get_rank(MY_CATE,MY_PAGE)}else if(["2","3","4","5","7"].includes(MY_CATE)){return get_rank2(MY_CATE,MY_PAGE)}else if(MY_CATE==="全部"){let tid=MY_FL.tid||"1";let order=MY_FL.order||"2";let season_status=MY_FL.season_status||"-1";return get_all(tid,MY_PAGE,order,season_status)}else if(MY_CATE==="追番"){return get_zhui(MY_PAGE,1)}else if(MY_CATE==="追剧"){return get_zhui(MY_PAGE,2)}else if(MY_CATE==="时间表"){let tid=MY_FL.tid||"1";return get_timeline(tid,MY_PAGE)}else{return[]}}VODS=cate_filter();',
|
||||
二级:{
|
||||
is_json:true,
|
||||
title:".result.title;.result.share_sub_title",
|
||||
img:".result.cover",
|
||||
desc:".result.new_ep.desc;.result.publish.pub_time;.result.subtitle",
|
||||
content:".result.evaluate",
|
||||
tabs:"js:pdfa=jsp.pdfa;TABS=['B站']",
|
||||
lists:".result.episodes",
|
||||
list_text:'title',
|
||||
list_url:'cid',
|
||||
},
|
||||
二级:'',
|
||||
二级:'js:function zh(num){let p="";if(Number(num)>1e8){p=(num/1e8).toFixed(2)+"亿"}else if(Number(num)>1e4){p=(num/1e4).toFixed(2)+"万"}else{p=num}return p}let html=request(input);let jo=JSON.parse(html).result;let id=jo["season_id"];let title=jo["title"];let pic=jo["cover"];let areas=jo["areas"][0]["name"];let typeName=jo["share_sub_title"];let date=jo["publish"]["pub_time"].substr(0,4);let dec=jo["evaluate"];let remark=jo["new_ep"]["desc"];let stat=jo["stat"];let status="弹幕: "+zh(stat["danmakus"])+" 点赞: "+zh(stat["likes"])+" 投币: "+zh(stat["coins"])+" 追番追剧: "+zh(stat["favorites"]);let score=jo.hasOwnProperty("rating")?"评分: "+jo["rating"]["score"]+" "+jo["subtitle"]:"暂无评分"+" "+jo["subtitle"];let vod={vod_id:id,vod_name:title,vod_pic:pic,type_name:typeName,vod_year:date,vod_area:areas,vod_remarks:remark,vod_actor:status,vod_director:score,vod_content:dec};let ja=jo["episodes"];let playurls1=[];let playurls2=[];ja.forEach(function(tmpJo){let eid=tmpJo["id"];let cid=tmpJo["cid"];let link=tmpJo["link"];let part=tmpJo["title"].replace("#","-")+" "+tmpJo["long_title"];playurls1.push(part+"$"+eid+"_"+cid);playurls2.push(part+"$"+link)});let playUrl=playurls1.join("#")+"$$$"+playurls2.join("#");vod["vod_play_from"]="B站$$$bilibili";vod["vod_play_url"]=playUrl;VOD=vod;',
|
||||
搜索:'',
|
||||
搜索:'js:let url1=input+"media_bangumi";let url2=input+"media_ft";let html=request(url1);let msg=JSON.parse(html).message;if(msg!=="0"){VODS=[{vod_name:KEY+"➢"+msg,vod_id:"no_data",vod_remarks:"别点,缺少bili_cookie",vod_pic:"https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg"}]}else{let jo1=JSON.parse(html).data;html=request(url2);let jo2=JSON.parse(html).data;let videos=[];let vodList=[];if(jo1["numResults"]===0){vodList=jo2["result"]}else if(jo2["numResults"]===0){vodList=jo1["result"]}else{vodList=jo1["result"].concat(jo2["result"])}vodList.forEach(function(vod){let aid=(vod["season_id"]+"").trim();let title=KEY+"➢"+vod["title"].trim().replace(\'<em class="keyword">\',"").replace("</em>","");let img=vod["cover"].trim();let remark=vod["index_show"];videos.push({vod_id:aid,vod_name:title,vod_pic:img,vod_remarks:remark})});VODS=videos}',
|
||||
lazy:'',
|
||||
lazy:`js:
|
||||
if (/^http/.test(input)) {
|
||||
input = {
|
||||
jx: 1,
|
||||
url: input,
|
||||
parse: 0,
|
||||
header: JSON.stringify({
|
||||
"user-agent": "Mozilla/5.0"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
let ids = input.split("_");
|
||||
let dan = 'https://api.bilibili.com/x/v1/dm/list.so?oid=' + ids[1];
|
||||
let result = {};
|
||||
let url = "https://api.bilibili.com/pgc/player/web/playurl?qn=116&ep_id=" + ids[0] + "&cid=" + ids[1];
|
||||
let html = request(url);
|
||||
let jRoot = JSON.parse(html);
|
||||
if (jRoot["message"] !== "success") {
|
||||
print("需要大会员权限才能观看");
|
||||
input = ""
|
||||
} else {
|
||||
let jo = jRoot["result"];
|
||||
let ja = jo["durl"];
|
||||
let maxSize = -1;
|
||||
let position = -1;
|
||||
ja.forEach(function(tmpJo, i) {
|
||||
if (maxSize < Number(tmpJo["size"])) {
|
||||
maxSize = Number(tmpJo["size"]);
|
||||
position = i
|
||||
}
|
||||
});
|
||||
let url = "";
|
||||
if (ja.length > 0) {
|
||||
if (position === -1) {
|
||||
position = 0
|
||||
}
|
||||
url = ja[position]["url"]
|
||||
}
|
||||
result["parse"] = 0;
|
||||
result["playUrl"] = "";
|
||||
result["url"] = url;
|
||||
result["header"] = {
|
||||
Referer: "https://www.bilibili.com",
|
||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
|
||||
};
|
||||
result["contentType"] = "video/x-flv";
|
||||
result["danmaku"] = dan;
|
||||
input = result
|
||||
}
|
||||
}
|
||||
`,
|
||||
}
|
|
@ -0,0 +1,220 @@
|
|||
var rule = {
|
||||
author: '小虎斑',
|
||||
title: '小虎斑',
|
||||
|
||||
host: 'https://4k-av.com',
|
||||
hostJs: '',
|
||||
headers: {
|
||||
'User-Agent': 'IOS_UA'
|
||||
},
|
||||
编码: 'utf-8',
|
||||
timeout: 5000,
|
||||
homeUrl: '/',
|
||||
url: '/fyclassfyfilter/page-fypage.html[/fyclassfyfilter]',
|
||||
filter_url: '{{fl.class}}',
|
||||
detailUrl: '',
|
||||
searchUrl: '/s?q=**',
|
||||
searchable: 1,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
class_name: '电影&剧集',
|
||||
class_url: 'movie&tv',
|
||||
filter_def: {},
|
||||
play_parse: true,
|
||||
proxy_rule: $js.toString(() => {
|
||||
if (input) {
|
||||
//console.log(url);
|
||||
var url = `http://dm.sds11.top/jsdm.php?id=` + input.url;
|
||||
var htt = fetch(url);
|
||||
input = [200, "text/xml", htt];
|
||||
}
|
||||
}),
|
||||
lazy: $js.toString(() => {
|
||||
console.log(VOD.name);
|
||||
const parts = input.split('|');
|
||||
if (/m3u8|mp4/.test(parts[0])) {
|
||||
// const parts = input.split('|');
|
||||
input = {
|
||||
jx: 0,
|
||||
parse: 0,
|
||||
url: parts[0],
|
||||
danmaku: getProxyUrl() + '&url=' + getYoukuVideoUrl(VOD.vod_name, parts[1])
|
||||
};
|
||||
} else {
|
||||
let matchResult = request(parts[0]).match(/<source src="(.*?)"/);
|
||||
let kurl = matchResult ? matchResult[1] : '';
|
||||
if (kurl) {
|
||||
input = {
|
||||
jx: 0,
|
||||
parse: 0,
|
||||
url: kurl,
|
||||
danmaku: getProxyUrl() + '&url=' + getYoukuVideoUrl(VOD.vod_name, parts[1])
|
||||
};
|
||||
} else {
|
||||
input = {
|
||||
jx: 0,
|
||||
parse: 1,
|
||||
url: parts[0],
|
||||
danmaku: getProxyUrl() + '&url=' + getYoukuVideoUrl(VOD.vod_name, parts[1])
|
||||
};
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
limit: 9,
|
||||
double: false,
|
||||
推荐: '*',
|
||||
一级: '.NTMitem;a&&title;img&&src;.tags&&Text;a&&href',
|
||||
二级: `js:
|
||||
let khtml = request(input);
|
||||
VOD = {};
|
||||
VOD.vod_id = input;
|
||||
VOD.vod_name = pdfh(khtml, '#tophead h1&&title') || '未知';
|
||||
VOD.vod_name = VOD.vod_name.split(' ')[0];
|
||||
VOD.type_name = pdfh(khtml, '.tags--span&&Text');
|
||||
VOD.vod_pic = pdfh(khtml, '#MainContent_poster&&img&&src');
|
||||
VOD.vod_remarks = pdfh(khtml, '.videodetail&&label:eq(0)&&Text');
|
||||
VOD.vod_year = pdfh(khtml, '.videodetail&&a&&Text');
|
||||
VOD.vod_area = pdfh(khtml, '.videodetail&&label:eq(1)&&Text');
|
||||
VOD.vod_director = '未知';
|
||||
VOD.vod_actor = '未知';
|
||||
VOD.vod_content = pdfh(khtml, '.videodesc&&Text');
|
||||
VOD.vod_play_from = '四维空间';
|
||||
|
||||
let klists = [];
|
||||
let kcode = pdfa(khtml, 'ul#rtlist&&li');
|
||||
if ( kcode == 0) {
|
||||
kcode = pdfa(khtml, '#MainContent_poster&&a');
|
||||
kcode.forEach((kc) => {
|
||||
let kname = pdfh(kc, 'a&&title').replace('电影海报','');
|
||||
let khref = pdfh(kc, 'a&&href').replace('poster.jpg','');
|
||||
let klist = kname + '$' + khref + '|' + kname;;
|
||||
klists.push(klist);
|
||||
});
|
||||
VOD.vod_play_url = klists.join('#');
|
||||
} else {
|
||||
kcode;
|
||||
kcode.forEach((kc) => {
|
||||
let kname = pdfh(kc, 'span&&Text');
|
||||
let khref = pdfh(kc, 'img&&src').replace('screenshot.jpg','');
|
||||
let klist = kname + '$' + khref + '|' + kname;
|
||||
klists.push(klist);
|
||||
});
|
||||
VOD.vod_play_url = klists.join('#');
|
||||
}
|
||||
`,
|
||||
搜索: '*',
|
||||
|
||||
filter: {
|
||||
"tv": [{
|
||||
"key": "class",
|
||||
"name": "剧情",
|
||||
"value": [{
|
||||
"n": "全部",
|
||||
"v": ""
|
||||
}, {
|
||||
"n": "动作",
|
||||
"v": "/tag/动作"
|
||||
}, {
|
||||
"n": "剧情",
|
||||
"v": "/tag/剧情"
|
||||
}, {
|
||||
"n": "冒险",
|
||||
"v": "/tag/冒险"
|
||||
}, {
|
||||
"n": "喜剧",
|
||||
"v": "/tag/喜剧"
|
||||
}, {
|
||||
"n": "国产剧",
|
||||
"v": "/tag/国产剧"
|
||||
}, {
|
||||
"n": "恐怖",
|
||||
"v": "/tag/恐怖"
|
||||
}, {
|
||||
"n": "战争",
|
||||
"v": "/tag/战争"
|
||||
}, {
|
||||
"n": "科幻",
|
||||
"v": "/tag/科幻"
|
||||
}, {
|
||||
"n": "动画",
|
||||
"v": "/tag/动画"
|
||||
}, {
|
||||
"n": "韩剧",
|
||||
"v": "/tag/韩剧"
|
||||
}, {
|
||||
"n": "犯罪",
|
||||
"v": "/tag/犯罪"
|
||||
}, {
|
||||
"n": "纪录片",
|
||||
"v": "/tag/纪录片"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"key": "class",
|
||||
"name": "剧情",
|
||||
"value": [{
|
||||
"n": "全部",
|
||||
"v": ""
|
||||
}, {
|
||||
"n": "2024",
|
||||
"v": "/2024"
|
||||
}, {
|
||||
"n": "2023",
|
||||
"v": "/2023"
|
||||
}, {
|
||||
"n": "2022",
|
||||
"v": "/2022"
|
||||
}, {
|
||||
"n": "2021",
|
||||
"v": "/2021"
|
||||
}, {
|
||||
"n": "2020",
|
||||
"v": "/2020"
|
||||
}, {
|
||||
"n": "2019",
|
||||
"v": "/2019"
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
globalThis.getYoukuVideoUrl = function(wd, flag) {
|
||||
try {
|
||||
let api = `https://search.youku.com/api/search?pg=1&keyword=${encodeURIComponent(wd)}`;
|
||||
let response = request(api);
|
||||
let json = JSON.parse(response);
|
||||
// 获取 showId
|
||||
let showId = json.pageComponentList?.[0]?.commonData?.showId;
|
||||
if (!showId) {
|
||||
throw new Error('ShowId not found.');
|
||||
}
|
||||
// 第二个 API 请求,获取集数信息
|
||||
api = `https://search.youku.com/api/search?appScene=show_episode&showIds=${showId}`;
|
||||
response = request(api);
|
||||
// 匹配 flag 中的 "第x集" 或 "第x话"
|
||||
json = JSON.parse(response);
|
||||
let matches = String(flag).match(/第\s*(\d+)\s*集/) ||
|
||||
String(flag).match(/第\s*(\d+)\s*话/) ||
|
||||
String(flag).match(/(\d+)/);
|
||||
let url = '';
|
||||
if (matches && matches[1]) {
|
||||
// 获取对应集数的 URL 或 videoId
|
||||
let episodeIndex = parseInt(matches[1], 10) - 1;
|
||||
|
||||
url = json.serisesList?.[episodeIndex]?.url || json.serisesList?.[episodeIndex]?.videoId;
|
||||
}
|
||||
// 如果没有匹配到 flag,取第一个集数的 URL
|
||||
if (!url) {
|
||||
url = json.serisesList?.[0]?.url || json.serisesList?.[0]?.videoId;
|
||||
}
|
||||
// 如果 URL 不是以 http 开头,则拼接成完整的 Youku 视频地址
|
||||
if (url && !url.startsWith('http')) {
|
||||
url = `https://v.youku.com/v_show/id_${url}.html`;
|
||||
}
|
||||
return url || 'https://v.youku.com/';
|
||||
} catch {
|
||||
return 'https://v.youku.com/1111';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
var rule = {
|
||||
author: '小可乐/240525/第一版',
|
||||
title: '短剧天堂',
|
||||
host: 'https://duanjutt.tv',
|
||||
hostJs: '',
|
||||
headers: {'User-Agent': 'MOBILE_UA'},
|
||||
编码: 'utf-8',
|
||||
timeout: 5000,
|
||||
|
||||
homeUrl: '/',
|
||||
url: '/vodshow/fyfilter---fypage---.html',
|
||||
filter_url: '{{fl.cateId}}--{{fl.by}}---{{fl.letter}}',
|
||||
detailUrl: '',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 1,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
|
||||
class_name: '逆袭(1组)&都市(2组)&神医(3组)&脑洞(4组)',
|
||||
class_url: '1&20&25&30',
|
||||
filter_def: {
|
||||
1: {cateId: '1'},
|
||||
20: {cateId: '20'},
|
||||
25: {cateId: '25'},
|
||||
30: {cateId: '30'}
|
||||
},
|
||||
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: `js:
|
||||
var kcode = JSON.parse(request(input).match(/r player_.*?=(.*?)</)[1]);
|
||||
var kurl = kcode.url;
|
||||
input = {
|
||||
parse: 0, url: kurl, header: {"User-Agent": 'MOBILE_UA', "Referer":"https://duanjutt.tv"}
|
||||
}`,
|
||||
|
||||
limit: 9,
|
||||
double: false,
|
||||
推荐: '*;*;*;*;*',
|
||||
一级: '.myui-vodlist li;a&&title;a&&data-original;.text-right&&Text;a&&href',
|
||||
二级: {
|
||||
//名称;类型
|
||||
"title": "h1&&Text;.data:eq(0)&&a:eq(0)&&Text",
|
||||
//图片
|
||||
"img": ".picture&&img&&data-original",
|
||||
//主要描述;年份;地区;演员;导演
|
||||
"desc": ".data:eq(1)&&Text;.data:eq(0)&&a:eq(-1)&&Text;.data:eq(0)&&a:eq(-2)&&Text;.data--span:eq(2)&&Text;.data--span:eq(3)&&Text",
|
||||
//简介
|
||||
"content": ".data:eq(-1)&&Text",
|
||||
//线路数组
|
||||
"tabs": ".nav-tabs:has(li)&&a",
|
||||
//线路标题
|
||||
"tab_text": "body&&Text",
|
||||
//播放数组 选集列表
|
||||
"lists": ".myui-content__list:eq(#id)&&a",
|
||||
//选集标题
|
||||
"list_text": "body&&Text",
|
||||
//选集链接
|
||||
"list_url": "a&&href"
|
||||
},
|
||||
搜索: '.myui-vodlist__media .thumb;*;*;*;*',
|
||||
|
||||
filter: 'H4sIAAAAAAAAA+3WW0sbQRQH8Pf9GPOcQkxMrb55N97vV3xI7UJFa0HXgoRA2k1UqolWgrFQY1sVYiFewIY2i/hlMruTb+GG/ueMJW95C+zbzm92z8zD+XM2qrEm1ragRdmKvsXa2FLE0MNvmI+tRd7p7tq5s3huz11/iKxuurAQZWsuV+Lb4mehyu6iicV8/9jJfOPX38EBYvH10P64Bw6qt68eRfEzuJm4spNyMmfgEIstxnx0vVXdMPR1dT1eyNo3qZrr8WS+YuZRggq3A9pJOiAdJJ2QTpIuSBdJN6SbpAfSQ9IL6SXpg/SRhCFhkn5IP8kAZIBkEDJIMgQZIhmGDJOMQEZIRiGjJGOQMZJxyDjJBGSCZBIySTIFmSKZhkyTzEBmSGYhsyRzkDmSecg8if9FK6z69F+vvN5SfWKnj3jpoKZP7Gyxkr1HAWPZfVXWLZdK9m0GO2+XjQ3VzDcJvruNnY2l9+t69Vht0aexgL+eKJkP/M8nmRm/Skf6tmydi3zcNpNyVyWNH1yIc/LAc6/5SiXO3j1xLnPSm71sedlqmGyF6siW2+x835L9HlLZusyJu1/SX6rzi0lhPkhvUX64z69Ppb9SabtIla0d6a1enrw8NUqegvXMKpH4Yt/L+RFUs0r8PuFXj9Kf/Q+mE/yvzF9QTSnHLIgfcelqPvFksWwdS/fmk5enxsiTFnsC8UnvbkgNAAA='
|
||||
}
|
|
@ -0,0 +1,145 @@
|
|||
globalThis.h_ost = 'http://111.229.140.167:8762/';
|
||||
|
||||
globalThis.vod1 = function(t, pg) {
|
||||
let html1 = request(`${h_ost}apptov5/v1/vod/lists?type_id=${t}&area=&lang=&year=&order=time&type_name=&page=${pg}&pageSize=21`, {
|
||||
body: {},
|
||||
'method': 'GET'
|
||||
}, true);
|
||||
return html1;
|
||||
};
|
||||
//
|
||||
globalThis.svod1 = function(ids) {
|
||||
let html1 = request(`${h_ost}apptov5/v1/vod/getVod?id=${ids}`, {
|
||||
body: {},
|
||||
'method': 'GET'
|
||||
}, true);
|
||||
let bata = JSON.parse(html1).data;
|
||||
const data = {
|
||||
vod_id: ids,
|
||||
vod_name: bata.vod_name,
|
||||
vod_remarks: bata.vod_remarks,
|
||||
vod_actor: bata.vod_actor,
|
||||
vod_director: bata.vod_director,
|
||||
vod_content: bata.vod_content,
|
||||
vod_play_from: '',
|
||||
vod_play_url: ''
|
||||
};
|
||||
bata.vod_play_list.forEach((value, index) => {
|
||||
data.vod_play_from += value.player_info.show + '$$$';
|
||||
value.urls.forEach((v) => {
|
||||
data.vod_play_url += v.name + '$' + value.player_info.from + '|' + v.url + '#';
|
||||
});
|
||||
data.vod_play_url += '$$$';
|
||||
});
|
||||
return data;
|
||||
};
|
||||
//
|
||||
globalThis.ssvod1 = function(wd) {
|
||||
let html1 = request(h_ost + 'apptov5/v1/search/lists?wd=' + encodeURIComponent(wd) + '&page=1&type', {
|
||||
body: {},
|
||||
'method': 'GET'
|
||||
}, true);
|
||||
return html1;
|
||||
};
|
||||
|
||||
globalThis.jxx = function(bn, url) {
|
||||
let html1 = request('http://111.229.140.167:8762/apptov5/v2/parsing/proxy', {
|
||||
body: {
|
||||
'play_url': url,
|
||||
'key': bn
|
||||
},
|
||||
'method': 'POST'
|
||||
}, true);
|
||||
return JSON.parse(html1).data.url;
|
||||
if ("" == '104847347') {
|
||||
return JSON.parse(html1).data.url;
|
||||
} else {
|
||||
return 'https://mp4.ziyuan.wang/view.php/3c120366111dde9c318be64962b5684f.mp4';
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var rule = {
|
||||
title: '完美[软]',
|
||||
host: '',
|
||||
//homeTid: '',
|
||||
//homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||
detailUrl: 'fyid',
|
||||
searchUrl: '**',
|
||||
url: 'fyclass',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
class_name: '电影&电视剧&综艺&动漫',
|
||||
class_url: '1&2&3&4',
|
||||
timeout: 5000,
|
||||
filterable: 1,
|
||||
limit: 20,
|
||||
multi: 1,
|
||||
searchable: 2,
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: $js.toString(() => {
|
||||
const parts = input.split('|');
|
||||
let murl = jxx(parts[0], parts[1]);
|
||||
if (!murl.includes('http')) {
|
||||
input = {
|
||||
parse: 0,
|
||||
url: input,
|
||||
jx: 0,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + parts[1]
|
||||
};
|
||||
} else {
|
||||
input = {
|
||||
parse: 0,
|
||||
url: murl,
|
||||
jx: 0,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + parts[1]
|
||||
};
|
||||
}
|
||||
}),
|
||||
推荐: $js.toString(() => {
|
||||
let bata = JSON.parse(vod1(1, 1)).data.data;
|
||||
console.log(input);
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
})
|
||||
});
|
||||
setResult(d)
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
let bata = JSON.parse(vod1(input, MY_PAGE)).data.data;
|
||||
console.log(input);
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
})
|
||||
});
|
||||
setResult(d)
|
||||
}),
|
||||
二级: $js.toString(() => {
|
||||
VOD = svod1(input);
|
||||
}),
|
||||
搜索: $js.toString(() => {
|
||||
//console.log(input);
|
||||
// console.log(ssvod1(input).data.data);
|
||||
let bata = JSON.parse(ssvod1(input)).data.data;
|
||||
console.log(bata);
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
})
|
||||
});
|
||||
setResult(d)
|
||||
}),
|
||||
}
|
|
@ -0,0 +1,209 @@
|
|||
globalThis.h_ost = 'http://xxsp.xxmh.top/';
|
||||
var key = CryptoJS.enc.Base64.parse("MGY3OTFiZmMwZGM2MWU4Zg==");
|
||||
var iv = CryptoJS.enc.Base64.parse("MGY3OTFiZmMwZGM2MWU4Zg==");
|
||||
globalThis.AES_Decrypt = function(word) {
|
||||
try {
|
||||
var decrypt = CryptoJS.AES.decrypt(word, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7,
|
||||
});
|
||||
const decryptedText = decrypt.toString(CryptoJS.enc.Utf8);
|
||||
if (!decryptedText) {
|
||||
throw new Error("解密后的内容为空");
|
||||
}
|
||||
return decryptedText;
|
||||
} catch (e) {
|
||||
console.error("解密失败:", e);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
globalThis.AES_Encrypt = function(word) {
|
||||
var encrypted = CryptoJS.AES.encrypt(word, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
return encrypted.toString();
|
||||
};
|
||||
|
||||
globalThis.vod1 = function(t, pg) {
|
||||
let html1 = request(h_ost + 'api.php/getappapi.index/typeFilterVodList', {
|
||||
body: {
|
||||
area: '全部',
|
||||
year: '全部',
|
||||
type_id: t,
|
||||
page: pg,
|
||||
sort: '最新',
|
||||
lang: '全部',
|
||||
class: '全部'
|
||||
},
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
'method': 'POST'
|
||||
}, true);
|
||||
let html = JSON.parse(html1);
|
||||
return (AES_Decrypt(html.data));
|
||||
}
|
||||
globalThis.vodids = function(ids) {
|
||||
let html1 = fetch(h_ost + 'api.php/getappapi.index/vodDetail', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: {
|
||||
vod_id: ids,
|
||||
}
|
||||
});
|
||||
let html = JSON.parse(html1);
|
||||
const rdata = JSON.parse(AES_Decrypt(html.data));
|
||||
const data = {
|
||||
vod_id: ids,
|
||||
vod_name: rdata.vod.vod_name,
|
||||
vod_remarks: rdata.vod.vod_remarks,
|
||||
vod_actor: rdata.vod.vod_actor,
|
||||
vod_director: rdata.vod.vod_director,
|
||||
vod_content: rdata.vod.vod_content,
|
||||
vod_play_from: '',
|
||||
vod_play_url: ''
|
||||
};
|
||||
|
||||
rdata.vod_play_list.forEach((value) => {
|
||||
data.vod_play_from += value.player_info.show + '$$$';
|
||||
value.urls.forEach((v) => {
|
||||
data.vod_play_url += v.name + '$' + value.player_info.parse + '|' + v.url + '#';
|
||||
});
|
||||
data.vod_play_url += '$$$';
|
||||
});
|
||||
return data;
|
||||
}
|
||||
//搜索
|
||||
globalThis.ssvod = function(wd) {
|
||||
var html1 = fetch(h_ost + 'api.php/getappapi.index/searchList', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: {
|
||||
keywords: wd,
|
||||
typepage_id: 1,
|
||||
}
|
||||
});
|
||||
let html = JSON.parse(html1);
|
||||
return AES_Decrypt(html.data);
|
||||
}
|
||||
//解析
|
||||
globalThis.jxx = function(id, url) {
|
||||
/* if(""!=='104847347'){
|
||||
return 'https://mp4.ziyuan.wang/view.php/3c120366111dde9c318be64962b5684f.mp4';
|
||||
}*/
|
||||
if (id.startsWith('http')) {
|
||||
return {
|
||||
parse: 1,
|
||||
url: id + url,
|
||||
jx: 0,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
|
||||
};
|
||||
}
|
||||
if (id == 0) {
|
||||
return {
|
||||
parse: 0,
|
||||
url: id + url,
|
||||
jx: 1,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
|
||||
};
|
||||
}
|
||||
|
||||
let html1 = request(h_ost + 'api.php/getappapi.index/vodParse', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: {
|
||||
parse_api: id,
|
||||
url: AES_Encrypt(url),
|
||||
}
|
||||
});
|
||||
let html = AES_Decrypt(JSON.parse(html1).data);
|
||||
console.log(html);
|
||||
let decry = html.replace(/\n/g, '').replace(/\\/g, '');
|
||||
let matches = decry.match(/"url":"([^"]+)"/);
|
||||
if (!matches || matches[1] === null) {
|
||||
matches = decry.match(/"url": "([^"]+)"/);
|
||||
}
|
||||
return {
|
||||
parse: 0,
|
||||
url: matches[1],
|
||||
jx: 0,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
|
||||
};
|
||||
}
|
||||
|
||||
var rule = {
|
||||
title: '小虎斑|小熊',
|
||||
host: '',
|
||||
detailUrl: 'fyid',
|
||||
searchUrl: '**',
|
||||
url: 'fyclass',
|
||||
searchable: 2,
|
||||
quickSearch: 1,
|
||||
filterable: 0,
|
||||
class_name: '电影&电视剧&综艺&动漫',
|
||||
class_url: '1&2&3&4',
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
const parts = input.split('|');
|
||||
input = jxx(parts[0], parts[1]);
|
||||
}),
|
||||
推荐: $js.toString(() => {
|
||||
let data = vod1(0, 0);
|
||||
let bata = JSON.parse(data).recommend_list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
let data = vod1(input, MY_PAGE);
|
||||
let bata = JSON.parse(data).recommend_list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
二级: $js.toString(() => {
|
||||
console.log("调试信息2" + input);
|
||||
let data = vodids(input);
|
||||
//console.log(data);
|
||||
VOD = data;
|
||||
}),
|
||||
搜索: $js.toString(() => {
|
||||
let data = ssvod(input);
|
||||
let bata = JSON.parse(data).search_list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
});
|
||||
});
|
||||
// console.log(data);
|
||||
setResult(d);
|
||||
}),
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
var rule = {
|
||||
title: '小虎斑[资]',
|
||||
host: 'http://gy.xn--yet24tmq1a.xyz/',
|
||||
homeTid: '',
|
||||
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||
detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
|
||||
searchUrl: '/api.php/provide/vod/?ac=detail&wd=**&pg=fypage',
|
||||
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyclass',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
class_parse: 'json:class;',
|
||||
timeout: 5000,
|
||||
filterable: 1,
|
||||
limit: 20,
|
||||
multi: 1,
|
||||
searchable: 2,
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: $js.toString(() => {
|
||||
let json = request("http://154.9.252.167:666/tvbox/json/json.php/?key=104847347&url=" + input);
|
||||
let bata = JSON.parse(json);
|
||||
input = {
|
||||
parse: 0,
|
||||
url: bata.url,
|
||||
jx: 0,
|
||||
danmaku: bata.danmaku
|
||||
};
|
||||
}),
|
||||
推荐: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
||||
一级: $js.toString(() => {
|
||||
let bata = JSON.parse(request(input)).list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
})
|
||||
});
|
||||
setResult(d)
|
||||
}),
|
||||
二级: 'js:\n let html=request(input);\n html=JSON.parse(html);\n let data=html.list;\n VOD=data[0];',
|
||||
搜索: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
||||
}
|
|
@ -0,0 +1,209 @@
|
|||
globalThis.h_ost = 'http://118.107.41.134:35555/';
|
||||
var key = CryptoJS.enc.Base64.parse("ZGMzMjUwNmQ5YjVjYmY4ZQ==");
|
||||
var iv = CryptoJS.enc.Base64.parse("ZGMzMjUwNmQ5YjVjYmY4ZQ==");
|
||||
globalThis.AES_Decrypt = function(word) {
|
||||
try {
|
||||
var decrypt = CryptoJS.AES.decrypt(word, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7,
|
||||
});
|
||||
const decryptedText = decrypt.toString(CryptoJS.enc.Utf8);
|
||||
if (!decryptedText) {
|
||||
throw new Error("解密后的内容为空");
|
||||
}
|
||||
return decryptedText;
|
||||
} catch (e) {
|
||||
console.error("解密失败:", e);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
globalThis.AES_Encrypt = function(word) {
|
||||
var encrypted = CryptoJS.AES.encrypt(word, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
return encrypted.toString();
|
||||
};
|
||||
|
||||
globalThis.vod1 = function(t, pg) {
|
||||
let html1 = request(h_ost + 'api.php/getappapi.index/typeFilterVodList', {
|
||||
body: {
|
||||
area: '全部',
|
||||
year: '全部',
|
||||
type_id: t,
|
||||
page: pg,
|
||||
sort: '最新',
|
||||
lang: '全部',
|
||||
class: '全部'
|
||||
},
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
'method': 'POST'
|
||||
}, true);
|
||||
let html = JSON.parse(html1);
|
||||
return (AES_Decrypt(html.data));
|
||||
}
|
||||
globalThis.vodids = function(ids) {
|
||||
let html1 = fetch(h_ost + 'api.php/getappapi.index/vodDetail', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: {
|
||||
vod_id: ids,
|
||||
}
|
||||
});
|
||||
let html = JSON.parse(html1);
|
||||
const rdata = JSON.parse(AES_Decrypt(html.data));
|
||||
const data = {
|
||||
vod_id: ids,
|
||||
vod_name: rdata.vod.vod_name,
|
||||
vod_remarks: rdata.vod.vod_remarks,
|
||||
vod_actor: rdata.vod.vod_actor,
|
||||
vod_director: rdata.vod.vod_director,
|
||||
vod_content: rdata.vod.vod_content,
|
||||
vod_play_from: '',
|
||||
vod_play_url: ''
|
||||
};
|
||||
|
||||
rdata.vod_play_list.forEach((value) => {
|
||||
data.vod_play_from += value.player_info.show + '$$$';
|
||||
value.urls.forEach((v) => {
|
||||
data.vod_play_url += v.name + '$' + value.player_info.parse + '|' + v.url + '#';
|
||||
});
|
||||
data.vod_play_url += '$$$';
|
||||
});
|
||||
return data;
|
||||
}
|
||||
//搜索
|
||||
globalThis.ssvod = function(wd) {
|
||||
var html1 = fetch(h_ost + 'api.php/getappapi.index/searchList', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: {
|
||||
keywords: wd,
|
||||
typepage_id: 1,
|
||||
}
|
||||
});
|
||||
let html = JSON.parse(html1);
|
||||
return AES_Decrypt(html.data);
|
||||
}
|
||||
//解析
|
||||
globalThis.jxx = function(id, url) {
|
||||
/* if(""!=='104847347'){
|
||||
return 'https://mp4.ziyuan.wang/view.php/3c120366111dde9c318be64962b5684f.mp4';
|
||||
}*/
|
||||
if (id.startsWith('http')) {
|
||||
return {
|
||||
parse: 1,
|
||||
url: id + url,
|
||||
jx: 0,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
|
||||
};
|
||||
}
|
||||
if (id == 0) {
|
||||
return {
|
||||
parse: 0,
|
||||
url: id + url,
|
||||
jx: 1,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
|
||||
};
|
||||
}
|
||||
|
||||
let html1 = request(h_ost + 'api.php/getappapi.index/vodParse', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: {
|
||||
parse_api: id,
|
||||
url: AES_Encrypt(url),
|
||||
}
|
||||
});
|
||||
let html = AES_Decrypt(JSON.parse(html1).data);
|
||||
console.log(html);
|
||||
let decry = html.replace(/\n/g, '').replace(/\\/g, '');
|
||||
let matches = decry.match(/"url":"([^"]+)"/);
|
||||
if (!matches || matches[1] === null) {
|
||||
matches = decry.match(/"url": "([^"]+)"/);
|
||||
}
|
||||
return {
|
||||
parse: 0,
|
||||
url: matches[1],
|
||||
jx: 0,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + matches[1]
|
||||
};
|
||||
}
|
||||
|
||||
var rule = {
|
||||
title: '巨人',
|
||||
host: '',
|
||||
detailUrl: 'fyid',
|
||||
searchUrl: '**',
|
||||
url: 'fyclass',
|
||||
searchable: 2,
|
||||
quickSearch: 1,
|
||||
filterable: 0,
|
||||
class_name: '电影&电视剧&综艺&动漫',
|
||||
class_url: '1&2&3&4',
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
const parts = input.split('|');
|
||||
input = jxx(parts[0], parts[1]);
|
||||
}),
|
||||
推荐: $js.toString(() => {
|
||||
let data = vod1(0, 0);
|
||||
let bata = JSON.parse(data).recommend_list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
let data = vod1(input, MY_PAGE);
|
||||
let bata = JSON.parse(data).recommend_list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
二级: $js.toString(() => {
|
||||
console.log("调试信息2" + input);
|
||||
let data = vodids(input);
|
||||
//console.log(data);
|
||||
VOD = data;
|
||||
}),
|
||||
搜索: $js.toString(() => {
|
||||
let data = ssvod(input);
|
||||
let bata = JSON.parse(data).search_list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
});
|
||||
});
|
||||
// console.log(data);
|
||||
setResult(d);
|
||||
}),
|
||||
}
|
|
@ -0,0 +1,210 @@
|
|||
globalThis.h_ost = 'http://124.223.11.25:11024/';
|
||||
var key = CryptoJS.enc.Base64.parse("NjYyYjIxYWZlM2Y2YWRmMw==");
|
||||
var iv = CryptoJS.enc.Base64.parse("NjYyYjIxYWZlM2Y2YWRmMw==");
|
||||
globalThis.AES_Decrypt = function(word) {
|
||||
try {
|
||||
var decrypt = CryptoJS.AES.decrypt(word, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7,
|
||||
});
|
||||
const decryptedText = decrypt.toString(CryptoJS.enc.Utf8);
|
||||
if (!decryptedText) {
|
||||
throw new Error("解密后的内容为空");
|
||||
}
|
||||
return decryptedText;
|
||||
} catch (e) {
|
||||
console.error("解密失败:", e);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
globalThis.AES_Encrypt = function(word) {
|
||||
var encrypted = CryptoJS.AES.encrypt(word, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
return encrypted.toString();
|
||||
};
|
||||
|
||||
globalThis.vod1 = function(t, pg) {
|
||||
let html1 = request(h_ost + 'api.php/getappapi.index/typeFilterVodList', {
|
||||
body: {
|
||||
area: '全部',
|
||||
year: '全部',
|
||||
type_id: t,
|
||||
page: pg,
|
||||
sort: '最新',
|
||||
lang: '全部',
|
||||
class: '全部'
|
||||
},
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
'method': 'POST'
|
||||
}, true);
|
||||
let html = JSON.parse(html1);
|
||||
return (AES_Decrypt(html.data));
|
||||
}
|
||||
globalThis.vodids = function(ids) {
|
||||
let html1 = fetch(h_ost + 'api.php/getappapi.index/vodDetail', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: {
|
||||
vod_id: ids,
|
||||
}
|
||||
});
|
||||
let html = JSON.parse(html1);
|
||||
const rdata = JSON.parse(AES_Decrypt(html.data));
|
||||
const data = {
|
||||
vod_id: ids,
|
||||
vod_name: rdata.vod.vod_name,
|
||||
vod_remarks: rdata.vod.vod_remarks,
|
||||
vod_actor: rdata.vod.vod_actor,
|
||||
vod_director: rdata.vod.vod_director,
|
||||
vod_content: rdata.vod.vod_content,
|
||||
vod_play_from: '',
|
||||
vod_play_url: ''
|
||||
};
|
||||
|
||||
rdata.vod_play_list.forEach((value) => {
|
||||
data.vod_play_from += value.player_info.show + '$$$';
|
||||
value.urls.forEach((v) => {
|
||||
data.vod_play_url += v.name + '$' + value.player_info.parse + '|' + v.url + '#';
|
||||
});
|
||||
data.vod_play_url += '$$$';
|
||||
});
|
||||
return data;
|
||||
}
|
||||
//搜索
|
||||
globalThis.ssvod = function(wd) {
|
||||
var html1 = fetch(h_ost + 'api.php/getappapi.index/searchList', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: {
|
||||
keywords: wd,
|
||||
typepage_id: 1,
|
||||
}
|
||||
});
|
||||
let html = JSON.parse(html1);
|
||||
return AES_Decrypt(html.data);
|
||||
}
|
||||
//解析
|
||||
globalThis.jxx = function(id, url) {
|
||||
/* if(""!=='104847347'){
|
||||
return 'https://mp4.ziyuan.wang/view.php/3c120366111dde9c318be64962b5684f.mp4';
|
||||
}*/
|
||||
if (id.startsWith('http')) {
|
||||
let purl = JSON.parse(request(id + url)).url;
|
||||
return {
|
||||
parse: 0,
|
||||
url: purl,
|
||||
jx: 0,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
|
||||
};
|
||||
}
|
||||
if (id == 0) {
|
||||
return {
|
||||
parse: 0,
|
||||
url: id + url,
|
||||
jx: 1,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
|
||||
};
|
||||
}
|
||||
|
||||
let html1 = request(h_ost + 'api.php/getappapi.index/vodParse', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/3.14.9',
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: {
|
||||
parse_api: id,
|
||||
url: AES_Encrypt(url),
|
||||
}
|
||||
});
|
||||
let html = AES_Decrypt(JSON.parse(html1).data);
|
||||
console.log(html);
|
||||
let decry = html.replace(/\n/g, '').replace(/\\/g, '');
|
||||
let matches = decry.match(/"url":"([^"]+)"/);
|
||||
if (!matches || matches[1] === null) {
|
||||
matches = decry.match(/"url": "([^"]+)"/);
|
||||
}
|
||||
return {
|
||||
parse: 0,
|
||||
url: matches[1],
|
||||
jx: 0,
|
||||
danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
|
||||
};
|
||||
}
|
||||
|
||||
var rule = {
|
||||
title: '小虎斑|悠悠',
|
||||
host: '',
|
||||
detailUrl: 'fyid',
|
||||
searchUrl: '**',
|
||||
url: 'fyclass',
|
||||
searchable: 2,
|
||||
quickSearch: 1,
|
||||
filterable: 0,
|
||||
class_name: '电影&电视剧&综艺&动漫',
|
||||
class_url: '1&2&3&4',
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
const parts = input.split('|');
|
||||
input = jxx(parts[0], parts[1]);
|
||||
}),
|
||||
推荐: $js.toString(() => {
|
||||
let data = vod1(0, 0);
|
||||
let bata = JSON.parse(data).recommend_list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
let data = vod1(input, MY_PAGE);
|
||||
let bata = JSON.parse(data).recommend_list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
二级: $js.toString(() => {
|
||||
console.log("调试信息2" + input);
|
||||
let data = vodids(input);
|
||||
//console.log(data);
|
||||
VOD = data;
|
||||
}),
|
||||
搜索: $js.toString(() => {
|
||||
let data = ssvod(input);
|
||||
let bata = JSON.parse(data).search_list;
|
||||
bata.forEach(it => {
|
||||
d.push({
|
||||
url: it.vod_id,
|
||||
title: it.vod_name,
|
||||
img: it.vod_pic,
|
||||
desc: it.vod_remarks
|
||||
});
|
||||
});
|
||||
// console.log(data);
|
||||
setResult(d);
|
||||
}),
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,429 @@
|
|||
if (typeof Object.assign !== 'function') {
|
||||
Object.assign = function() {
|
||||
let target = arguments[0];
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
let source = arguments[i];
|
||||
for (let key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
}
|
||||
|
||||
// 通用免嗅探播放
|
||||
let common_lazy = `js:
|
||||
let html = request(input);
|
||||
let hconf = html.match(/r player_.*?=(.*?)</)[1];
|
||||
let json = JSON5.parse(hconf);
|
||||
let url = json.url;
|
||||
if (json.encrypt == '1') {
|
||||
url = unescape(url);
|
||||
} else if (json.encrypt == '2') {
|
||||
url = unescape(base64Decode(url));
|
||||
}
|
||||
if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {
|
||||
input = {
|
||||
parse: 0,
|
||||
jx: 0,
|
||||
url: url,
|
||||
};
|
||||
} else {
|
||||
input;
|
||||
}`;
|
||||
// 默认嗅探播放
|
||||
|
||||
let def_lazy = `js:
|
||||
input = { parse: 1, url: input, js: '' };`;
|
||||
// 采集站播放
|
||||
|
||||
let cj_lazy = `js:
|
||||
if (/\\.(m3u8|mp4)/.test(input)) {
|
||||
input = { parse: 0, url: input };
|
||||
} else {
|
||||
if (rule.parse_url.startsWith('json:')) {
|
||||
let purl = rule.parse_url.replace('json:', '') + input;
|
||||
let html = request(purl);
|
||||
let json = JSON.parse(html);
|
||||
if (json.url) {
|
||||
input = { parse: 0, url: json.url };
|
||||
}
|
||||
} else {
|
||||
input = rule.parse_url + input;
|
||||
}
|
||||
}`;
|
||||
|
||||
function getMubans() {
|
||||
const mubanDict = { // 模板字典
|
||||
mx: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/vodshow/fyclass--------fypage---/',
|
||||
searchUrl: '/vodsearch/**----------fypage---/',
|
||||
class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: '.cbox_list;*;*;*;*;*',
|
||||
一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h2&&Text;.content_detail:eq(1)&&li&&a:eq(2)&&Text',
|
||||
img: '.vodlist_thumb&&data-original',
|
||||
desc: '.content_detail:eq(1)&&li:eq(1)&&Text;.content_detail:eq(1)&&li&&a&&Text;.content_detail:eq(1)&&li&&a:eq(1)&&Text;.content_detail:eq(1)&&li:eq(2)&&Text;.content_detail:eq(1)&&li:eq(3)&&Text',
|
||||
content: '.content_desc&&span&&Text',
|
||||
tabs: '.play_source_tab&&a',
|
||||
lists: '.content_playlist:eq(#id) li',
|
||||
},
|
||||
搜索: '*',
|
||||
},
|
||||
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(0):lt(10);a&&Text;a&&href;/(\\d+)',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.module-info-tag-link:eq(-1)&&Text',
|
||||
img: '.lazyload&&data-original||data-src||src',
|
||||
desc: '.module-info-item:eq(-2)&&Text;.module-info-tag-link&&Text;.module-info-tag-link:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(1)&&Text',
|
||||
content: '.module-info-introduction&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-play-list:eq(#id) a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '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: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||
一级: '.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(3)&&Text;.tag-link:eq(2)&&Text;.tag-link:eq(1)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(0)&&Text',
|
||||
content: '.vod_content&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-player-list:eq(#id)&&.scroll-content&&a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '.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(7);a&&Text;a&&href;/(\\d+).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.myui-content__detail .title--span&&Text;.myui-content__detail p.data:eq(3)&&Text',
|
||||
img: '.myui-content__thumb .lazyload&&data-original',
|
||||
desc: '.myui-content__detail p.otherbox&&Text;.year&&Text;.myui-content__detail p.data:eq(4)&&Text;.myui-content__detail p.data:eq(2)&&Text;.myui-content__detail p.data:eq(0)&&Text',
|
||||
content: '.content&&Text',
|
||||
tabs: '.myui-panel__head&&li',
|
||||
// tabs: '.nav-tabs&&li',
|
||||
lists: '.myui-content__list:eq(#id) li',
|
||||
},
|
||||
搜索: '#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&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;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.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)&&a&&Text',
|
||||
title1: '.stui-content__detail .title&&Text;.stui-content__detail&&p&&Text',
|
||||
img: '.stui-content__thumb .lazyload&&data-original',
|
||||
desc: '.stui-content__detail p&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(2)&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text;.stui-content__detail p:eq(1)&&Text',
|
||||
desc1: '.stui-content__detail p:eq(4)&&Text;;;.stui-content__detail p:eq(1)&&Text',
|
||||
content: '.detail&&Text',
|
||||
tabs: '.stui-pannel__head h3',
|
||||
tabs1: '.stui-vodlist__head h3',
|
||||
lists: '.stui-content__playlist:eq(#id) li',
|
||||
},
|
||||
搜索: 'ul.stui-vodlist__media,ul.stui-vodlist,#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||
},
|
||||
默认: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '',
|
||||
searchUrl: '',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
filter: '',
|
||||
filter_url: '',
|
||||
filter_def: {},
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: '#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||
cate_exclude: '',
|
||||
play_parse: true,
|
||||
lazy: def_lazy,
|
||||
double: true,
|
||||
推荐: '列表1;列表2;标题;图片;描述;链接;详情',
|
||||
一级: '列表;标题;图片;描述;链接;详情',
|
||||
二级: {
|
||||
title: 'vod_name;vod_type',
|
||||
img: '图片链接',
|
||||
desc: '主要信息;年代;地区;演员;导演',
|
||||
content: '简介',
|
||||
tabs: '',
|
||||
lists: 'xx:eq(#id)&&a',
|
||||
tab_text: 'body&&Text',
|
||||
list_text: 'body&&Text',
|
||||
list_url: 'a&&href',
|
||||
},
|
||||
搜索: '列表;标题;图片;描述;链接;详情',
|
||||
},
|
||||
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;a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||
一级: '.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: common_lazy,
|
||||
double: true,
|
||||
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.hl-dc-title&&Text;.hl-dc-content&&li:eq(6)&&Text',
|
||||
img: '.hl-lazy&&data-original',
|
||||
desc: '.hl-dc-content&&li:eq(10)&&Text;.hl-dc-content&&li:eq(4)&&Text;.hl-dc-content&&li:eq(5)&&Text;.hl-dc-content&&li:eq(2)&&Text;.hl-dc-content&&li:eq(3)&&Text',
|
||||
content: '.hl-content-text&&Text',
|
||||
tabs: '.hl-tabs&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
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: common_lazy,
|
||||
double: true,
|
||||
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
||||
一级: '.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: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||
一级: '.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=**&limit=50',
|
||||
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',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
推荐: '.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(2)--strong&&Text',
|
||||
img: '.detail-pic&&data-original',
|
||||
desc: '.slide-info-remarks&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(1)--strong&&Text;.info-parameter&&ul&&li:eq(3)&&Text',
|
||||
content: '#height_limit&&Text',
|
||||
tabs: '.anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
lists: '.anthology-list-box:eq(#id) li',
|
||||
},
|
||||
搜索: 'json:list;name;pic;;id',
|
||||
},
|
||||
采集1: {
|
||||
title: '',
|
||||
host: '',
|
||||
homeTid: '13',
|
||||
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||
detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
|
||||
searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
|
||||
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyclass',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA'
|
||||
},
|
||||
timeout: 5000, // class_name: '电影&电视剧&综艺&动漫',
|
||||
// class_url: '1&2&3&4',
|
||||
// class_parse:'js:let html=request(input);input=JSON.parse(html).class;',
|
||||
class_parse: 'json:class;',
|
||||
limit: 20,
|
||||
multi: 1,
|
||||
searchable: 2, //是否启用全局搜索,
|
||||
quickSearch: 1, //是否启用快速搜索,
|
||||
filterable: 0, //是否启用分类筛选,
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: cj_lazy,
|
||||
推荐: '*',
|
||||
一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
||||
二级: `js:
|
||||
let html=request(input);
|
||||
html=JSON.parse(html);
|
||||
let data=html.list;
|
||||
VOD=data[0];`,
|
||||
搜索: '*',
|
||||
},
|
||||
};
|
||||
return JSON.parse(JSON.stringify(mubanDict));
|
||||
}
|
||||
|
||||
var mubanDict = getMubans();
|
||||
var muban = getMubans();
|
||||
export default {
|
||||
muban,
|
||||
getMubans
|
||||
};
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,189 @@
|
|||
// 注入全局方法 (仅支持tvbox的js1以及c#版drpy的js0,暂不支持drpy官方py版的js0)
|
||||
// 注入全局方法 (仅支持tvbox的js1以及c#版drpy的js0,暂不支持drpy官方py版的js0)
|
||||
// 注入全局方法 (仅支持tvbox的js1以及c#版drpy的js0,暂不支持drpy官方py版的js0)
|
||||
globalThis.getHeaders= function(input){
|
||||
let t = new Date().getTime().toString();
|
||||
let headers = {
|
||||
'version_name': '1.0.6',
|
||||
'version_code': '6',
|
||||
'package_name': 'com.app.nanguatv',
|
||||
'sign': md5('c431ea542cee9679#uBFszdEM0oL0JRn@' + t).toUpperCase(),
|
||||
'imei': 'c431ea542cee9679',
|
||||
'timeMillis': t,
|
||||
'User-Agent': 'okhttp/4.6.0'
|
||||
};
|
||||
return headers
|
||||
}
|
||||
|
||||
var rule = {
|
||||
title:'畅梦影视',
|
||||
host:'http://ys.changmengyun.com',
|
||||
homeUrl:'/api.php/provide/vod_rank?app=ylys&sort_type=month&imei=c431ea542cee9679&id=2&page=1',
|
||||
url:'/api.php/provide/vod_list?app=ylys&id=fyclassfyfilter&page=fypage&imei=c431ea542cee9679',
|
||||
detailUrl:'/api.php/provide/vod_detail?app=ylys&imei=c431ea542cee9679&id=fyid',
|
||||
searchUrl:'/api.php/provide/search_result_more?app=ylys&video_name=**&pageSize=20&tid=0&imei=c431ea542cee9679&page=fypage',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
filterable:1,
|
||||
filter_url:'&area={{fl.area}}&year={{fl.year}}&type={{fl.class}}&total={{fl.total or "状态"}}&order={{fl.by or "新上线"}}',
|
||||
filter:{
|
||||
"2":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"国产剧","v":"国产剧"},{"n":"港台剧","v":"港台剧"}]},{"key":"area","name":"地区","value":[{"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":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"好评榜","v":"好评榜"},{"n":"新上线","v":"新上线"}]}],
|
||||
"1":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"动作片","v":"动作片"},{"n":"喜剧片","v":"喜剧片"},{"n":"爱情片","v":"爱情片"},{"n":"科幻片","v":"科幻片"},{"n":"恐怖片","v":"恐怖片"},{"n":"剧情片","v":"剧情片"},{"n":"战争片","v":"战争片"},{"n":"惊悚片","v":"惊悚片"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"华语","v":"华语"},{"n":"香港地区","v":"香港地区"},{"n":"美国","v":"美国"},{"n":"欧洲","v":"欧洲"},{"n":"韩国","v":"韩国"},{"n":"日本","v":"日本"},{"n":"台湾地区","v":"台湾地区"},{"n":"泰国","v":"泰国"},{"n":"台湾地区","v":"台湾地区"},{"n":"印度","v":"印度"},{"n":"其它","v":"其它"}]},{"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":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"好评榜","v":"好评榜"},{"n":"新上线","v":"新上线"}]}],
|
||||
"4":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"国产漫","v":"国产漫"},{"n":"欧美漫","v":"欧美漫"},{"n":"日韩漫","v":"日韩漫"},{"n":"港台漫","v":"港台漫"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"中国大陆","v":"中国大陆"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"欧美","v":"欧美"},{"n":"其它","v":"其它"}]},{"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":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"新上线","v":"新上线"}]},{"key":"total","name":"状态","value":[{"n":"全部","v":"状态"},{"n":"连载","v":"连载"},{"n":"完结","v":"完结"}]}],
|
||||
"3":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"大陆","v":"大陆"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"内地","v":"内地"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"},{"n":"其它","v":"其它"}]},{"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":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"新上线","v":"新上线"}]}],
|
||||
"46":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"日韩剧","v":"日韩剧"},{"n":"欧美剧","v":"欧美剧"},{"n":"海外剧","v":"海外剧"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"韩国","v":"韩国"},{"n":"美剧","v":"美剧"},{"n":"日本","v":"日本"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"},{"n":"其他","v":"其他"}]},{"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":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"好评榜","v":"好评榜"},{"n":"新上线","v":"新上线"}]}]
|
||||
},
|
||||
headers:{
|
||||
"User-Agent":"okhttp/4.6.0"
|
||||
},
|
||||
timeout:5000,
|
||||
class_name:'电视剧&电影&动漫&综艺&海外精选', // /api.php/provide/home_nav
|
||||
class_url:'2&1&4&3&46',
|
||||
limit:20,
|
||||
play_parse:true,
|
||||
lazy:`js:
|
||||
try {
|
||||
function getvideo(url) {
|
||||
let jData = JSON.parse(request(url, {
|
||||
headers: getHeaders(url)
|
||||
}));
|
||||
if (jData.code == 1) {
|
||||
return jData.data.url
|
||||
} else {
|
||||
return 'http://43.154.104.152:1234/jhapi/cs.php?url=' + url.split('=')[1]
|
||||
}
|
||||
}
|
||||
if (/,/.test(input)) {
|
||||
let mjurl = input.split(',')[1]
|
||||
let videoUrl = getvideo(mjurl);
|
||||
input = {
|
||||
jx: 0,
|
||||
url: videoUrl,
|
||||
parse: 0,
|
||||
header: JSON.stringify({
|
||||
'user-agent': 'Lavf/58.12.100'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
let videoUrl = getvideo(input);
|
||||
if (/jhapi/.test(videoUrl)) {
|
||||
videoUrl = getvideo(videoUrl);
|
||||
input = {
|
||||
jx: 0,
|
||||
url: videoUrl,
|
||||
parse: 0,
|
||||
header: JSON.stringify({
|
||||
'user-agent': 'Lavf/58.12.100'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
input = {
|
||||
jx: 0,
|
||||
url: videoUrl,
|
||||
parse: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
log(e.toString())
|
||||
}
|
||||
`,
|
||||
推荐:`js:
|
||||
var d = [];
|
||||
let html = request(input, {
|
||||
headers: getHeaders(input)
|
||||
});
|
||||
html = JSON.parse(html);
|
||||
html.forEach(function(it) {
|
||||
d.push({
|
||||
title: it.name,
|
||||
img: it.img,
|
||||
desc: it.remarks,
|
||||
url: it.id
|
||||
})
|
||||
});
|
||||
setResult(d);
|
||||
`,
|
||||
一级:`js:
|
||||
var d = [];
|
||||
let html = request(input, {
|
||||
headers: getHeaders(input)
|
||||
});
|
||||
html = JSON.parse(html);
|
||||
html.list.forEach(function(it) {
|
||||
d.push({
|
||||
title: it.name,
|
||||
img: it.img,
|
||||
desc: it.msg,
|
||||
url: it.id
|
||||
})
|
||||
});
|
||||
setResult(d);
|
||||
`,
|
||||
二级:`js:
|
||||
var d = [];
|
||||
VOD = {
|
||||
vod_id: input.split('id=')[1]
|
||||
};
|
||||
try {
|
||||
let html = request(input, {
|
||||
headers: getHeaders(input)
|
||||
});
|
||||
html = JSON.parse(html);
|
||||
let node = html.data;
|
||||
VOD = {
|
||||
vod_name: node['name'],
|
||||
vod_pic: node['img'],
|
||||
type_name: node['type'],
|
||||
vod_year: node['year'],
|
||||
vod_remarks: '更新至: ' + node['msg'] + ' / 评分: ' + node['score'],
|
||||
vod_content: node['info'].strip()
|
||||
};
|
||||
let episodes = node.player_info;
|
||||
let playMap = {};
|
||||
if (typeof play_url === 'undefined') {
|
||||
var play_url = ''
|
||||
}
|
||||
episodes.forEach(function(ep) {
|
||||
let playurls = ep['video_info'];
|
||||
playurls.forEach(function(playurl) {
|
||||
let source = ep['show'];
|
||||
if (!playMap.hasOwnProperty(source)) {
|
||||
playMap[source] = []
|
||||
}
|
||||
playMap[source].append(playurl['name'].strip() + '$' + play_url + urlencode(playurl['url']))
|
||||
})
|
||||
});
|
||||
let playFrom = [];
|
||||
let playList = [];
|
||||
Object.keys(playMap)
|
||||
.forEach(function(key) {
|
||||
playFrom.append(key);
|
||||
playList.append(playMap[key].join('#'))
|
||||
});
|
||||
let vod_play_from = playFrom.join('$$$');
|
||||
let vod_play_url = playList.join('$$$');
|
||||
VOD['vod_play_from'] = vod_play_from;
|
||||
VOD['vod_play_url'] = vod_play_url
|
||||
} catch (e) {
|
||||
log('获取二级详情页发生错误:' + e.message)
|
||||
}
|
||||
`,
|
||||
搜索:`js:
|
||||
var d = [];
|
||||
let html = request(input, {
|
||||
headers: getHeaders(input)
|
||||
});
|
||||
html = JSON.parse(html);
|
||||
html.data.forEach(function(it) {
|
||||
d.push({
|
||||
title: it.video_name,
|
||||
img: it.img,
|
||||
desc: it.qingxidu + '/' + it.category,
|
||||
url: it.id,
|
||||
content: it.blurb
|
||||
})
|
||||
});
|
||||
setResult(d);
|
||||
`,
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
var rule = {
|
||||
title: '看了么',
|
||||
host: 'https://www.ksksl.com',
|
||||
// url:'/show/fyclass/page/fypage.html',
|
||||
url: '/show/fyclassfyfilter.html',
|
||||
filterable: 1,//是否启用分类筛选,
|
||||
filter_url: '{{fl.area}}{{fl.by or "/by/time"}}{{fl.class}}/page/fypage{{fl.year}}',
|
||||
filter: {
|
||||
"dy":[{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"/area/中国大陆"},{"n":"中国香港","v":"/area/中国香港"},{"n":"中国台湾","v":"/area/中国台湾"},{"n":"美国","v":"/area/美国"},{"n":"日本","v":"/area/日本"},{"n":"韩国","v":"/area/韩国"},{"n":"英国","v":"/area/英国"},{"n":"法国","v":"/area/法国"}]},{"key":"class","name":"分类","value":[{"n":"全部","v":""},{"n":"喜剧","v":"/class/喜剧"},{"n":"爱情","v":"/class/爱情"},{"n":"恐怖","v":"/class/恐怖"},{"n":"动作","v":"/class/动作"},{"n":"科幻","v":"/class/科幻"},{"n":"剧情","v":"/class/剧情"},{"n":"警匪","v":"/class/警匪"},{"n":"犯罪","v":"/class/犯罪"},{"n":"动画","v":"/class/动画"},{"n":"奇幻","v":"/class/奇幻"},{"n":"武侠","v":"/class/武侠"},{"n":"冒险","v":"/class/冒险"},{"n":"枪战","v":"/class/枪战"},{"n":"恐怖","v":"/class/恐怖"},{"n":"悬疑","v":"/class/悬疑"},{"n":"惊悚","v":"/class/惊悚"},{"n":"经典","v":"/class/经典"},{"n":"青春","v":"/class/青春"},{"n":"文艺","v":"/class/文艺"},{"n":"古装","v":"/class/古装"},{"n":"历史","v":"/class/历史"},{"n":"运动","v":"/class/运动"},{"n":"农村","v":"/class/农村"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"tv":[{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"/area/中国大陆"},{"n":"中国香港","v":"/area/中国香港"},{"n":"中国台湾","v":"/area/中国台湾"},{"n":"美国","v":"/area/美国"},{"n":"日本","v":"/area/日本"},{"n":"韩国","v":"/area/韩国"},{"n":"英国","v":"/area/英国"},{"n":"法国","v":"/area/法国"}]},{"key":"class","name":"分类","value":[{"n":"全部","v":""},{"n":"古装","v":"/class/古装"},{"n":"言情","v":"/class/言情"},{"n":"武侠","v":"/class/武侠"},{"n":"偶像","v":"/class/美国"},{"n":"家庭","v":"/class/家庭"},{"n":"喜剧","v":"/class/喜剧"},{"n":"战争","v":"/class/战争"},{"n":"军旅","v":"/class/军旅"},{"n":"谍战","v":"/class/谍战"},{"n":"悬疑","v":"/class/悬疑"},{"n":"罪案","v":"/class/罪案"},{"n":"穿越","v":"/class/穿越"},{"n":"宫廷","v":"/class/宫廷"},{"n":"历史","v":"/class/历史"},{"n":"神话","v":"/class/神话"},{"n":"科幻","v":"/class/科幻"},{"n":"年代","v":"/class/年代"},{"n":"农村","v":"/class/农村"},{"n":"商战","v":"/class/商战"},{"n":"剧情","v":"/class/剧情"},{"n":"奇幻","v":"/class/奇幻"},{"n":"网剧","v":"/class/网剧"},{"n":"都市","v":"/class/都市"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"zy":[{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"/area/中国大陆"},{"n":"中国香港","v":"/area/中国香港"},{"n":"中国台湾","v":"/area/中国台湾"},{"n":"美国","v":"/area/美国"},{"n":"日本","v":"/area/日本"},{"n":"韩国","v":"/area/韩国"},{"n":"英国","v":"/area/英国"},{"n":"法国","v":"/area/法国"}]},{"key":"class","name":"分类","value":[{"n":"全部","v":""},{"n":"表演","v":"/class/表演"},{"n":"播报","v":"/class/播报"},{"n":"访谈","v":"/class/访谈"},{"n":"体验","v":"/class/体验"},{"n":"养成","v":"/class/养成"},{"n":"游戏","v":"/class/游戏"},{"n":"亲子","v":"/class/亲子"},{"n":"美食","v":"/class/美食"},{"n":"情感","v":"/class/情感"},{"n":"选秀","v":"/class/选秀"},{"n":"益智","v":"/class/益智"},{"n":"晚会","v":"/class/晚会"},{"n":"音乐","v":"/class/音乐"},{"n":"文化","v":"/class/文化"},{"n":"喜剧","v":"/class/喜剧"},{"n":"曲艺","v":"/class/曲艺"},{"n":"职场","v":"/class/职场"},{"n":"脱口秀","v":"/class/脱口秀"},{"n":"文艺","v":"/class/文艺"},{"n":"竞技","v":"/class/竞技"},{"n":"潮流文化","v":"/class/潮流文化"},{"n":"体育","v":"/class/体育"},{"n":"资讯","v":"/class/资讯"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"dm":[{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"/area/中国大陆"},{"n":"中国香港","v":"/area/中国香港"},{"n":"中国台湾","v":"/area/中国台湾"},{"n":"美国","v":"/area/美国"},{"n":"日本","v":"/area/日本"},{"n":"韩国","v":"/area/韩国"},{"n":"英国","v":"/area/英国"},{"n":"法国","v":"/area/法国"}]},{"key":"class","name":"分类","value":[{"n":"全部","v":""},{"n":"热门","v":"/class/热门"},{"n":"搞笑","v":"/class/搞笑"},{"n":"番剧","v":"/class/番剧"},{"n":"国创","v":"/class/国创"},{"n":"大电影","v":"/class/大电影"},{"n":"热血","v":"/class/热血"},{"n":"催泪","v":"/class/催泪"},{"n":"励志","v":"/class/励志"},{"n":"机战","v":"/class/机战"},{"n":"格斗","v":"/class/格斗"},{"n":"恋爱","v":"/class/恋爱"},{"n":"科幻","v":"/class/科幻"},{"n":"奇幻","v":"/class/奇幻"},{"n":"魔幻","v":"/class/魔幻"},{"n":"推理","v":"/class/推理"},{"n":"校园","v":"/class/校园"},{"n":"日常","v":"/class/日常"},{"n":"经典","v":"/class/经典"},{"n":"历史","v":"/class/历史"},{"n":"美食","v":"/class/美食"},{"n":"武侠","v":"/class/武侠"},{"n":"玄幻","v":"/class/玄幻"},{"n":"竞技","v":"/class/竞技"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"},{"n":"2009","v":"/year/2009"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}],
|
||||
"jl":[{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"/area/中国大陆"},{"n":"日本","v":"/area/日本"},{"n":"美国","v":"/area/美国"},{"n":"国外","v":"/area/国外"},{"n":"其他","v":"/area/其他"}]},{"key":"class","name":"分类","value":[{"n":"全部","v":""},{"n":"社会","v":"/class/社会"},{"n":"动物","v":"/class/动物"},{"n":"文化","v":"/class/文化"},{"n":"自然","v":"/class/自然"},{"n":"人文","v":"/class/人文"},{"n":"军事","v":"/class/军事"},{"n":"历史","v":"/class/历史"},{"n":"记录","v":"/class/记录"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"2013","v":"/year/2013"},{"n":"2012","v":"/year/2012"},{"n":"2011","v":"/year/2011"},{"n":"2010","v":"/year/2010"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"}]}]
|
||||
},
|
||||
// searchUrl:'/ch.html?wd=**',
|
||||
searchUrl: '/ch/page/fypage/wd/**.html',
|
||||
searchable: 2,
|
||||
headers: {
|
||||
'User-Agent': 'UC_UA'
|
||||
},
|
||||
timeout: 5000,
|
||||
// class_name: '电影&电视剧&动漫&综艺&纪录片',//静态分类名称拼接
|
||||
// class_url: 'dy&tv&dm&zy&jl',//静态分类标识拼接
|
||||
class_parse: '.vi-nav.swiper-wrapper&&li:gt(0):lt(6);a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: `js:
|
||||
var html = JSON.parse(request(input).match(/r player_.*?=(.*?)</)[1]);
|
||||
var url = html.url;
|
||||
if (html.encrypt == '1') {
|
||||
url = unescape(url)
|
||||
} else if (html.encrypt == '2') {
|
||||
url = unescape(base64Decode(url))
|
||||
}
|
||||
if (/\\.m3u8|\\.mp4/.test(url)) {
|
||||
input = {
|
||||
jx: 0,
|
||||
url: url,
|
||||
parse: 0
|
||||
}
|
||||
} else {
|
||||
input
|
||||
}
|
||||
`,
|
||||
limit: 5,
|
||||
推荐: '.dx-top;li;a&&title;a&&data-original;.vod_remarks&&Text;a&&href',
|
||||
double: true, // 推荐内容是否双层定位
|
||||
一级: 'ul.dx-list li;a&&title;a&&data-original;.vod_remarks&&Text;a&&href',
|
||||
二级: {
|
||||
"title": "h1--span&&Text;",
|
||||
"img": ".picHover&&img&&src",
|
||||
"desc": ";;;.video-info-item:eq(0)&&Text;.item-tags&&Text",
|
||||
"content": ".vod_content&&Text",
|
||||
"tabs": ".play-title h2",
|
||||
"lists": ".play_li.fn-clear:eq(#id) a"
|
||||
},
|
||||
搜索: '*',
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
var rule = {
|
||||
title:'碟调影视',
|
||||
host:'http://www.618648.com',
|
||||
// homeUrl:'/',
|
||||
url:'/die-tiao/fyclass-fypage.html',
|
||||
searchUrl:'/diediaoch/page/fypage/wd/**.html',
|
||||
searchable:2,//是否启用全局搜索,
|
||||
quickSearch:0,//是否启用快速搜索,
|
||||
filterable:0,//是否启用分类筛选,
|
||||
headers:{//网站的请求头,完整支持所有的,常带ua和cookies
|
||||
'User-Agent':'MOBILE_UA',
|
||||
// "Cookie": "searchneed=ok"
|
||||
},
|
||||
//class_parse:'.stui-header__menu li.hidden-xs;a&&Text;a&&href;.*/(.*?).html',
|
||||
class_name:'电影&电视剧&综艺&动漫',
|
||||
class_url:'1&2&3&4',
|
||||
play_parse:true,
|
||||
lazy:'',
|
||||
limit:8,
|
||||
推荐:'.stui-vodlist.clearfix;.stui-vodlist__box;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
double:true, // 推荐内容是否双层定位
|
||||
一级:'.stui-vodlist.clearfix li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级:{"title":"h1.title&&Text;.stui-content__detail p:eq(2)&&Text","img":".lazyload&&data-original","desc":".video-info-items:eq(-2)&&Text;.video-info-items:eq(-1)&&Text;.video-info-items:eq(-2)&&Text;.stui-content__detail p:eq(7)&&Text;.stui-content__detail p:eq(6)&&Text","content":".stui-content__detail p:eq(9)&&Text","tabs":".nav.nav-tabs li","lists":".tab-pane.fade:eq(#id)&&ul&&li"},
|
||||
搜索:'.stui-vodlist.clearfix li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue