Add files via upload
This commit is contained in:
parent
9a8d173189
commit
6c4bf621a0
554
JS/drpy2.min.js
vendored
554
JS/drpy2.min.js
vendored
@ -1,6 +1,8 @@
|
|||||||
import cheerio from "assets://js/lib/cheerio.min.js";
|
import cheerio from "assets://js/lib/cheerio.min.js";
|
||||||
import "assets://js/lib/crypto-js.js";
|
import "assets://js/lib/crypto-js.js";
|
||||||
import "./jsencrypt.js";
|
import "./jsencrypt.js";
|
||||||
|
import "./node-rsa.js";
|
||||||
|
import "./pako.min.js";
|
||||||
import 模板 from "./模板.js";
|
import 模板 from "./模板.js";
|
||||||
import {
|
import {
|
||||||
gbkTool
|
gbkTool
|
||||||
@ -10,10 +12,172 @@ from "./gbk.js";
|
|||||||
function init_test() {
|
function init_test() {
|
||||||
console.log("init_test_start");
|
console.log("init_test_start");
|
||||||
console.log("当前版本号:" + VERSION);
|
console.log("当前版本号:" + VERSION);
|
||||||
|
console.log("本地代理地址:" + getProxyUrl());
|
||||||
console.log(RKEY);
|
console.log(RKEY);
|
||||||
console.log(JSON.stringify(rule));
|
console.log(JSON.stringify(rule));
|
||||||
console.log("init_test_end")
|
console.log("init_test_end")
|
||||||
}
|
}
|
||||||
|
function ocr_demo_test() {
|
||||||
|
let img_base64 = `iVBORw0KGgoAAAANSUhEUgAAAIAAAAAoBAMAAADEX+97AAAAG1BMVEXz+/4thQTa7N6QwIFFkyNeokKozqDB3b93sWHFR+MEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABN0lEQVRIie2TQU+DQBCFt9vScvQpxR4xrcSjJCZ67JDGXsX+AdR4B3vpsSYm/m2HXaRLmuySepR3Gdidb/btDAjRq5dT96eCMlfBuzi1QLZUoZy2yz5sOvI+9iomaPEZ6nWnEtxqIyiM1RcAy44GNDhBXUjot/VVNweV1ah68FqWRyjKIOqAcyYF6rGcmpYnHzGt3fycNoMw0d3/THFu7hFSJ/8OXO6iTM8/KSg09obAzIHLO250LgQ0txOZSfgrV4Exdw98uGycJ0ErAeExZGhOmFHV9zHO6qVSj0MpLq7xZON56o++MjlsEgfVhbQWWME+xQX7J4V6zfi9A1Ly9rP1BvEXp+BbVJ/M77n+wfOIDVp51pZ4iBxvmj9AGrtvry6emwfKnVkW+ZRKd5ZNMvob36vXP9YPDmQki8QiCFAAAAAASUVORK5CYII=`;
|
||||||
|
OcrApi.api = OCR_API;
|
||||||
|
let code = OcrApi.classification(img_base64);
|
||||||
|
log("测试验证码图片的ocr识别结果为:" + code)
|
||||||
|
}
|
||||||
|
function rsa_demo_test() {
|
||||||
|
let t1 = (new Date)
|
||||||
|
.getTime();
|
||||||
|
let pkcs1_public = `
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MEgCQQCrI0pQ/ERRpJ3Ou190XJedFq846nDYP52rOtXyDxlFK5D3p6JJu2RwsKwy
|
||||||
|
lsQ9xY0xYPpRZUZKMEeR7e9gmRNLAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
`.trim();
|
||||||
|
let pkcs1_public_pem = `
|
||||||
|
MEgCQQCrI0pQ/ERRpJ3Ou190XJedFq846nDYP52rOtXyDxlFK5D3p6JJu2RwsKwy
|
||||||
|
lsQ9xY0xYPpRZUZKMEeR7e9gmRNLAgMBAAE=
|
||||||
|
`.trim();
|
||||||
|
let pkcs8_public = `
|
||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKsjSlD8RFGknc67X3Rcl50WrzjqcNg/
|
||||||
|
nas61fIPGUUrkPenokm7ZHCwrDKWxD3FjTFg+lFlRkowR5Ht72CZE0sCAwEAAQ==
|
||||||
|
-----END PUBLIC KEY-----`.trim();
|
||||||
|
let pkcs8_public_pem = `
|
||||||
|
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKsjSlD8RFGknc67X3Rcl50WrzjqcNg/
|
||||||
|
nas61fIPGUUrkPenokm7ZHCwrDKWxD3FjTFg+lFlRkowR5Ht72CZE0sCAwEAAQ==
|
||||||
|
`.trim();
|
||||||
|
let pkcs1_private = `
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIBOAIBAAJBAKsjSlD8RFGknc67X3Rcl50WrzjqcNg/nas61fIPGUUrkPenokm7
|
||||||
|
ZHCwrDKWxD3FjTFg+lFlRkowR5Ht72CZE0sCAwEAAQI/b6OV1z65UokQaMvSeRXt
|
||||||
|
0Yv6wiYtduQI9qpq5nzy/ytaqsbBfClNTi/HifKPKxlRouWFkc518EQI8LBxoarJ
|
||||||
|
AiEA4DaONMplV8PQNa3TKn2F+SDEvLOCjdL0kHKdN90Ti28CIQDDZnTBaHgZwZbA
|
||||||
|
hS7Bbf5yvwjWMhO6Y7l04/Qm7R+35QIgPuQuqXIoUSD080mp1N5WyRW++atksIF+
|
||||||
|
5lGv9e6GP/MCICnj8y/rl6Pd7tXDN6zcSeqLrfdNsREKhB3dKOCXgW9JAiAFYtFS
|
||||||
|
EJNBXVRTK42SNsZ2hJ/9xLwOwnH2epT8Q43s3Q==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
|
`.trim();
|
||||||
|
let pkcs8_private = `
|
||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIBUgIBADANBgkqhkiG9w0BAQEFAASCATwwggE4AgEAAkEAqyNKUPxEUaSdzrtf
|
||||||
|
dFyXnRavOOpw2D+dqzrV8g8ZRSuQ96eiSbtkcLCsMpbEPcWNMWD6UWVGSjBHke3v
|
||||||
|
YJkTSwIDAQABAj9vo5XXPrlSiRBoy9J5Fe3Ri/rCJi125Aj2qmrmfPL/K1qqxsF8
|
||||||
|
KU1OL8eJ8o8rGVGi5YWRznXwRAjwsHGhqskCIQDgNo40ymVXw9A1rdMqfYX5IMS8
|
||||||
|
s4KN0vSQcp033ROLbwIhAMNmdMFoeBnBlsCFLsFt/nK/CNYyE7pjuXTj9CbtH7fl
|
||||||
|
AiA+5C6pcihRIPTzSanU3lbJFb75q2SwgX7mUa/17oY/8wIgKePzL+uXo93u1cM3
|
||||||
|
rNxJ6out902xEQqEHd0o4JeBb0kCIAVi0VIQk0FdVFMrjZI2xnaEn/3EvA7CcfZ6
|
||||||
|
lPxDjezd
|
||||||
|
-----END PRIVATE KEY-----
|
||||||
|
`.trim();
|
||||||
|
let data = `
|
||||||
|
NodeRsa
|
||||||
|
这是node-rsa 现在修改集成在drpy里使用`.trim();
|
||||||
|
let encryptedWithPublic = NODERSA.encryptRSAWithPublicKey(data, pkcs1_public, {
|
||||||
|
outputEncoding: "base64",
|
||||||
|
options: {
|
||||||
|
environment: "browser",
|
||||||
|
encryptionScheme: "pkcs1_oaep"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log("公钥加密");
|
||||||
|
console.log(encryptedWithPublic);
|
||||||
|
let decryptedWithPrivate = NODERSA.decryptRSAWithPrivateKey(encryptedWithPublic, pkcs1_private, {
|
||||||
|
options: {
|
||||||
|
environment: "browser",
|
||||||
|
encryptionScheme: "pkcs1_oaep"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log("私钥解密");
|
||||||
|
console.log(decryptedWithPrivate);
|
||||||
|
let pkcs1_sha256_sign = NODERSA.sign("1", pkcs1_private, {
|
||||||
|
outputEncoding: "base64",
|
||||||
|
options: {
|
||||||
|
environment: "browser",
|
||||||
|
encryptionScheme: "pkcs1",
|
||||||
|
signingScheme: "pkcs1-sha256"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log("pkcs1_sha256_sign");
|
||||||
|
console.log(pkcs1_sha256_sign);
|
||||||
|
let pkcs1_sha256_sign_verify = NODERSA.verify("1", "Oulx2QrgeipKYBtqEDqFb2s/+ndk2cGQxO4CkhU7iBM1vyNmmvqubpsmeoUuN3waGrYZLknSEdwBkfv0tUMpFQ==", pkcs1_private, {
|
||||||
|
options: {
|
||||||
|
environment: "browser",
|
||||||
|
encryptionScheme: "pkcs1",
|
||||||
|
signingScheme: "pkcs1-sha256"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log("pkcs1_sha256_sign_verify");
|
||||||
|
console.log(pkcs1_sha256_sign_verify);
|
||||||
|
let pkcs1_oaep_sha256 = NODERSA.encryptRSAWithPublicKey(data, `-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIIBCgKCAQEA5KOq1gRNyllLNWKQy8sGpZE3Q1ULLSmzZw+eaAhj9lvqn7IsT1du
|
||||||
|
SYn08FfoOA2qMwtz+1O2l1mgzNoSVCyVpVabnTG+C9XKeZXAnJHd8aYA7l7Sxhdm
|
||||||
|
kte+iymYZ0ZBPzijo8938iugtVvqi9UgDmnY3u/NlQDqiL5BGqSxSTd/Sgmy3zD8
|
||||||
|
PYzEa3wD9vehQ5fZZ45vKIq8GNVh2Z8+IGO85FF1OsN7+b2yGJa/FmDDNn0+HP+m
|
||||||
|
PfI+kYBqEVpo0Ztbc3UdxgFwGC8O1n8AQyriwHnSOtIiuBH62J/7qyC/3LEAApRb
|
||||||
|
Dd9YszqzmODjQUddZKHmvc638VW+azc0EwIDAQAB
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
`, {
|
||||||
|
outputEncoding: "base64",
|
||||||
|
options: {
|
||||||
|
environment: "browser",
|
||||||
|
encryptionScheme: {
|
||||||
|
scheme: "pkcs1_oaep",
|
||||||
|
hash: "sha256"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log("pkcs1_oaep_sha256");
|
||||||
|
console.log(pkcs1_oaep_sha256);
|
||||||
|
decryptedWithPrivate = NODERSA.decryptRSAWithPrivateKey("kSZesAAyYh2hdsQnYMdGqb6gKAzTauBKouvBzWcc4+F8RvGd0nwO6mVkUMVilPgUuNxjEauHayHiY8gI3Py45UI3+km0rSGyHrS6dHiHgCkMejXHieglYzAB0IxX3Jkm4z/66bdB/D+GFy0oct5fGCMI1UHPjEAYOsazJDa8lBFNbjiWFeb/qiZtIx3vGM7KYPAZzyRf/zPbbQ8zy9xOmRuOl5nnIxgo0Okp3KO/RIPO4GZOSBA8f2lx1UtNwwrXAMpcNavtoqHVcjJ/9lcotXYQFrn5b299pSIRf2gVm8ZJ31SK6Z8cc14nKtvgnmsgClDzIXJ1o1RcDK+knVAySg==", `-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEpAIBAAKCAQEA5KOq1gRNyllLNWKQy8sGpZE3Q1ULLSmzZw+eaAhj9lvqn7Is
|
||||||
|
T1duSYn08FfoOA2qMwtz+1O2l1mgzNoSVCyVpVabnTG+C9XKeZXAnJHd8aYA7l7S
|
||||||
|
xhdmkte+iymYZ0ZBPzijo8938iugtVvqi9UgDmnY3u/NlQDqiL5BGqSxSTd/Sgmy
|
||||||
|
3zD8PYzEa3wD9vehQ5fZZ45vKIq8GNVh2Z8+IGO85FF1OsN7+b2yGJa/FmDDNn0+
|
||||||
|
HP+mPfI+kYBqEVpo0Ztbc3UdxgFwGC8O1n8AQyriwHnSOtIiuBH62J/7qyC/3LEA
|
||||||
|
ApRbDd9YszqzmODjQUddZKHmvc638VW+azc0EwIDAQABAoIBADZ/QGgUzInvsLp/
|
||||||
|
zO2WbfYm39o/uhNAvk9RbLt1TIZbMFhyOpeKynHi3Swwd9xsfWX/U9zS/lGi/m31
|
||||||
|
iKrhmaW4OA1G3vqpMcK7TBbFufYwUEaA+ZJX344euH8pIfdzyneMQ4z3Far2dS7l
|
||||||
|
QsmjuilVV2kEFadveXewiYoVOWCu00w6bN8wy2SIHlQn+kIL6HQhWz12iKKflIKu
|
||||||
|
eGRdzLHsKmBt6WbY1Wuhx7HU0fAKdlBDPxCHNlI+kybUYE9o5C2vJiaVM5wqJBgZ
|
||||||
|
8Dz8kt1QbLJ910JoLXkLVQ8uC8NJKQwFtqQjTGPnEq0+wbgz6Ij599rKZkwW/xq9
|
||||||
|
l6KoUiECgYEA6Ah42tVdkNW047f03xVYXFH96RgorHRS36mR8Y+ONUq1fwKidovC
|
||||||
|
WjwVujt4OPf3l1W6iyn/F6cu/bsmvPrSc3HTN0B1V31QK4OjgetxQ2PSbTldH02J
|
||||||
|
NPzkt+v+cPxXpx/P5mgt7Weefw5txU547KubGrHUV5rBKFtIx9pj16MCgYEA/EF0
|
||||||
|
o19+D24DZAPwlDS5VbEd7FStnwY4oQ5PqbuNOSbSJLMWU0AqzXcRokp8UTyCZ0X3
|
||||||
|
ATkS1REq97kShCuR+npTR6a6DlY7sdpPI1SMLNajgB2tkx0EOzX+PfNIbHUd4jpJ
|
||||||
|
I0ZMAHv/OOtkzQHDaeTWBTrzsWm6/nTiykfduNECgYEA46AMD4HpPECqKAs66e5i
|
||||||
|
tI6q7JSKskObWVdcmQEfnSAhVOwcvPb2Ptda6UuV8S0xcwDi88rLOUUFUFzc79+P
|
||||||
|
vTkY38cYVi/VChsluDpk7ptqv0PbGu5Rf+3n4pZdEjI7OvR2W64wAAn67uIUxc7p
|
||||||
|
yiO/ET0K9rYWb6S9jXGtKMkCgYEA2kPAqoO7zZoBMQ7/oR0lp/HC1HRIbiqx4RlC
|
||||||
|
8Lgpb+QZPEwA6zPAVVvLVENi4d+bbcRp/xLlKpraNNJcJSSWAMbLPFoU7sbKjA87
|
||||||
|
HnTPfRSTEA2d3Ibk3F7Rh8TzS3Ti0JZiJjVzGZAwu41iAMifzwaD8K6boUy80eNN
|
||||||
|
QH2CaaECgYBUsLYvC/MiYg3w+LGOONuQongoVUXjGqnw2bjVa9RK7lwRdXPUqJ51
|
||||||
|
MpVO98IkoLvGSI/0sGNP3GKNhC+eMGjJAVwFyEuOn+JsmMv9Y9uStIVi5tIHIhKw
|
||||||
|
m7mp8il0kaftHdSxTbspG3tZ2fjIiFIZkLEOmRpd7ogWumgOajzUdA==
|
||||||
|
-----END RSA PRIVATE KEY-----`, {
|
||||||
|
options: {
|
||||||
|
environment: "browser",
|
||||||
|
encryptionScheme: "pkcs1_oaep"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log("decryptedWithPrivate");
|
||||||
|
console.log(decryptedWithPrivate);
|
||||||
|
(() => {
|
||||||
|
let key = new NODERSA.NodeRSA({
|
||||||
|
b: 1024
|
||||||
|
});
|
||||||
|
key.setOptions({
|
||||||
|
encryptionScheme: "pkcs1"
|
||||||
|
});
|
||||||
|
let text = `你好drpy node-ras`;
|
||||||
|
let encrypted = key.encrypt(text, "base64");
|
||||||
|
console.log("encrypted: ", encrypted);
|
||||||
|
const decrypted = key.decrypt(encrypted, "utf8");
|
||||||
|
console.log("decrypted: ", decrypted)
|
||||||
|
})();
|
||||||
|
let t2 = (new Date)
|
||||||
|
.getTime();
|
||||||
|
console.log("rsa_demo_test 测试耗时:" + (t2 - t1) + "毫秒")
|
||||||
|
}
|
||||||
function pre() {
|
function pre() {
|
||||||
if (typeof rule.预处理 === "string" && rule.预处理 && rule.预处理.trim()) {
|
if (typeof rule.预处理 === "string" && rule.预处理 && rule.预处理.trim()) {
|
||||||
let code = rule.预处理.trim();
|
let code = rule.预处理.trim();
|
||||||
@ -30,7 +194,7 @@ function pre() {
|
|||||||
}
|
}
|
||||||
let rule = {};
|
let rule = {};
|
||||||
let vercode = typeof pdfl === "function" ? "drpy2.1" : "drpy2";
|
let vercode = typeof pdfl === "function" ? "drpy2.1" : "drpy2";
|
||||||
const VERSION = vercode + " 3.9.49beta40 202400426";
|
const VERSION = vercode + " 3.9.50beta17 202400524";
|
||||||
const MOBILE_UA = "Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36";
|
const MOBILE_UA = "Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36";
|
||||||
const PC_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36";
|
const PC_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36";
|
||||||
const UA = "Mozilla/5.0";
|
const UA = "Mozilla/5.0";
|
||||||
@ -40,7 +204,7 @@ const RULE_CK = "cookie";
|
|||||||
const CATE_EXCLUDE = "首页|留言|APP|下载|资讯|新闻|动态";
|
const CATE_EXCLUDE = "首页|留言|APP|下载|资讯|新闻|动态";
|
||||||
const TAB_EXCLUDE = "猜你|喜欢|下载|剧情|热播";
|
const TAB_EXCLUDE = "猜你|喜欢|下载|剧情|热播";
|
||||||
const OCR_RETRY = 3;
|
const OCR_RETRY = 3;
|
||||||
const OCR_API = "http://drpy.nokia.press:8028/ocr/drpy/text";
|
const OCR_API = "https://api.nn.ci/ocr/b64/text";
|
||||||
if (typeof MY_URL === "undefined") {
|
if (typeof MY_URL === "undefined") {
|
||||||
var MY_URL
|
var MY_URL
|
||||||
}
|
}
|
||||||
@ -61,6 +225,91 @@ const NOADD_INDEX = /:eq|:lt|:gt|:first|:last|^body$|^#/;
|
|||||||
const URLJOIN_ATTR = /(url|src|href|-original|-src|-play|-url|style)$/;
|
const URLJOIN_ATTR = /(url|src|href|-original|-src|-play|-url|style)$/;
|
||||||
const SELECT_REGEX = /:eq|:lt|:gt|#/g;
|
const SELECT_REGEX = /:eq|:lt|:gt|#/g;
|
||||||
const SELECT_REGEX_A = /:eq|:lt|:gt/g;
|
const SELECT_REGEX_A = /:eq|:lt|:gt/g;
|
||||||
|
const $js = {
|
||||||
|
toString(func) {
|
||||||
|
let strfun = func.toString();
|
||||||
|
return strfun.replace(/^\(\)(\s+)?=>(\s+)?\{/, "js:")
|
||||||
|
.replace(/\}$/, "")
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function window_b64() {
|
||||||
|
let b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
|
let base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
|
||||||
|
|
||||||
|
function btoa(str) {
|
||||||
|
var out, i, len;
|
||||||
|
var c1, c2, c3;
|
||||||
|
len = str.length;
|
||||||
|
i = 0;
|
||||||
|
out = "";
|
||||||
|
while (i < len) {
|
||||||
|
c1 = str.charCodeAt(i++) & 255;
|
||||||
|
if (i == len) {
|
||||||
|
out += b64map.charAt(c1 >> 2);
|
||||||
|
out += b64map.charAt((c1 & 3) << 4);
|
||||||
|
out += "==";
|
||||||
|
break
|
||||||
|
}
|
||||||
|
c2 = str.charCodeAt(i++);
|
||||||
|
if (i == len) {
|
||||||
|
out += b64map.charAt(c1 >> 2);
|
||||||
|
out += b64map.charAt((c1 & 3) << 4 | (c2 & 240) >> 4);
|
||||||
|
out += b64map.charAt((c2 & 15) << 2);
|
||||||
|
out += "=";
|
||||||
|
break
|
||||||
|
}
|
||||||
|
c3 = str.charCodeAt(i++);
|
||||||
|
out += b64map.charAt(c1 >> 2);
|
||||||
|
out += b64map.charAt((c1 & 3) << 4 | (c2 & 240) >> 4);
|
||||||
|
out += b64map.charAt((c2 & 15) << 2 | (c3 & 192) >> 6);
|
||||||
|
out += b64map.charAt(c3 & 63)
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
function atob(str) {
|
||||||
|
var c1, c2, c3, c4;
|
||||||
|
var i, len, out;
|
||||||
|
len = str.length;
|
||||||
|
i = 0;
|
||||||
|
out = "";
|
||||||
|
while (i < len) {
|
||||||
|
do {
|
||||||
|
c1 = base64DecodeChars[str.charCodeAt(i++) & 255]
|
||||||
|
} while (i < len && c1 == -1);
|
||||||
|
if (c1 == -1) break;
|
||||||
|
do {
|
||||||
|
c2 = base64DecodeChars[str.charCodeAt(i++) & 255]
|
||||||
|
} while (i < len && c2 == -1);
|
||||||
|
if (c2 == -1) break;
|
||||||
|
out += String.fromCharCode(c1 << 2 | (c2 & 48) >> 4);
|
||||||
|
do {
|
||||||
|
c3 = str.charCodeAt(i++) & 255;
|
||||||
|
if (c3 == 61) return out;
|
||||||
|
c3 = base64DecodeChars[c3]
|
||||||
|
} while (i < len && c3 == -1);
|
||||||
|
if (c3 == -1) break;
|
||||||
|
out += String.fromCharCode((c2 & 15) << 4 | (c3 & 60) >> 2);
|
||||||
|
do {
|
||||||
|
c4 = str.charCodeAt(i++) & 255;
|
||||||
|
if (c4 == 61) return out;
|
||||||
|
c4 = base64DecodeChars[c4]
|
||||||
|
} while (i < len && c4 == -1);
|
||||||
|
if (c4 == -1) break;
|
||||||
|
out += String.fromCharCode((c3 & 3) << 6 | c4)
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
atob: atob,
|
||||||
|
btoa: btoa
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (typeof atob != "function" || typeof btoa != "function") {
|
||||||
|
var {
|
||||||
|
atob, btoa
|
||||||
|
} = window_b64()
|
||||||
|
}
|
||||||
if (typeof Object.assign != "function") {
|
if (typeof Object.assign != "function") {
|
||||||
Object.assign = function() {
|
Object.assign = function() {
|
||||||
let target = arguments[0];
|
let target = arguments[0];
|
||||||
@ -107,7 +356,8 @@ if (!Array.prototype.includes) {
|
|||||||
k++
|
k++
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
},
|
||||||
|
enumerable: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (typeof String.prototype.startsWith != "function") {
|
if (typeof String.prototype.startsWith != "function") {
|
||||||
@ -120,20 +370,8 @@ if (typeof String.prototype.endsWith != "function") {
|
|||||||
return this.indexOf(suffix, this.length - suffix.length) !== -1
|
return this.indexOf(suffix, this.length - suffix.length) !== -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Object.prototype.myValues = function(obj) {
|
Object.defineProperty(Object.prototype, "myValues", {
|
||||||
if (obj == null) {
|
value: function(obj) {
|
||||||
throw new TypeError("Cannot convert undefined or null to object")
|
|
||||||
}
|
|
||||||
var res = [];
|
|
||||||
for (var k in obj) {
|
|
||||||
if (obj.hasOwnProperty(k)) {
|
|
||||||
res.push(obj[k])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
};
|
|
||||||
if (typeof Object.prototype.values != "function") {
|
|
||||||
Object.prototype.values = function(obj) {
|
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
throw new TypeError("Cannot convert undefined or null to object")
|
throw new TypeError("Cannot convert undefined or null to object")
|
||||||
}
|
}
|
||||||
@ -144,44 +382,77 @@ if (typeof Object.prototype.values != "function") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
},
|
||||||
|
enumerable: false
|
||||||
|
});
|
||||||
|
if (typeof Object.prototype.values != "function") {
|
||||||
|
Object.defineProperty(Object.prototype, "values", {
|
||||||
|
value: function(obj) {
|
||||||
|
if (obj == null) {
|
||||||
|
throw new TypeError("Cannot convert undefined or null to object")
|
||||||
|
}
|
||||||
|
var res = [];
|
||||||
|
for (var k in obj) {
|
||||||
|
if (obj.hasOwnProperty(k)) {
|
||||||
|
res.push(obj[k])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
},
|
||||||
|
enumerable: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (typeof Array.prototype.join != "function") {
|
if (typeof Array.prototype.join != "function") {
|
||||||
Array.prototype.join = function(emoji) {
|
Object.defineProperty(Array.prototype, "join", {
|
||||||
emoji = emoji || "";
|
value: function(emoji) {
|
||||||
let self = this;
|
emoji = emoji || "";
|
||||||
let str = "";
|
let self = this;
|
||||||
let i = 0;
|
let str = "";
|
||||||
if (!Array.isArray(self)) {
|
let i = 0;
|
||||||
throw String(self) + "is not Array"
|
if (!Array.isArray(self)) {
|
||||||
}
|
throw String(self) + "is not Array"
|
||||||
if (self.length === 0) {
|
}
|
||||||
return ""
|
if (self.length === 0) {
|
||||||
}
|
return ""
|
||||||
if (self.length === 1) {
|
}
|
||||||
return String(self[0])
|
if (self.length === 1) {
|
||||||
}
|
return String(self[0])
|
||||||
i = 1;
|
}
|
||||||
str = this[0];
|
i = 1;
|
||||||
for (; i < self.length; i++) {
|
str = this[0];
|
||||||
str += String(emoji) + String(self[i])
|
for (; i < self.length; i++) {
|
||||||
}
|
str += String(emoji) + String(self[i])
|
||||||
return str
|
}
|
||||||
}
|
return str
|
||||||
|
},
|
||||||
|
enumerable: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (typeof Array.prototype.toReversed != "function") {
|
if (typeof Array.prototype.toReversed != "function") {
|
||||||
Array.prototype.toReversed = function() {
|
Object.defineProperty(Array.prototype, "toReversed", {
|
||||||
const clonedList = this.slice();
|
value: function() {
|
||||||
const reversedList = clonedList.reverse();
|
const clonedList = this.slice();
|
||||||
return reversedList
|
const reversedList = clonedList.reverse();
|
||||||
}
|
return reversedList
|
||||||
|
},
|
||||||
|
enumerable: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
String.prototype.rstrip = function(chars) {
|
Object.defineProperty(Array.prototype, "append", {
|
||||||
let regex = new RegExp(chars + "$");
|
value: Array.prototype.push,
|
||||||
return this.replace(regex, "")
|
enumerable: false
|
||||||
};
|
});
|
||||||
Array.prototype.append = Array.prototype.push;
|
Object.defineProperty(String.prototype, "strip", {
|
||||||
String.prototype.strip = String.prototype.trim;
|
value: String.prototype.trim,
|
||||||
|
enumerable: false
|
||||||
|
});
|
||||||
|
Object.defineProperty(String.prototype, "rstrip", {
|
||||||
|
value: function(chars) {
|
||||||
|
let regex = new RegExp(chars + "$");
|
||||||
|
return this.replace(regex, "")
|
||||||
|
},
|
||||||
|
enumerable: false
|
||||||
|
});
|
||||||
|
|
||||||
function 是否正版(vipUrl) {
|
function 是否正版(vipUrl) {
|
||||||
let flag = new RegExp("qq.com|iqiyi.com|youku.com|mgtv.com|bilibili.com|sohu.com|ixigua.com|pptv.com|miguvideo.com|le.com|1905.com|fun.tv");
|
let flag = new RegExp("qq.com|iqiyi.com|youku.com|mgtv.com|bilibili.com|sohu.com|ixigua.com|pptv.com|miguvideo.com|le.com|1905.com|fun.tv");
|
||||||
@ -336,6 +607,59 @@ function md5(text) {
|
|||||||
return CryptoJS.MD5(text)
|
return CryptoJS.MD5(text)
|
||||||
.toString()
|
.toString()
|
||||||
}
|
}
|
||||||
|
function uint8ArrayToBase64(uint8Array) {
|
||||||
|
let binaryString = String.fromCharCode.apply(null, Array.from(uint8Array));
|
||||||
|
return btoa(binaryString)
|
||||||
|
}
|
||||||
|
function Utf8ArrayToStr(array) {
|
||||||
|
var out, i, len, c;
|
||||||
|
var char2, char3;
|
||||||
|
out = "";
|
||||||
|
len = array.length;
|
||||||
|
i = 0;
|
||||||
|
while (i < len) {
|
||||||
|
c = array[i++];
|
||||||
|
switch (c >> 4) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
out += String.fromCharCode(c);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
case 13:
|
||||||
|
char2 = array[i++];
|
||||||
|
out += String.fromCharCode((c & 31) << 6 | char2 & 63);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
char2 = array[i++];
|
||||||
|
char3 = array[i++];
|
||||||
|
out += String.fromCharCode((c & 15) << 12 | (char2 & 63) << 6 | (char3 & 63) << 0);
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
function gzip(str) {
|
||||||
|
let arr = pako.gzip(str, {
|
||||||
|
to: "string"
|
||||||
|
});
|
||||||
|
return uint8ArrayToBase64(arr)
|
||||||
|
}
|
||||||
|
function ungzip(b64Data) {
|
||||||
|
let strData = atob(b64Data);
|
||||||
|
const charData = strData.split("")
|
||||||
|
.map(function(x) {
|
||||||
|
return x.charCodeAt(0)
|
||||||
|
});
|
||||||
|
const binData = new Uint8Array(charData);
|
||||||
|
const data = pako.inflate(binData);
|
||||||
|
return Utf8ArrayToStr(data)
|
||||||
|
}
|
||||||
function encodeStr(input, encoding) {
|
function encodeStr(input, encoding) {
|
||||||
encoding = encoding || "gbk";
|
encoding = encoding || "gbk";
|
||||||
if (encoding.startsWith("gb")) {
|
if (encoding.startsWith("gb")) {
|
||||||
@ -472,9 +796,12 @@ function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) {
|
|||||||
.trim();
|
.trim();
|
||||||
return m3u8_text
|
return m3u8_text
|
||||||
}
|
}
|
||||||
function fixAdM3u8Ai(m3u8_url) {
|
function fixAdM3u8Ai(m3u8_url, headers) {
|
||||||
let ts = (new Date)
|
let ts = (new Date)
|
||||||
.getTime();
|
.getTime();
|
||||||
|
let option = headers ? {
|
||||||
|
headers: headers
|
||||||
|
} : {};
|
||||||
|
|
||||||
function b(s1, s2) {
|
function b(s1, s2) {
|
||||||
let i = 0;
|
let i = 0;
|
||||||
@ -491,16 +818,22 @@ function fixAdM3u8Ai(m3u8_url) {
|
|||||||
.reverse()
|
.reverse()
|
||||||
.join("")
|
.join("")
|
||||||
}
|
}
|
||||||
let m3u8 = request(m3u8_url);
|
let m3u8 = request(m3u8_url, option);
|
||||||
m3u8 = m3u8.trim()
|
m3u8 = m3u8.trim()
|
||||||
.split("\n")
|
.split("\n")
|
||||||
.map(it => it.startsWith("#") ? it : urljoin(m3u8_url, it))
|
.map(it => it.startsWith("#") ? it : urljoin(m3u8_url, it))
|
||||||
.join("\n");
|
.join("\n");
|
||||||
|
m3u8 = m3u8.replace(/\n\n/gi, "\n");
|
||||||
let last_url = m3u8.split("\n")
|
let last_url = m3u8.split("\n")
|
||||||
.slice(-1)[0];
|
.slice(-1)[0];
|
||||||
|
if (last_url.length < 5) {
|
||||||
|
last_url = m3u8.split("\n")
|
||||||
|
.slice(-2)[0]
|
||||||
|
}
|
||||||
if (last_url.includes(".m3u8") && last_url !== m3u8_url) {
|
if (last_url.includes(".m3u8") && last_url !== m3u8_url) {
|
||||||
m3u8_url = last_url;
|
m3u8_url = urljoin2(m3u8_url, last_url);
|
||||||
m3u8 = request(m3u8_url)
|
log("嵌套的m3u8_url:" + m3u8_url);
|
||||||
|
m3u8 = request(m3u8_url, option)
|
||||||
}
|
}
|
||||||
let s = m3u8.trim()
|
let s = m3u8.trim()
|
||||||
.split("\n")
|
.split("\n")
|
||||||
@ -513,12 +846,14 @@ function fixAdM3u8Ai(m3u8_url) {
|
|||||||
let ml = Math.round(ss.length / 2)
|
let ml = Math.round(ss.length / 2)
|
||||||
.toString()
|
.toString()
|
||||||
.length;
|
.length;
|
||||||
|
let maxc = 0;
|
||||||
let laststr = ss.toReversed()
|
let laststr = ss.toReversed()
|
||||||
.find(x => {
|
.find(x => {
|
||||||
if (!x.startsWith("#")) {
|
if (!x.startsWith("#")) {
|
||||||
let k = b(reverseString(firststr), reverseString(x));
|
let k = b(reverseString(firststr), reverseString(x));
|
||||||
maxl = b(firststr, x);
|
maxl = b(firststr, x);
|
||||||
if (firststrlen - maxl <= ml + k) {
|
maxc++;
|
||||||
|
if (firststrlen - maxl <= ml + k || maxc > 10) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,6 +922,26 @@ let LISTS = [];
|
|||||||
globalThis.encodeUrl = urlencode;
|
globalThis.encodeUrl = urlencode;
|
||||||
globalThis.urlencode = urlencode;
|
globalThis.urlencode = urlencode;
|
||||||
|
|
||||||
|
function getQuery(url) {
|
||||||
|
try {
|
||||||
|
if (url.indexOf("?") > -1) {
|
||||||
|
url = url.slice(url.indexOf("?") + 1)
|
||||||
|
}
|
||||||
|
let arr = url.split("#")[0].split("&");
|
||||||
|
const resObj = {};
|
||||||
|
arr.forEach(item => {
|
||||||
|
let arr1 = item.split("=");
|
||||||
|
let key = arr1[0];
|
||||||
|
let value = arr1.slice(1)
|
||||||
|
.join("=");
|
||||||
|
resObj[key] = value
|
||||||
|
});
|
||||||
|
return resObj
|
||||||
|
} catch (err) {
|
||||||
|
log("getQuery发生错误:" + e.message);
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
function urljoin(fromPath, nowPath) {
|
function urljoin(fromPath, nowPath) {
|
||||||
fromPath = fromPath || "";
|
fromPath = fromPath || "";
|
||||||
nowPath = nowPath || "";
|
nowPath = nowPath || "";
|
||||||
@ -774,15 +1129,22 @@ var OcrApi = {
|
|||||||
let code = "";
|
let code = "";
|
||||||
try {
|
try {
|
||||||
log("通过drpy_ocr验证码接口过验证...");
|
log("通过drpy_ocr验证码接口过验证...");
|
||||||
let html = request(OCR_API, {
|
let html = "";
|
||||||
data: {
|
if (this.api.endsWith("drpy/text")) {
|
||||||
img: img
|
html = request(this.api, {
|
||||||
},
|
data: {
|
||||||
headers: {
|
img: img
|
||||||
"User-Agent": PC_UA
|
},
|
||||||
},
|
headers: {
|
||||||
method: "POST"
|
"User-Agent": PC_UA
|
||||||
}, true);
|
},
|
||||||
|
method: "POST"
|
||||||
|
}, true)
|
||||||
|
} else {
|
||||||
|
html = post(this.api, {
|
||||||
|
body: img
|
||||||
|
})
|
||||||
|
}
|
||||||
code = html || ""
|
code = html || ""
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`OCR识别验证码发生错误:${e.message}`)
|
log(`OCR识别验证码发生错误:${e.message}`)
|
||||||
@ -877,7 +1239,7 @@ function buildUrl(url, obj) {
|
|||||||
url += prs;
|
url += prs;
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
function require(url) {
|
function $require(url) {
|
||||||
eval(request(url))
|
eval(request(url))
|
||||||
}
|
}
|
||||||
function request(url, obj, ocr_flag) {
|
function request(url, obj, ocr_flag) {
|
||||||
@ -950,6 +1312,27 @@ function post(url, obj) {
|
|||||||
obj.method = "POST";
|
obj.method = "POST";
|
||||||
return request(url, obj)
|
return request(url, obj)
|
||||||
}
|
}
|
||||||
|
function reqCookie(url, obj, all_cookie) {
|
||||||
|
obj = obj || {};
|
||||||
|
obj.withHeaders = true;
|
||||||
|
all_cookie = all_cookie || false;
|
||||||
|
let html = request(url, obj);
|
||||||
|
let json = JSON.parse(html);
|
||||||
|
let setCk = Object.keys(json)
|
||||||
|
.find(it => it.toLowerCase() === "set-cookie");
|
||||||
|
let cookie = setCk ? json[setCk] : "";
|
||||||
|
if (Array.isArray(cookie)) {
|
||||||
|
cookie = cookie.join(";")
|
||||||
|
}
|
||||||
|
if (!all_cookie) {
|
||||||
|
cookie = cookie.split(";")[0]
|
||||||
|
}
|
||||||
|
html = json.body;
|
||||||
|
return {
|
||||||
|
cookie: cookie,
|
||||||
|
html: html
|
||||||
|
}
|
||||||
|
}
|
||||||
fetch = request;
|
fetch = request;
|
||||||
print = function(data) {
|
print = function(data) {
|
||||||
data = data || "";
|
data = data || "";
|
||||||
@ -1307,6 +1690,7 @@ function categoryParse(cateObj) {
|
|||||||
} else {
|
} else {
|
||||||
url = url.replace("fyfilter", rule.filter_url)
|
url = url.replace("fyfilter", rule.filter_url)
|
||||||
}
|
}
|
||||||
|
url = url.replaceAll("fyclass", cateObj.tid);
|
||||||
let fl = cateObj.filter ? cateObj.extend : {};
|
let fl = cateObj.filter ? cateObj.extend : {};
|
||||||
if (rule.filter_def && typeof rule.filter_def === "object") {
|
if (rule.filter_def && typeof rule.filter_def === "object") {
|
||||||
try {
|
try {
|
||||||
@ -1874,7 +2258,11 @@ function detailParse(detailObj) {
|
|||||||
let t2 = (new Date)
|
let t2 = (new Date)
|
||||||
.getTime();
|
.getTime();
|
||||||
console.log(`加载二级界面${MY_URL}耗时:${t2-t1}毫秒`);
|
console.log(`加载二级界面${MY_URL}耗时:${t2-t1}毫秒`);
|
||||||
vod = vodDeal(vod);
|
try {
|
||||||
|
vod = vodDeal(vod)
|
||||||
|
} catch (e) {
|
||||||
|
console.log(`vodDeal发生错误:${e.message}`)
|
||||||
|
}
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
list: [vod]
|
list: [vod]
|
||||||
})
|
})
|
||||||
@ -1950,8 +2338,11 @@ function playParse(playObj) {
|
|||||||
lazy_play = common_play
|
lazy_play = common_play
|
||||||
} else if (rule.play_parse && rule.lazy && typeof rule.lazy === "string") {
|
} else if (rule.play_parse && rule.lazy && typeof rule.lazy === "string") {
|
||||||
try {
|
try {
|
||||||
let lazy_code = rule.lazy.replace("js:", "")
|
let lazy_code = rule.lazy.trim();
|
||||||
.trim();
|
if (lazy_code.startsWith("js:")) {
|
||||||
|
lazy_code = lazy_code.replace("js:", "")
|
||||||
|
.trim()
|
||||||
|
}
|
||||||
print("开始执行js免嗅=>" + lazy_code);
|
print("开始执行js免嗅=>" + lazy_code);
|
||||||
eval(lazy_code);
|
eval(lazy_code);
|
||||||
lazy_play = typeof input === "object" ? input : {
|
lazy_play = typeof input === "object" ? input : {
|
||||||
@ -2037,13 +2428,19 @@ function init(ext) {
|
|||||||
if (typeof ext == "object") {
|
if (typeof ext == "object") {
|
||||||
rule = ext
|
rule = ext
|
||||||
} else if (typeof ext == "string") {
|
} else if (typeof ext == "string") {
|
||||||
if (ext.startsWith("http")) {
|
if (ext.startsWith("http") || ext.startsWith("file://")) {
|
||||||
|
let query = getQuery(ext);
|
||||||
let js = request(ext, {
|
let js = request(ext, {
|
||||||
method: "GET"
|
method: "GET"
|
||||||
});
|
});
|
||||||
if (js) {
|
if (js) {
|
||||||
eval(js.replace("var rule", "rule"))
|
eval(js.replace("var rule", "rule"))
|
||||||
}
|
}
|
||||||
|
if (query.type === "url" && query.params) {
|
||||||
|
rule.params = urljoin(ext, query.params)
|
||||||
|
} else if (query.params) {
|
||||||
|
rule.params = query.params
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
eval(ext.replace("var rule", "rule"))
|
eval(ext.replace("var rule", "rule"))
|
||||||
}
|
}
|
||||||
@ -2109,9 +2506,15 @@ function init(ext) {
|
|||||||
rule.play_json = rule.hasOwnProperty("play_json") ? rule.play_json : [];
|
rule.play_json = rule.hasOwnProperty("play_json") ? rule.play_json : [];
|
||||||
rule.pagecount = rule.hasOwnProperty("pagecount") ? rule.pagecount : {};
|
rule.pagecount = rule.hasOwnProperty("pagecount") ? rule.pagecount : {};
|
||||||
rule.proxy_rule = rule.hasOwnProperty("proxy_rule") ? rule.proxy_rule : "";
|
rule.proxy_rule = rule.hasOwnProperty("proxy_rule") ? rule.proxy_rule : "";
|
||||||
|
if (!rule.hasOwnProperty("sniffer")) {
|
||||||
|
rule.sniffer = false
|
||||||
|
}
|
||||||
rule.sniffer = rule.hasOwnProperty("sniffer") ? rule.sniffer : "";
|
rule.sniffer = rule.hasOwnProperty("sniffer") ? rule.sniffer : "";
|
||||||
rule.sniffer = !! (rule.sniffer && rule.sniffer !== "0" && rule.sniffer !== "false");
|
rule.sniffer = !! (rule.sniffer && rule.sniffer !== "0" && rule.sniffer !== "false");
|
||||||
rule.isVideo = rule.hasOwnProperty("isVideo") ? rule.isVideo : "";
|
rule.isVideo = rule.hasOwnProperty("isVideo") ? rule.isVideo : "";
|
||||||
|
if (rule.sniffer && !rule.isVideo) {
|
||||||
|
rule.isVideo = "http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)\\?.*|http((?!http).){12,}\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)|http((?!http).)*?video/tos*|http((?!http).)*?obj/tos*"
|
||||||
|
}
|
||||||
rule.tab_remove = rule.hasOwnProperty("tab_remove") ? rule.tab_remove : [];
|
rule.tab_remove = rule.hasOwnProperty("tab_remove") ? rule.tab_remove : [];
|
||||||
rule.tab_order = rule.hasOwnProperty("tab_order") ? rule.tab_order : [];
|
rule.tab_order = rule.hasOwnProperty("tab_order") ? rule.tab_order : [];
|
||||||
rule.tab_rename = rule.hasOwnProperty("tab_rename") ? rule.tab_rename : {};
|
rule.tab_rename = rule.hasOwnProperty("tab_rename") ? rule.tab_rename : {};
|
||||||
@ -2160,6 +2563,15 @@ let homeHtmlCache = undefined;
|
|||||||
|
|
||||||
function home(filter) {
|
function home(filter) {
|
||||||
console.log("home");
|
console.log("home");
|
||||||
|
if (typeof rule.filter === "string" && rule.filter.trim()
|
||||||
|
.length > 0) {
|
||||||
|
try {
|
||||||
|
let filter_json = ungzip(rule.filter.trim());
|
||||||
|
rule.filter = JSON.parse(filter_json)
|
||||||
|
} catch (e) {
|
||||||
|
rule.filter = {}
|
||||||
|
}
|
||||||
|
}
|
||||||
let homeObj = {
|
let homeObj = {
|
||||||
filter: rule.filter || false,
|
filter: rule.filter || false,
|
||||||
MY_URL: rule.homeUrl,
|
MY_URL: rule.homeUrl,
|
||||||
@ -2298,7 +2710,8 @@ function DRPY() {
|
|||||||
search: search,
|
search: search,
|
||||||
proxy: proxy,
|
proxy: proxy,
|
||||||
sniffer: sniffer,
|
sniffer: sniffer,
|
||||||
isVideo: isVideo
|
isVideo: isVideo,
|
||||||
|
fixAdM3u8Ai: fixAdM3u8Ai
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export
|
export
|
||||||
@ -2313,5 +2726,6 @@ default {
|
|||||||
proxy: proxy,
|
proxy: proxy,
|
||||||
sniffer: sniffer,
|
sniffer: sniffer,
|
||||||
isVideo: isVideo,
|
isVideo: isVideo,
|
||||||
|
fixAdM3u8Ai: fixAdM3u8Ai,
|
||||||
DRPY: DRPY
|
DRPY: DRPY
|
||||||
};
|
};
|
528
JS/jsencrypt.js
528
JS/jsencrypt.js
File diff suppressed because one or more lines are too long
2
JS/node-rsa.js
Normal file
2
JS/node-rsa.js
Normal file
File diff suppressed because one or more lines are too long
2
JS/pako.min.js
vendored
Normal file
2
JS/pako.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
59
JS/喵物次元.js
59
JS/喵物次元.js
@ -1,23 +1,38 @@
|
|||||||
var rule = {
|
var rule = {
|
||||||
title: '喵物次元',
|
title:'喵物次元',
|
||||||
host: 'https://catw.moe',
|
host:'https://www.mwcy.net/',
|
||||||
模板:'短视2',
|
url:'/catshow/fyclass/fypage.html',
|
||||||
searchUrl: '/index.php/vod/search/wd/**.html',
|
searchUrl:'/catsearch/page/fypage/wd/**.html',
|
||||||
url:'index.php/vod/show/id/fyclass/page/fypage.html',
|
searchable:2,
|
||||||
searchable: 2,//是否启用全局搜索,
|
quickSearch:0,
|
||||||
quickSearch: 1,//是否启用快速搜索,
|
filterable:1,
|
||||||
filterable: 0,//是否启用分类筛选,
|
filter:'',
|
||||||
headers: {
|
filter_url:'',
|
||||||
'User-Agent': 'MOBILE_UA'
|
filter_def:{},
|
||||||
},
|
headers:{
|
||||||
play_parse: true,
|
'User-Agent':'MOBILE_UA',
|
||||||
lazy: '',
|
},
|
||||||
limit: 6,
|
timeout:5000,
|
||||||
tab_rename:{'喵物次元':'LR',},
|
class_parse:'div.head-more a;a&&Text;a&&href;.*/(.*?)\.html',
|
||||||
class_name:'TV动画&剧场版&特摄剧',
|
cate_exclude:'特摄剧|我的|专题|排行榜|周番剧表',
|
||||||
class_url:'1&2&20',
|
play_parse:true,
|
||||||
double: false, // 推荐内容是否双层定位
|
lazy:$js.toString(()=>{
|
||||||
推荐: '*',
|
input = {parse:1,url:input,js:''};
|
||||||
一级: '.public-list-exp;a&&title;img&&data-src;.ft2&&Text;a&&href',
|
}),
|
||||||
搜索: '.public-list-box;.thumb-txt&&Text;.public-list-exp&&img&&data-src;.public-list-prb&&Text;a&&href'
|
double:true,
|
||||||
}
|
//推荐:'.public-list-div;a;a&&title;img&&data-src;.public-list-prb&&Text;a&&href',
|
||||||
|
一级:'.public-list-div a;a&&title;img&&data-src;span:eq(1)&&Text;a&&href;详情',
|
||||||
|
二级:{
|
||||||
|
title:'h3&&Text;.style-detail span:eq(7)&&Text',
|
||||||
|
img:'.style-detail&&img&&data-src',
|
||||||
|
desc:'主要信息;.style-detail&&a&&Text;地区;.style-detail&&.slide-info:eq(2)&&Text;.style-detail&&a:eq(2)&&Text',
|
||||||
|
content:'#height_limit&&Text',
|
||||||
|
tabs:'.nav-swiper a',
|
||||||
|
lists:'.anthology-list-play li',
|
||||||
|
tab_text:'body&&Text',
|
||||||
|
list_text:'body&&Text',
|
||||||
|
list_url:'a&&href',
|
||||||
|
list_url_prefix: '',
|
||||||
|
},
|
||||||
|
搜索:'.box-width:eq(1)&&.public-list-exp;.public-list-exp&&img&&alt;.public-list-exp&&img&&data-src;.public-list-exp&&span&&Text;a&&href',
|
||||||
|
}
|
681
JS/模板.js
681
JS/模板.js
@ -1,304 +1,377 @@
|
|||||||
if (typeof Object.assign != 'function') {
|
if (typeof Object.assign != 'function') {
|
||||||
Object.assign = function () {
|
Object.assign = function () {
|
||||||
var target = arguments[0];
|
let target = arguments[0];
|
||||||
for (var i = 1; i < arguments.length; i++) {
|
for (let i = 1; i < arguments.length; i++) {
|
||||||
var source = arguments[i];
|
let source = arguments[i];
|
||||||
for (var 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 = { // 模板字典
|
function getMubans() {
|
||||||
mxpro: {
|
var mubanDict = { // 模板字典
|
||||||
title: '',
|
mx: {
|
||||||
host: '',
|
title: '',
|
||||||
// homeUrl:'/',
|
host: '',
|
||||||
url: '/vodshow/fyclass--------fypage---.html',
|
url: '/vodshow/fyclass--------fypage---/',
|
||||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
searchUrl: '/vodsearch/**----------fypage---/',
|
||||||
searchable: 2,//是否启用全局搜索,
|
class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
|
||||||
quickSearch: 0,//是否启用快速搜索,
|
searchable: 2,
|
||||||
filterable: 0,//是否启用分类筛选,
|
quickSearch: 0,
|
||||||
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
|
filterable: 0,
|
||||||
'User-Agent': 'MOBILE_UA',
|
headers: {
|
||||||
// "Cookie": "searchneed=ok"
|
'User-Agent': 'MOBILE_UA',
|
||||||
},
|
},
|
||||||
class_parse: '.navbar-items li:gt(2):lt(8);a&&Text;a&&href;/(\\d+).html',
|
play_parse: true,
|
||||||
play_parse: true,
|
lazy: '',
|
||||||
lazy: '',
|
limit: 6,
|
||||||
limit: 6,
|
推荐: '.cbox_list;*;*;*;*;*',
|
||||||
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
double: true,
|
||||||
double: true, // 推荐内容是否双层定位
|
一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
|
||||||
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
二级: {
|
||||||
二级: {
|
title: 'h2&&Text;.detail_list&&ul:eq(1)&&li&&a:eq(2)&&Text',
|
||||||
"title": "h1&&Text;.module-info-tag&&Text",
|
img: '.vodlist_thumb&&data-original',
|
||||||
"img": ".lazyload&&data-original",
|
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',
|
||||||
"desc": ".module-info-item:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(3)&&Text",
|
content: '.content_desc&&span&&Text',
|
||||||
"content": ".module-info-introduction&&Text",
|
tabs: '.play_source_tab&&a',
|
||||||
"tabs": ".module-tab-item",
|
lists: '.content_playlist:eq(#id) li',
|
||||||
"lists": ".module-play-list:eq(#id) a"
|
},
|
||||||
},
|
搜索: '*',
|
||||||
搜索: 'body .module-item;.module-card-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href;.module-info-item-content&&Text',
|
},
|
||||||
},
|
mxpro: {
|
||||||
mxone5: {
|
title: '',
|
||||||
title: '',
|
host: '', // homeUrl:'/',
|
||||||
host: '',
|
url: '/vodshow/fyclass--------fypage---.html',
|
||||||
url: '/show/fyclass--------fypage---.html',
|
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||||
searchUrl: '/search/**----------fypage---.html',
|
searchable: 2,//是否启用全局搜索,
|
||||||
searchable: 2,//是否启用全局搜索,
|
quickSearch: 0,//是否启用快速搜索,
|
||||||
quickSearch: 0,//是否启用快速搜索,
|
filterable: 0,//是否启用分类筛选,
|
||||||
filterable: 0,//是否启用分类筛选,
|
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
|
||||||
class_parse: '.nav-menu-items&&li;a&&Text;a&&href;.*/(.*?).html',
|
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
||||||
play_parse: true,
|
},
|
||||||
lazy: '',
|
class_parse: '.navbar-items li:gt(2):lt(8);a&&Text;a&&href;/(\\d+).html',
|
||||||
limit: 6,
|
play_parse: true,
|
||||||
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
lazy: '',
|
||||||
double: true, // 推荐内容是否双层定位
|
limit: 6,
|
||||||
一级: '.module-items .module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||||
二级: {
|
double: true, // 推荐内容是否双层定位
|
||||||
"title": "h1&&Text;.tag-link&&Text",
|
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||||
"img": ".module-item-pic&&img&&data-src",
|
二级: {
|
||||||
"desc": ".video-info-items:eq(0)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(2)&&Text;.video-info-items:eq(3)&&Text",
|
"title": "h1&&Text;.module-info-tag&&Text",
|
||||||
"content": ".vod_content&&Text",
|
"img": ".lazyload&&data-original",
|
||||||
"tabs": ".module-tab-item",
|
"desc": ".module-info-item:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(3)&&Text",
|
||||||
"lists": ".module-player-list:eq(#id)&&.scroll-content&&a"
|
"content": ".module-info-introduction&&Text",
|
||||||
},
|
"tabs": ".module-tab-item",
|
||||||
搜索: '.module-items .module-search-item;a&&title;img&&data-src;.video-serial&&Text;a&&href',
|
"lists": ".module-play-list:eq(#id) a"
|
||||||
},
|
},
|
||||||
首图: {
|
搜索: 'body .module-item;.module-card-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href;.module-info-item-content&&Text',
|
||||||
title: '',
|
}, mxone5: {
|
||||||
host: '',
|
title: '',
|
||||||
url: '/vodshow/fyclass--------fypage---/',
|
host: '',
|
||||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
url: '/show/fyclass--------fypage---.html',
|
||||||
searchable: 2,//是否启用全局搜索,
|
searchUrl: '/search/**----------fypage---.html',
|
||||||
quickSearch: 0,//是否启用快速搜索,
|
searchable: 2,//是否启用全局搜索,
|
||||||
filterable: 0,//是否启用分类筛选,
|
quickSearch: 0,//是否启用快速搜索,
|
||||||
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
|
filterable: 0,//是否启用分类筛选,
|
||||||
'User-Agent': 'MOBILE_UA',
|
class_parse: '.nav-menu-items&&li;a&&Text;a&&href;.*/(.*?).html',
|
||||||
// "Cookie": "searchneed=ok"
|
play_parse: true,
|
||||||
},
|
lazy: '',
|
||||||
class_parse: '.myui-header__menu li.hidden-sm:gt(0):lt(5);a&&Text;a&&href;/(\\d+).html',
|
limit: 6,
|
||||||
play_parse: true,
|
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||||
lazy: '',
|
double: true, // 推荐内容是否双层定位
|
||||||
limit: 6,
|
一级: '.module-items .module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||||
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
二级: {
|
||||||
double: true, // 推荐内容是否双层定位
|
"title": "h1&&Text;.tag-link&&Text",
|
||||||
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
"img": ".module-item-pic&&img&&data-src",
|
||||||
二级: {
|
"desc": ".video-info-items:eq(0)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(2)&&Text;.video-info-items:eq(3)&&Text",
|
||||||
"title": ".myui-content__detail .title&&Text;.myui-content__detail p:eq(-2)&&Text",
|
"content": ".vod_content&&Text",
|
||||||
"img": ".myui-content__thumb .lazyload&&data-original",
|
"tabs": ".module-tab-item",
|
||||||
"desc": ".myui-content__detail p:eq(0)&&Text;.myui-content__detail p:eq(1)&&Text;.myui-content__detail p:eq(2)&&Text",
|
"lists": ".module-player-list:eq(#id)&&.scroll-content&&a"
|
||||||
"content": ".content&&Text",
|
},
|
||||||
"tabs": ".nav-tabs:eq(0) li",
|
搜索: '.module-items .module-search-item;a&&title;img&&data-src;.video-serial&&Text;a&&href',
|
||||||
"lists": ".myui-content__list:eq(#id) li"
|
}, 首图: {
|
||||||
},
|
title: '',
|
||||||
搜索: '#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
host: '',
|
||||||
},
|
url: '/vodshow/fyclass--------fypage---/',
|
||||||
首图2: {
|
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||||
title: '',
|
searchable: 2,//是否启用全局搜索,
|
||||||
host: '',
|
quickSearch: 0,//是否启用快速搜索,
|
||||||
url: '/list/fyclass-fypage.html',
|
filterable: 0,//是否启用分类筛选,
|
||||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
|
||||||
searchable: 2,//是否启用全局搜索,
|
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
||||||
quickSearch: 0,//是否启用快速搜索,
|
},
|
||||||
filterable: 0,//是否启用分类筛选,
|
class_parse: '.myui-header__menu li.hidden-sm:gt(0):lt(5);a&&Text;a&&href;/(\\d+).html',
|
||||||
headers: {
|
play_parse: true,
|
||||||
'User-Agent': 'UC_UA',
|
lazy: '',
|
||||||
// "Cookie": ""
|
limit: 6,
|
||||||
},
|
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||||
// class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
|
double: true, // 推荐内容是否双层定位
|
||||||
class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html',
|
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||||
play_parse: true,
|
二级: {
|
||||||
lazy: '',
|
"title": ".myui-content__detail .title&&Text;.myui-content__detail p:eq(-2)&&Text",
|
||||||
limit: 6,
|
"img": ".myui-content__thumb .lazyload&&data-original",
|
||||||
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
|
"desc": ".myui-content__detail p:eq(0)&&Text;.myui-content__detail p:eq(1)&&Text;.myui-content__detail p:eq(2)&&Text",
|
||||||
double: true, // 推荐内容是否双层定位
|
"content": ".content&&Text",
|
||||||
一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
"tabs": ".nav-tabs:eq(0) li",
|
||||||
二级: {
|
"lists": ".myui-content__list:eq(#id) li"
|
||||||
"title": ".stui-content__detail .title&&Text;.stui-content__detail p:eq(-2)&&Text",
|
},
|
||||||
"img": ".stui-content__thumb .lazyload&&data-original",
|
搜索: '#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
||||||
"desc": ".stui-content__detail p:eq(0)&&Text;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text",
|
}, 首图2: {
|
||||||
"content": ".detail&&Text",
|
title: '',
|
||||||
"tabs": ".stui-vodlist__head h3",
|
host: '',
|
||||||
"lists": ".stui-content__playlist:eq(#id) li"
|
url: '/list/fyclass-fypage.html',
|
||||||
},
|
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||||
搜索: 'ul.stui-vodlist__media:eq(0) li,ul.stui-vodlist:eq(0) li,#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
searchable: 2,//是否启用全局搜索,
|
||||||
搜索1: 'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
quickSearch: 0,//是否启用快速搜索,
|
||||||
搜索2: 'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
filterable: 0,//是否启用分类筛选,
|
||||||
},
|
headers: {
|
||||||
默认: {
|
'User-Agent': 'UC_UA', // "Cookie": ""
|
||||||
title: '',
|
}, // class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
|
||||||
host: '',
|
class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html',
|
||||||
url: '/vodshow/fyclass--------fypage---.html',
|
play_parse: true,
|
||||||
searchUrl: '/vodsearch/-------------.html?wd=**',
|
lazy: '',
|
||||||
searchable: 2,//是否启用全局搜索,
|
limit: 6,
|
||||||
quickSearch: 0,//是否启用快速搜索,
|
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
|
||||||
filterable: 0,//是否启用分类筛选,
|
double: true, // 推荐内容是否双层定位
|
||||||
headers: {
|
一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||||
'User-Agent': 'MOBILE_UA',
|
二级: {
|
||||||
},
|
"title": ".stui-content__detail .title&&Text;.stui-content__detail p:eq(-2)&&Text",
|
||||||
play_parse: true,
|
"img": ".stui-content__thumb .lazyload&&data-original",
|
||||||
lazy: '',
|
"desc": ".stui-content__detail p:eq(0)&&Text;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text",
|
||||||
limit: 6,
|
"content": ".detail&&Text",
|
||||||
double: true, // 推荐内容是否双层定位
|
"tabs": ".stui-vodlist__head h3",
|
||||||
},
|
"lists": ".stui-content__playlist:eq(#id) li"
|
||||||
vfed: {
|
},
|
||||||
title: '',
|
搜索: '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',
|
||||||
host: '',
|
搜索1: 'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
||||||
url: '/index.php/vod/show/id/fyclass/page/fypage.html',
|
搜索2: 'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text',
|
||||||
searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
|
}, 默认: {
|
||||||
searchable: 2,//是否启用全局搜索,
|
title: '',
|
||||||
quickSearch: 0,//是否启用快速搜索,
|
host: '',
|
||||||
filterable: 0,//是否启用分类筛选,
|
url: '',
|
||||||
headers: {
|
searchUrl: '',
|
||||||
'User-Agent': 'UC_UA',
|
searchable: 2,
|
||||||
},
|
quickSearch: 0,
|
||||||
// class_parse:'.fed-pops-navbar&&ul.fed-part-rows&&a.fed-part-eone:gt(0):lt(5);a&&Text;a&&href;.*/(.*?).html',
|
filterable: 1,
|
||||||
class_parse: '.fed-pops-navbar&&ul.fed-part-rows&&a;a&&Text;a&&href;.*/(.*?).html',
|
filter: '',
|
||||||
play_parse: true,
|
filter_url: '',
|
||||||
lazy: '',
|
filter_def: {},
|
||||||
limit: 6,
|
headers: {
|
||||||
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
'User-Agent': 'MOBILE_UA',
|
||||||
double: true, // 推荐内容是否双层定位
|
},
|
||||||
一级: '.fed-list-info&&li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
timeout: 5000,
|
||||||
二级: {
|
class_parse: '#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||||
"title": "h1.fed-part-eone&&Text;.fed-deta-content&&.fed-part-rows&&li&&Text",
|
cate_exclude: '',
|
||||||
"img": ".fed-list-info&&a&&data-original",
|
play_parse: true,
|
||||||
"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",
|
lazy: `js:input = {parse: 1, url: input, js: ''}`,
|
||||||
"content": ".fed-part-esan&&Text",
|
double: true,
|
||||||
"tabs": ".fed-drop-boxs&&.fed-part-rows&&li",
|
推荐: '列表1;列表2;标题;图片;描述;链接;详情',
|
||||||
"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',
|
title: 'vod_name;vod_type',
|
||||||
},
|
img: '图片链接',
|
||||||
海螺3: {
|
desc: '主要信息;年代;地区;演员;导演',
|
||||||
title: '',
|
content: '简介',
|
||||||
host: '',
|
tabs: '',
|
||||||
searchUrl: '/v_search/**----------fypage---.html',
|
lists: 'xx:eq(#id)&&a',
|
||||||
url: '/vod_____show/fyclass--------fypage---.html',
|
tab_text: 'body&&Text',
|
||||||
headers: {
|
list_text: 'body&&Text',
|
||||||
'User-Agent': 'MOBILE_UA'
|
list_url: 'a&&href'
|
||||||
},
|
},
|
||||||
timeout: 5000,
|
搜索: '列表;标题;图片;描述;链接;详情',
|
||||||
class_parse: 'body&&.hl-nav li:gt(0);a&&Text;a&&href;.*/(.*?).html',
|
}, vfed: {
|
||||||
cate_exclude: '明星|专题|最新|排行',
|
title: '',
|
||||||
limit: 40,
|
host: '',
|
||||||
play_parse: true,
|
url: '/index.php/vod/show/id/fyclass/page/fypage.html',
|
||||||
lazy: '',
|
searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
|
||||||
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
searchable: 2,//是否启用全局搜索,
|
||||||
double: true,
|
quickSearch: 0,//是否启用快速搜索,
|
||||||
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
filterable: 0,//是否启用分类筛选,
|
||||||
二级: {
|
headers: {
|
||||||
"title": ".hl-infos-title&&Text;.hl-text-conch&&Text",
|
'User-Agent': 'UC_UA',
|
||||||
"img": ".hl-lazy&&data-original",
|
}, // class_parse:'.fed-pops-navbar&&ul.fed-part-rows&&a.fed-part-eone:gt(0):lt(5);a&&Text;a&&href;.*/(.*?).html',
|
||||||
"desc": ".hl-infos-content&&.hl-text-conch&&Text",
|
class_parse: '.fed-pops-navbar&&ul.fed-part-rows&&a;a&&Text;a&&href;.*/(.*?).html',
|
||||||
"content": ".hl-content-text&&Text",
|
play_parse: true,
|
||||||
"tabs": ".hl-tabs&&a",
|
lazy: '',
|
||||||
"lists": ".hl-plays-list:eq(#id)&&li"
|
limit: 6,
|
||||||
},
|
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||||
搜索: '.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
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",
|
||||||
},
|
"img": ".fed-list-info&&a&&data-original",
|
||||||
海螺2: {
|
"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",
|
||||||
title: '',
|
"content": ".fed-part-esan&&Text",
|
||||||
host: '',
|
"tabs": ".fed-drop-boxs&&.fed-part-rows&&li",
|
||||||
searchUrl: '/index.php/vod/search/page/fypage/wd/**/',
|
"lists": ".fed-play-item:eq(#id)&&ul:eq(1)&&li"
|
||||||
url: '/index.php/vod/show/id/fyclass/page/fypage/',
|
},
|
||||||
headers: {
|
搜索: '.fed-deta-info;h1&&Text;.lazyload&&data-original;.fed-list-remarks&&Text;a&&href;.fed-deta-content&&Text',
|
||||||
'User-Agent': 'MOBILE_UA'
|
}, 海螺3: {
|
||||||
},
|
title: '',
|
||||||
timeout: 5000,
|
host: '',
|
||||||
class_parse: '#nav-bar li;a&&Text;a&&href;id/(.*?)/',
|
searchUrl: '/v_search/**----------fypage---.html',
|
||||||
limit: 40,
|
url: '/vod_____show/fyclass--------fypage---.html',
|
||||||
play_parse: true,
|
headers: {
|
||||||
lazy: '',
|
'User-Agent': 'MOBILE_UA'
|
||||||
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
},
|
||||||
double: true,
|
timeout: 5000,
|
||||||
一级: '.list-a&&li;a&&title;.lazy&&data-original;.list-remarks&&Text;a&&href',
|
class_parse: 'body&&.hl-nav li:gt(0);a&&Text;a&&href;.*/(.*?).html',
|
||||||
二级: {
|
cate_exclude: '明星|专题|最新|排行',
|
||||||
"title": "h2&&Text;.deployment&&Text",
|
limit: 40,
|
||||||
"img": ".lazy&&data-original",
|
play_parse: true,
|
||||||
"desc": ".deployment&&Text",
|
lazy: '',
|
||||||
"content": ".ec-show&&Text",
|
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||||
"tabs": "#tag&&a",
|
double: true,
|
||||||
"lists": ".play_list_box:eq(#id)&&li"
|
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||||
},
|
二级: {
|
||||||
搜索: '.search-list;a&&title;.lazy&&data-original;.deployment&&Text;a&&href',
|
"title": ".hl-infos-title&&Text;.hl-text-conch&&Text",
|
||||||
searchable: 2,//是否启用全局搜索,
|
"img": ".hl-lazy&&data-original",
|
||||||
quickSearch: 0,//是否启用快速搜索,
|
"desc": ".hl-infos-content&&.hl-text-conch&&Text",
|
||||||
filterable: 0,//是否启用分类筛选,
|
"content": ".hl-content-text&&Text",
|
||||||
},
|
"tabs": ".hl-tabs&&a",
|
||||||
短视: {
|
"lists": ".hl-plays-list:eq(#id)&&li"
|
||||||
title: '',
|
},
|
||||||
host: '',
|
搜索: '.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||||
// homeUrl:'/',
|
searchable: 2,//是否启用全局搜索,
|
||||||
url: '/channel/fyclass-fypage.html',
|
quickSearch: 0,//是否启用快速搜索,
|
||||||
searchUrl: '/search.html?wd=**',
|
filterable: 0,//是否启用分类筛选,
|
||||||
searchable: 2,//是否启用全局搜索,
|
}, 海螺2: {
|
||||||
quickSearch: 0,//是否启用快速搜索,
|
title: '',
|
||||||
filterable: 0,//是否启用分类筛选,
|
host: '',
|
||||||
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
|
searchUrl: '/index.php/vod/search/page/fypage/wd/**/',
|
||||||
'User-Agent': 'MOBILE_UA',
|
url: '/index.php/vod/show/id/fyclass/page/fypage/',
|
||||||
// "Cookie": "searchneed=ok"
|
headers: {
|
||||||
},
|
'User-Agent': 'MOBILE_UA'
|
||||||
class_parse: '.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html',
|
},
|
||||||
cate_exclude: '解析|动态',
|
timeout: 5000,
|
||||||
play_parse: true,
|
class_parse: '#nav-bar li;a&&Text;a&&href;id/(.*?)/',
|
||||||
lazy: '',
|
limit: 40,
|
||||||
limit: 6,
|
play_parse: true,
|
||||||
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
lazy: '',
|
||||||
double: true, // 推荐内容是否双层定位
|
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
||||||
一级: '.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
double: true,
|
||||||
二级: {
|
一级: '.list-a&&li;a&&title;.lazy&&data-original;.list-remarks&&Text;a&&href',
|
||||||
"title": "h1&&Text;.content-rt&&p:eq(0)&&Text",
|
二级: {
|
||||||
"img": ".img&&img&&data-src",
|
"title": "h2&&Text;.deployment&&Text",
|
||||||
"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",
|
"img": ".lazy&&data-original",
|
||||||
"content": ".zkjj_a&&Text",
|
"desc": ".deployment&&Text",
|
||||||
"tabs": ".py-tabs&&option",
|
"content": ".ec-show&&Text",
|
||||||
"lists": ".player:eq(#id) li"
|
"tabs": "#tag&&a",
|
||||||
},
|
"lists": ".play_list_box:eq(#id)&&li"
|
||||||
搜索: '.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
|
},
|
||||||
},
|
搜索: '.search-list;a&&title;.lazy&&data-original;.deployment&&Text;a&&href',
|
||||||
短视2:{
|
searchable: 2,//是否启用全局搜索,
|
||||||
title: '',
|
quickSearch: 0,//是否启用快速搜索,
|
||||||
host: '',
|
filterable: 0,//是否启用分类筛选,
|
||||||
class_name:'电影&电视剧&综艺&动漫',
|
}, 短视: {
|
||||||
class_url:'1&2&3&4',
|
title: '',
|
||||||
searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50',
|
host: '', // homeUrl:'/',
|
||||||
searchable: 2,
|
url: '/channel/fyclass-fypage.html',
|
||||||
quickSearch: 0,
|
searchUrl: '/search.html?wd=**',
|
||||||
headers:{'User-Agent':'MOBILE_UA'},
|
searchable: 2,//是否启用全局搜索,
|
||||||
url: '/index.php/api/vod#type=fyclass&page=fypage',
|
quickSearch: 0,//是否启用快速搜索,
|
||||||
filterable:0,//是否启用分类筛选,
|
filterable: 0,//是否启用分类筛选,
|
||||||
filter_url:'',
|
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
|
||||||
filter: {},
|
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
||||||
filter_def:{},
|
},
|
||||||
detailUrl:'/index.php/vod/detail/id/fyid.html',
|
class_parse: '.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html',
|
||||||
play_parse: true,
|
cate_exclude: '解析|动态',
|
||||||
lazy: '',
|
play_parse: true,
|
||||||
limit: 6,
|
lazy: '',
|
||||||
推荐:'.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href',
|
limit: 6,
|
||||||
一级:'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});',
|
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||||
二级:{
|
double: true, // 推荐内容是否双层定位
|
||||||
"title":".slide-info-title&&Text;.slide-info:eq(3)--strong&&Text",
|
一级: '.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||||
"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",
|
"title": "h1&&Text;.content-rt&&p:eq(0)&&Text",
|
||||||
"content":"#height_limit&&Text",
|
"img": ".img&&img&&data-src",
|
||||||
"tabs":".anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a",
|
"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",
|
||||||
"tab_text":".swiper-slide&&Text",
|
"content": ".zkjj_a&&Text",
|
||||||
"lists":".anthology-list-box:eq(#id) li"
|
"tabs": ".py-tabs&&option",
|
||||||
},
|
"lists": ".player:eq(#id) li"
|
||||||
搜索:'json:list;name;pic;;id',
|
},
|
||||||
}
|
搜索: '.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
|
||||||
};
|
}, 短视2: {
|
||||||
return JSON.parse(JSON.stringify(mubanDict));
|
title: '',
|
||||||
}
|
host: '',
|
||||||
var mubanDict = getMubans();
|
class_name: '电影&电视剧&综艺&动漫',
|
||||||
var muban = getMubans();
|
class_url: '1&2&3&4',
|
||||||
export default {muban,getMubans};
|
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: '',
|
||||||
|
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(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',
|
||||||
|
}, 采集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: `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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
推荐: '*',
|
||||||
|
一级: '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…
x
Reference in New Issue
Block a user