Add files via upload
This commit is contained in:
parent
fa2944a159
commit
3f990d1959
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
12265
教育/js/crypto-js.js
12265
教育/js/crypto-js.js
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
|
@ -7,8 +7,7 @@ export
|
||||||
function gbkTool() {
|
function gbkTool() {
|
||||||
var data = function(zipData) {
|
var data = function(zipData) {
|
||||||
var re = zipData.replace(/#(\d+)\$/g, function(a, b) {
|
var re = zipData.replace(/#(\d+)\$/g, function(a, b) {
|
||||||
return Array(+b + 3)
|
return Array(+b + 3).join('#');
|
||||||
.join('#');
|
|
||||||
})
|
})
|
||||||
.replace(/#/g, '####')
|
.replace(/#/g, '####')
|
||||||
.replace(/(\w\w):([\w#]+)(?:,|$)/g, function(a, hd, dt) {
|
.replace(/(\w\w):([\w#]+)(?:,|$)/g, function(a, hd, dt) {
|
||||||
|
@ -49,8 +48,7 @@ function gbkTool() {
|
||||||
return encodeURIComponent(a);
|
return encodeURIComponent(a);
|
||||||
} else {
|
} else {
|
||||||
var key = code.toString(16);
|
var key = code.toString(16);
|
||||||
if (key.length != 4) key = ('000' + key)
|
if (key.length != 4) key = ('000' + key).match(/....$/)[0];
|
||||||
.match(/....$/)[0];
|
|
||||||
return U2Ghash[key] || a;
|
return U2Ghash[key] || a;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -62,8 +60,7 @@ function gbkTool() {
|
||||||
} else {
|
} else {
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
})
|
}).replace(/%[\w]{2}/g, function(a) {
|
||||||
.replace(/%[\w]{2}/g, function(a) {
|
|
||||||
return decodeURIComponent(a);
|
return decodeURIComponent(a);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,604 @@
|
||||||
|
/*!
|
||||||
|
* 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
11531
教育/js/node-rsa.js
11531
教育/js/node-rsa.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
820
教育/js/模板.js
820
教育/js/模板.js
|
@ -1,394 +1,428 @@
|
||||||
if (typeof Object.assign != 'function') {
|
if (typeof Object.assign !== 'function') {
|
||||||
Object.assign = function() {
|
Object.assign = function() {
|
||||||
let target = arguments[0];
|
let target = arguments[0];
|
||||||
for (let i = 1; i < arguments.length; i++) {
|
for (let i = 1; i < arguments.length; i++) {
|
||||||
let source = arguments[i];
|
let source = arguments[i];
|
||||||
for (let key in source) {
|
for (let key in source) {
|
||||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||||
target[key] = source[key];
|
target[key] = source[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return target;
|
return target;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMubans() {
|
// 通用免嗅探播放
|
||||||
var mubanDict = { // 模板字典
|
let common_lazy = `js:
|
||||||
mx: {
|
let html = request(input);
|
||||||
title: '',
|
let hconf = html.match(/r player_.*?=(.*?)</)[1];
|
||||||
host: '',
|
let json = JSON5.parse(hconf);
|
||||||
url: '/vodshow/fyclass--------fypage---/',
|
let url = json.url;
|
||||||
searchUrl: '/vodsearch/**----------fypage---/',
|
if (json.encrypt == '1') {
|
||||||
class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
|
url = unescape(url);
|
||||||
searchable: 2,
|
} else if (json.encrypt == '2') {
|
||||||
quickSearch: 0,
|
url = unescape(base64Decode(url));
|
||||||
filterable: 0,
|
}
|
||||||
headers: {
|
if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {
|
||||||
'User-Agent': 'MOBILE_UA',
|
input = {
|
||||||
},
|
parse: 0,
|
||||||
play_parse: true,
|
jx: 0,
|
||||||
lazy: '',
|
url: url,
|
||||||
limit: 6,
|
};
|
||||||
推荐: '.cbox_list;*;*;*;*;*',
|
} else {
|
||||||
double: true,
|
input;
|
||||||
一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
|
}`;
|
||||||
二级: {
|
// 默认嗅探播放
|
||||||
title: 'h2&&Text;.detail_list&&ul:eq(1)&&li&&a:eq(2)&&Text',
|
|
||||||
img: '.vodlist_thumb&&data-original',
|
let def_lazy = `js:
|
||||||
desc: '.content_detail&&li:eq(1)&&Text;.detail_list&&ul:eq(1)&&li&&a&&Text;.detail_list&&ul:eq(1)&&li&&a:eq(1)&&Text;.detail_list&&ul:eq(1)&&li:eq(2)&&Text;.detail_list&&ul:eq(1)&&li:eq(3)&&Text',
|
input = { parse: 1, url: input, js: '' };`;
|
||||||
content: '.content_desc&&span&&Text',
|
// 采集站播放
|
||||||
tabs: '.play_source_tab&&a',
|
|
||||||
lists: '.content_playlist:eq(#id) li',
|
let cj_lazy = `js:
|
||||||
},
|
if (/\\.(m3u8|mp4)/.test(input)) {
|
||||||
搜索: '*',
|
input = { parse: 0, url: input };
|
||||||
},
|
} else {
|
||||||
mxpro: {
|
if (rule.parse_url.startsWith('json:')) {
|
||||||
title: '',
|
let purl = rule.parse_url.replace('json:', '') + input;
|
||||||
host: '', // homeUrl:'/',
|
let html = request(purl);
|
||||||
url: '/vodshow/fyclass--------fypage---.html',
|
let json = JSON.parse(html);
|
||||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
if (json.url) {
|
||||||
searchable: 2, //是否启用全局搜索,
|
input = { parse: 0, url: json.url };
|
||||||
quickSearch: 0, //是否启用快速搜索,
|
}
|
||||||
filterable: 0, //是否启用分类筛选,
|
} else {
|
||||||
headers: { //网站的请求头,完整支持所有的,常带ua和cookies
|
input = rule.parse_url + input;
|
||||||
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
}
|
||||||
},
|
}`;
|
||||||
class_parse: '.navbar-items li:gt(2):lt(8);a&&Text;a&&href;/(\\d+).html',
|
|
||||||
play_parse: true,
|
function getMubans() {
|
||||||
lazy: '',
|
const mubanDict = { // 模板字典
|
||||||
limit: 6,
|
mx: {
|
||||||
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
title: '',
|
||||||
double: true, // 推荐内容是否双层定位
|
host: '',
|
||||||
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
url: '/vodshow/fyclass--------fypage---/',
|
||||||
二级: {
|
searchUrl: '/vodsearch/**----------fypage---/',
|
||||||
"title": "h1&&Text;.module-info-tag&&Text",
|
class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
|
||||||
"img": ".lazyload&&data-original",
|
searchable: 2,
|
||||||
"desc": ".module-info-item:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(3)&&Text",
|
quickSearch: 0,
|
||||||
"content": ".module-info-introduction&&Text",
|
filterable: 0,
|
||||||
"tabs": ".module-tab-item",
|
headers: {
|
||||||
"lists": ".module-play-list:eq(#id) a"
|
'User-Agent': 'MOBILE_UA',
|
||||||
},
|
},
|
||||||
搜索: 'body .module-item;.module-card-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href;.module-info-item-content&&Text',
|
play_parse: true,
|
||||||
},
|
lazy: common_lazy,
|
||||||
mxone5: {
|
limit: 6,
|
||||||
title: '',
|
double: true,
|
||||||
host: '',
|
推荐: '.cbox_list;*;*;*;*;*',
|
||||||
url: '/show/fyclass--------fypage---.html',
|
一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
|
||||||
searchUrl: '/search/**----------fypage---.html',
|
二级: {
|
||||||
searchable: 2, //是否启用全局搜索,
|
title: 'h2&&Text;.content_detail:eq(1)&&li&&a:eq(2)&&Text',
|
||||||
quickSearch: 0, //是否启用快速搜索,
|
img: '.vodlist_thumb&&data-original',
|
||||||
filterable: 0, //是否启用分类筛选,
|
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',
|
||||||
class_parse: '.nav-menu-items&&li;a&&Text;a&&href;.*/(.*?).html',
|
content: '.content_desc&&span&&Text',
|
||||||
play_parse: true,
|
tabs: '.play_source_tab&&a',
|
||||||
lazy: '',
|
lists: '.content_playlist:eq(#id) li',
|
||||||
limit: 6,
|
},
|
||||||
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
搜索: '*',
|
||||||
double: true, // 推荐内容是否双层定位
|
},
|
||||||
一级: '.module-items .module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
mxpro: {
|
||||||
二级: {
|
title: '',
|
||||||
"title": "h1&&Text;.tag-link&&Text",
|
host: '', // homeUrl:'/',
|
||||||
"img": ".module-item-pic&&img&&data-src",
|
url: '/vodshow/fyclass--------fypage---.html',
|
||||||
"desc": ".video-info-items:eq(0)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(2)&&Text;.video-info-items:eq(3)&&Text",
|
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||||
"content": ".vod_content&&Text",
|
searchable: 2, //是否启用全局搜索,
|
||||||
"tabs": ".module-tab-item",
|
quickSearch: 0, //是否启用快速搜索,
|
||||||
"lists": ".module-player-list:eq(#id)&&.scroll-content&&a"
|
filterable: 0, //是否启用分类筛选,
|
||||||
},
|
headers: { //网站的请求头,完整支持所有的,常带ua和cookies
|
||||||
搜索: '.module-items .module-search-item;a&&title;img&&data-src;.video-serial&&Text;a&&href',
|
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
||||||
},
|
},
|
||||||
首图: {
|
class_parse: '.navbar-items li:gt(0):lt(10);a&&Text;a&&href;/(\\d+)',
|
||||||
title: '',
|
play_parse: true,
|
||||||
host: '',
|
lazy: common_lazy,
|
||||||
url: '/vodshow/fyclass--------fypage---/',
|
limit: 6,
|
||||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
double: true, // 推荐内容是否双层定位
|
||||||
searchable: 2, //是否启用全局搜索,
|
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||||
quickSearch: 0, //是否启用快速搜索,
|
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||||
filterable: 0, //是否启用分类筛选,
|
二级: {
|
||||||
headers: { //网站的请求头,完整支持所有的,常带ua和cookies
|
title: 'h1&&Text;.module-info-tag-link:eq(-1)&&Text',
|
||||||
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
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',
|
||||||
class_parse: '.myui-header__menu li.hidden-sm:gt(0):lt(5);a&&Text;a&&href;/(\\d+).html',
|
content: '.module-info-introduction&&Text',
|
||||||
play_parse: true,
|
tabs: '.module-tab-item',
|
||||||
lazy: '',
|
lists: '.module-play-list:eq(#id) a',
|
||||||
limit: 6,
|
tab_text: 'div--small&&Text',
|
||||||
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
},
|
||||||
double: true, // 推荐内容是否双层定位
|
搜索: 'body .module-item;.module-card-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href;.module-info-item-content&&Text',
|
||||||
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
},
|
||||||
二级: {
|
mxone5: {
|
||||||
"title": ".myui-content__detail .title&&Text;.myui-content__detail p:eq(-2)&&Text",
|
title: '',
|
||||||
"img": ".myui-content__thumb .lazyload&&data-original",
|
host: '',
|
||||||
"desc": ".myui-content__detail p:eq(0)&&Text;.myui-content__detail p:eq(1)&&Text;.myui-content__detail p:eq(2)&&Text",
|
url: '/show/fyclass--------fypage---.html',
|
||||||
"content": ".content&&Text",
|
searchUrl: '/search/**----------fypage---.html',
|
||||||
"tabs": ".nav-tabs:eq(0) li",
|
searchable: 2, //是否启用全局搜索,
|
||||||
"lists": ".myui-content__list:eq(#id) li"
|
quickSearch: 0, //是否启用快速搜索,
|
||||||
},
|
filterable: 0, //是否启用分类筛选,
|
||||||
搜索: '#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
class_parse: '.nav-menu-items&&li;a&&Text;a&&href;.*/(.*?)\.html',
|
||||||
},
|
play_parse: true,
|
||||||
首图2: {
|
lazy: common_lazy,
|
||||||
title: '',
|
limit: 6,
|
||||||
host: '',
|
double: true, // 推荐内容是否双层定位
|
||||||
url: '/list/fyclass-fypage.html',
|
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
一级: '.module-items .module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||||
searchable: 2, //是否启用全局搜索,
|
二级: {
|
||||||
quickSearch: 0, //是否启用快速搜索,
|
title: 'h1&&Text;.tag-link&&Text',
|
||||||
filterable: 0, //是否启用分类筛选,
|
img: '.module-item-pic&&img&&data-src',
|
||||||
headers: {
|
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',
|
||||||
'User-Agent': 'UC_UA', // "Cookie": ""
|
content: '.vod_content&&Text',
|
||||||
}, // class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
|
tabs: '.module-tab-item',
|
||||||
class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html',
|
lists: '.module-player-list:eq(#id)&&.scroll-content&&a',
|
||||||
play_parse: true,
|
tab_text: 'div--small&&Text',
|
||||||
lazy: '',
|
},
|
||||||
limit: 6,
|
搜索: '.module-items .module-search-item;a&&title;img&&data-src;.video-serial&&Text;a&&href',
|
||||||
推荐: '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: '',
|
||||||
二级: {
|
host: '',
|
||||||
"title": ".stui-content__detail .title&&Text;.stui-content__detail p:eq(-2)&&Text",
|
url: '/vodshow/fyclass--------fypage---/',
|
||||||
"img": ".stui-content__thumb .lazyload&&data-original",
|
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||||
"desc": ".stui-content__detail p:eq(0)&&Text;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text",
|
searchable: 2, //是否启用全局搜索,
|
||||||
"content": ".detail&&Text",
|
quickSearch: 0, //是否启用快速搜索,
|
||||||
"tabs": ".stui-vodlist__head h3",
|
filterable: 0, //是否启用分类筛选,
|
||||||
"lists": ".stui-content__playlist:eq(#id) li"
|
headers: { //网站的请求头,完整支持所有的,常带ua和cookies
|
||||||
},
|
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
||||||
搜索: 'ul.stui-vodlist__media:eq(0),ul.stui-vodlist:eq(0),#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
},
|
||||||
搜索1: 'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
class_parse: '.myui-header__menu li.hidden-sm:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
|
||||||
搜索2: 'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
play_parse: true,
|
||||||
},
|
lazy: common_lazy,
|
||||||
默认: {
|
limit: 6,
|
||||||
title: '',
|
double: true, // 推荐内容是否双层定位
|
||||||
host: '',
|
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||||
url: '',
|
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||||
searchUrl: '',
|
二级: {
|
||||||
searchable: 2,
|
title: '.myui-content__detail .title--span&&Text;.myui-content__detail p.data:eq(3)&&Text',
|
||||||
quickSearch: 0,
|
img: '.myui-content__thumb .lazyload&&data-original',
|
||||||
filterable: 1,
|
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',
|
||||||
filter: '',
|
content: '.content&&Text',
|
||||||
filter_url: '',
|
tabs: '.myui-panel__head&&li',
|
||||||
filter_def: {},
|
// tabs: '.nav-tabs&&li',
|
||||||
headers: {
|
lists: '.myui-content__list:eq(#id) li',
|
||||||
'User-Agent': 'MOBILE_UA',
|
},
|
||||||
},
|
搜索: '#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||||
timeout: 5000,
|
},
|
||||||
class_parse: '#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
首图2: {
|
||||||
cate_exclude: '',
|
title: '',
|
||||||
play_parse: true,
|
host: '',
|
||||||
lazy: `js:input = {parse: 1, url: input, js: ''}`,
|
url: '/list/fyclass-fypage.html',
|
||||||
double: true,
|
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||||
推荐: '列表1;列表2;标题;图片;描述;链接;详情',
|
searchable: 2, //是否启用全局搜索,
|
||||||
一级: '列表;标题;图片;描述;链接;详情',
|
quickSearch: 0, //是否启用快速搜索,
|
||||||
二级: {
|
filterable: 0, //是否启用分类筛选,
|
||||||
title: 'vod_name;vod_type',
|
headers: {
|
||||||
img: '图片链接',
|
'User-Agent': 'UC_UA', // "Cookie": ""
|
||||||
desc: '主要信息;年代;地区;演员;导演',
|
},
|
||||||
content: '简介',
|
class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html',
|
||||||
tabs: '',
|
play_parse: true,
|
||||||
lists: 'xx:eq(#id)&&a',
|
lazy: common_lazy,
|
||||||
tab_text: 'body&&Text',
|
limit: 6,
|
||||||
list_text: 'body&&Text',
|
double: true, // 推荐内容是否双层定位
|
||||||
list_url: 'a&&href'
|
推荐: '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',
|
||||||
vfed: {
|
title1: '.stui-content__detail .title&&Text;.stui-content__detail&&p&&Text',
|
||||||
title: '',
|
img: '.stui-content__thumb .lazyload&&data-original',
|
||||||
host: '',
|
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',
|
||||||
url: '/index.php/vod/show/id/fyclass/page/fypage.html',
|
desc1: '.stui-content__detail p:eq(4)&&Text;;;.stui-content__detail p:eq(1)&&Text',
|
||||||
searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
|
content: '.detail&&Text',
|
||||||
searchable: 2, //是否启用全局搜索,
|
tabs: '.stui-pannel__head h3',
|
||||||
quickSearch: 0, //是否启用快速搜索,
|
tabs1: '.stui-vodlist__head h3',
|
||||||
filterable: 0, //是否启用分类筛选,
|
lists: '.stui-content__playlist:eq(#id) li',
|
||||||
headers: {
|
},
|
||||||
'User-Agent': 'UC_UA',
|
搜索: 'ul.stui-vodlist__media,ul.stui-vodlist,#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||||
}, // class_parse:'.fed-pops-navbar&&ul.fed-part-rows&&a.fed-part-eone:gt(0):lt(5);a&&Text;a&&href;.*/(.*?).html',
|
},
|
||||||
class_parse: '.fed-pops-navbar&&ul.fed-part-rows&&a;a&&Text;a&&href;.*/(.*?).html',
|
默认: {
|
||||||
play_parse: true,
|
title: '',
|
||||||
lazy: '',
|
host: '',
|
||||||
limit: 6,
|
url: '',
|
||||||
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
searchUrl: '',
|
||||||
double: true, // 推荐内容是否双层定位
|
searchable: 2,
|
||||||
一级: '.fed-list-info&&li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
quickSearch: 0,
|
||||||
二级: {
|
filterable: 0,
|
||||||
"title": "h1.fed-part-eone&&Text;.fed-deta-content&&.fed-part-rows&&li&&Text",
|
filter: '',
|
||||||
"img": ".fed-list-info&&a&&data-original",
|
filter_url: '',
|
||||||
"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",
|
filter_def: {},
|
||||||
"content": ".fed-part-esan&&Text",
|
headers: {
|
||||||
"tabs": ".fed-drop-boxs&&.fed-part-rows&&li",
|
'User-Agent': 'MOBILE_UA',
|
||||||
"lists": ".fed-play-item:eq(#id)&&ul:eq(1)&&li"
|
},
|
||||||
},
|
timeout: 5000,
|
||||||
搜索: '.fed-deta-info;h1&&Text;.lazyload&&data-original;.fed-list-remarks&&Text;a&&href;.fed-deta-content&&Text',
|
class_parse: '#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||||
},
|
cate_exclude: '',
|
||||||
海螺3: {
|
play_parse: true,
|
||||||
title: '',
|
lazy: def_lazy,
|
||||||
host: '',
|
double: true,
|
||||||
searchUrl: '/v_search/**----------fypage---.html',
|
推荐: '列表1;列表2;标题;图片;描述;链接;详情',
|
||||||
url: '/vod_____show/fyclass--------fypage---.html',
|
一级: '列表;标题;图片;描述;链接;详情',
|
||||||
headers: {
|
二级: {
|
||||||
'User-Agent': 'MOBILE_UA'
|
title: 'vod_name;vod_type',
|
||||||
},
|
img: '图片链接',
|
||||||
timeout: 5000,
|
desc: '主要信息;年代;地区;演员;导演',
|
||||||
class_parse: 'body&&.hl-nav li:gt(0);a&&Text;a&&href;.*/(.*?).html',
|
content: '简介',
|
||||||
cate_exclude: '明星|专题|最新|排行',
|
tabs: '',
|
||||||
limit: 40,
|
lists: 'xx:eq(#id)&&a',
|
||||||
play_parse: true,
|
tab_text: 'body&&Text',
|
||||||
lazy: '',
|
list_text: 'body&&Text',
|
||||||
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
list_url: 'a&&href',
|
||||||
double: true,
|
},
|
||||||
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
搜索: '列表;标题;图片;描述;链接;详情',
|
||||||
二级: {
|
},
|
||||||
"title": ".hl-infos-title&&Text;.hl-text-conch&&Text",
|
vfed: {
|
||||||
"img": ".hl-lazy&&data-original",
|
title: '',
|
||||||
"desc": ".hl-infos-content&&.hl-text-conch&&Text",
|
host: '',
|
||||||
"content": ".hl-content-text&&Text",
|
url: '/index.php/vod/show/id/fyclass/page/fypage.html',
|
||||||
"tabs": ".hl-tabs&&a",
|
searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
|
||||||
"lists": ".hl-plays-list:eq(#id)&&li"
|
searchable: 2, //是否启用全局搜索,
|
||||||
},
|
quickSearch: 0, //是否启用快速搜索,
|
||||||
搜索: '.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
filterable: 0, //是否启用分类筛选,
|
||||||
searchable: 2, //是否启用全局搜索,
|
headers: {
|
||||||
quickSearch: 0, //是否启用快速搜索,
|
'User-Agent': 'UC_UA',
|
||||||
filterable: 0, //是否启用分类筛选,
|
},
|
||||||
},
|
class_parse: '.fed-pops-navbar&&ul.fed-part-rows&&a;a&&Text;a&&href;.*/(.*?).html',
|
||||||
海螺2: {
|
play_parse: true,
|
||||||
title: '',
|
lazy: common_lazy,
|
||||||
host: '',
|
limit: 6,
|
||||||
searchUrl: '/index.php/vod/search/page/fypage/wd/**/',
|
double: true, // 推荐内容是否双层定位
|
||||||
url: '/index.php/vod/show/id/fyclass/page/fypage/',
|
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||||
headers: {
|
一级: '.fed-list-info&&li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||||
'User-Agent': 'MOBILE_UA'
|
二级: {
|
||||||
},
|
title: 'h1.fed-part-eone&&Text;.fed-deta-content&&.fed-part-rows&&li&&Text',
|
||||||
timeout: 5000,
|
img: '.fed-list-info&&a&&data-original',
|
||||||
class_parse: '#nav-bar li;a&&Text;a&&href;id/(.*?)/',
|
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',
|
||||||
limit: 40,
|
content: '.fed-part-esan&&Text',
|
||||||
play_parse: true,
|
tabs: '.fed-drop-boxs&&.fed-part-rows&&li',
|
||||||
lazy: '',
|
lists: '.fed-play-item:eq(#id)&&ul:eq(1)&&li',
|
||||||
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
},
|
||||||
double: true,
|
搜索: '.fed-deta-info;h1&&Text;.lazyload&&data-original;.fed-list-remarks&&Text;a&&href;.fed-deta-content&&Text',
|
||||||
一级: '.list-a&&li;a&&title;.lazy&&data-original;.list-remarks&&Text;a&&href',
|
},
|
||||||
二级: {
|
海螺3: {
|
||||||
"title": "h2&&Text;.deployment&&Text",
|
title: '',
|
||||||
"img": ".lazy&&data-original",
|
host: '',
|
||||||
"desc": ".deployment&&Text",
|
searchUrl: '/v_search/**----------fypage---.html',
|
||||||
"content": ".ec-show&&Text",
|
url: '/vod_____show/fyclass--------fypage---.html',
|
||||||
"tabs": "#tag&&a",
|
headers: {
|
||||||
"lists": ".play_list_box:eq(#id)&&li"
|
'User-Agent': 'MOBILE_UA',
|
||||||
},
|
},
|
||||||
搜索: '.search-list;a&&title;.lazy&&data-original;.deployment&&Text;a&&href',
|
timeout: 5000,
|
||||||
searchable: 2, //是否启用全局搜索,
|
class_parse: 'body&&.hl-nav li:gt(0);a&&Text;a&&href;.*/(.*?).html',
|
||||||
quickSearch: 0, //是否启用快速搜索,
|
cate_exclude: '明星|专题|最新|排行',
|
||||||
filterable: 0, //是否启用分类筛选,
|
limit: 40,
|
||||||
},
|
play_parse: true,
|
||||||
短视: {
|
lazy: common_lazy,
|
||||||
title: '',
|
double: true,
|
||||||
host: '', // homeUrl:'/',
|
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||||
url: '/channel/fyclass-fypage.html',
|
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||||
searchUrl: '/search.html?wd=**',
|
二级: {
|
||||||
searchable: 2, //是否启用全局搜索,
|
title: '.hl-dc-title&&Text;.hl-dc-content&&li:eq(6)&&Text',
|
||||||
quickSearch: 0, //是否启用快速搜索,
|
img: '.hl-lazy&&data-original',
|
||||||
filterable: 0, //是否启用分类筛选,
|
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',
|
||||||
headers: { //网站的请求头,完整支持所有的,常带ua和cookies
|
content: '.hl-content-text&&Text',
|
||||||
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
tabs: '.hl-tabs&&a',
|
||||||
},
|
tab_text: 'a--span&&Text',
|
||||||
class_parse: '.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html',
|
lists: '.hl-plays-list:eq(#id)&&li',
|
||||||
cate_exclude: '解析|动态',
|
},
|
||||||
play_parse: true,
|
搜索: '.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||||
lazy: '',
|
searchable: 2, //是否启用全局搜索,
|
||||||
limit: 6,
|
quickSearch: 0, //是否启用快速搜索,
|
||||||
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
filterable: 0, //是否启用分类筛选,
|
||||||
double: true, // 推荐内容是否双层定位
|
},
|
||||||
一级: '.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
海螺2: {
|
||||||
二级: {
|
title: '',
|
||||||
"title": "h1&&Text;.content-rt&&p:eq(0)&&Text",
|
host: '',
|
||||||
"img": ".img&&img&&data-src",
|
searchUrl: '/index.php/vod/search/page/fypage/wd/**/',
|
||||||
"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",
|
url: '/index.php/vod/show/id/fyclass/page/fypage/',
|
||||||
"content": ".zkjj_a&&Text",
|
headers: {
|
||||||
"tabs": ".py-tabs&&option",
|
'User-Agent': 'MOBILE_UA',
|
||||||
"lists": ".player:eq(#id) li"
|
},
|
||||||
},
|
timeout: 5000,
|
||||||
搜索: '.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
|
class_parse: '#nav-bar li;a&&Text;a&&href;id/(.*?)/',
|
||||||
},
|
limit: 40,
|
||||||
短视2: {
|
play_parse: true,
|
||||||
title: '',
|
lazy: common_lazy,
|
||||||
host: '',
|
double: true,
|
||||||
class_name: '电影&电视剧&综艺&动漫',
|
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
||||||
class_url: '1&2&3&4',
|
一级: '.list-a&&li;a&&title;.lazy&&data-original;.list-remarks&&Text;a&&href',
|
||||||
searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50',
|
二级: {
|
||||||
searchable: 2,
|
title: 'h2&&Text;.deployment&&Text',
|
||||||
quickSearch: 0,
|
img: '.lazy&&data-original',
|
||||||
headers: {
|
desc: '.deployment&&Text',
|
||||||
'User-Agent': 'MOBILE_UA'
|
content: '.ec-show&&Text',
|
||||||
},
|
tabs: '#tag&&a',
|
||||||
url: '/index.php/api/vod#type=fyclass&page=fypage',
|
lists: '.play_list_box:eq(#id)&&li',
|
||||||
filterable: 0, //是否启用分类筛选,
|
},
|
||||||
filter_url: '',
|
搜索: '.search-list;a&&title;.lazy&&data-original;.deployment&&Text;a&&href',
|
||||||
filter: {},
|
searchable: 2, //是否启用全局搜索,
|
||||||
filter_def: {},
|
quickSearch: 0, //是否启用快速搜索,
|
||||||
detailUrl: '/index.php/vod/detail/id/fyid.html',
|
filterable: 0, //是否启用分类筛选,
|
||||||
play_parse: true,
|
},
|
||||||
lazy: '',
|
短视: {
|
||||||
limit: 6,
|
title: '',
|
||||||
推荐: '.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href',
|
host: '', // homeUrl:'/',
|
||||||
一级: '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});',
|
url: '/channel/fyclass-fypage.html',
|
||||||
二级: {
|
searchUrl: '/search.html?wd=**',
|
||||||
"title": ".slide-info-title&&Text;.slide-info:eq(3)--strong&&Text",
|
searchable: 2, //是否启用全局搜索,
|
||||||
"img": ".detail-pic&&data-original",
|
quickSearch: 0, //是否启用快速搜索,
|
||||||
"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",
|
filterable: 0, //是否启用分类筛选,
|
||||||
"content": "#height_limit&&Text",
|
headers: { //网站的请求头,完整支持所有的,常带ua和cookies
|
||||||
"tabs": ".anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a",
|
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
||||||
"tab_text": ".swiper-slide&&Text",
|
},
|
||||||
"lists": ".anthology-list-box:eq(#id) li"
|
class_parse: '.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html',
|
||||||
},
|
cate_exclude: '解析|动态',
|
||||||
搜索: 'json:list;name;pic;;id',
|
play_parse: true,
|
||||||
},
|
lazy: common_lazy,
|
||||||
采集1: {
|
limit: 6,
|
||||||
title: '',
|
double: true, // 推荐内容是否双层定位
|
||||||
host: '',
|
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||||
homeTid: '13',
|
一级: '.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||||
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
二级: {
|
||||||
detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
|
title: 'h1&&Text;.content-rt&&p:eq(0)&&Text',
|
||||||
searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
|
img: '.img&&img&&data-src',
|
||||||
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyclass',
|
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',
|
||||||
headers: {
|
content: '.zkjj_a&&Text',
|
||||||
'User-Agent': 'MOBILE_UA'
|
tabs: '.py-tabs&&option',
|
||||||
},
|
lists: '.player:eq(#id) li',
|
||||||
timeout: 5000, // class_name: '电影&电视剧&综艺&动漫',
|
},
|
||||||
// class_url: '1&2&3&4',
|
搜索: '.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
|
||||||
// class_parse:'js:let html=request(input);input=JSON.parse(html).class;',
|
},
|
||||||
class_parse: 'json:class;',
|
短视2: {
|
||||||
limit: 20,
|
title: '',
|
||||||
multi: 1,
|
host: '',
|
||||||
searchable: 2, //是否启用全局搜索,
|
class_name: '电影&电视剧&综艺&动漫',
|
||||||
quickSearch: 1, //是否启用快速搜索,
|
class_url: '1&2&3&4',
|
||||||
filterable: 0, //是否启用分类筛选,
|
searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50',
|
||||||
play_parse: true,
|
searchable: 2,
|
||||||
parse_url: '',
|
quickSearch: 0,
|
||||||
lazy: `js:
|
headers: {
|
||||||
if(/\\.(m3u8|mp4)/.test(input)){
|
'User-Agent': 'MOBILE_UA'
|
||||||
input = {parse:0,url:input}
|
},
|
||||||
}else{
|
url: '/index.php/api/vod#type=fyclass&page=fypage',
|
||||||
if(rule.parse_url.startsWith('json:')){
|
filterable: 0, //是否启用分类筛选,
|
||||||
let purl = rule.parse_url.replace('json:','')+input;
|
filter_url: '',
|
||||||
let html = request(purl);
|
filter: {},
|
||||||
input = {parse:0,url:JSON.parse(html).url}
|
filter_def: {},
|
||||||
}else{
|
detailUrl: '/index.php/vod/detail/id/fyid.html',
|
||||||
input= rule.parse_url+input;
|
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});',
|
||||||
一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
二级: {
|
||||||
二级: `js:
|
title: '.slide-info-title&&Text;.slide-info:eq(2)--strong&&Text',
|
||||||
let html=request(input);
|
img: '.detail-pic&&data-original',
|
||||||
html=JSON.parse(html);
|
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',
|
||||||
let data=html.list;
|
content: '#height_limit&&Text',
|
||||||
VOD=data[0];`,
|
tabs: '.anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a',
|
||||||
搜索: '*',
|
tab_text: 'a--span&&Text',
|
||||||
}
|
lists: '.anthology-list-box:eq(#id) li',
|
||||||
};
|
},
|
||||||
return JSON.parse(JSON.stringify(mubanDict));
|
搜索: 'json:list;name;pic;;id',
|
||||||
}
|
},
|
||||||
|
采集1: {
|
||||||
var mubanDict = getMubans();
|
title: '',
|
||||||
var muban = getMubans();
|
host: '',
|
||||||
export
|
homeTid: '13',
|
||||||
default {
|
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||||
muban, getMubans
|
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
|
||||||
};
|
};
|
Loading…
Reference in New Issue