Add files via upload

This commit is contained in:
xiaoliu
2024-07-25 11:45:53 +08:00
committed by GitHub
parent a297c187f4
commit 4bc7d126e4

View File

@@ -12,73 +12,48 @@ if (typeof Object.assign !== 'function') {
return target; return target;
}; };
} }
// @ts-ignore
if (typeof ($js) === 'undefined' || typeof ($js) !== 'object') {
globalThis.$js = {
toString(func) {
let strfun = func.toString();
return strfun.replace(/^\(\)(\s+)?=>(\s+)?\{/, 'js:').replace(/\}$/, '');
},
};
}
// 通用免嗅探播放 // 通用免嗅探播放
// @ts-ignore let common_lazy = `js:
let common_lazy = $js.toString(() => { let html = request(input);
// @ts-ignore let hconf = html.match(/r player_.*?=(.*?)</)[1];
let html = request(input); let json = JSON5.parse(hconf);
let hconf = html.match(/r player_.*?=(.*?)</)[1]; let url = json.url;
// @ts-ignore if (json.encrypt == '1') {
let json = JSON5.parse(hconf); url = unescape(url);
let url = json.url; } else if (json.encrypt == '2') {
if (json.encrypt == '1') { url = unescape(base64Decode(url));
url = unescape(url); }
} else if (json.encrypt == '2') { if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {
// @ts-ignore input = {
url = unescape(base64Decode(url)); parse: 0,
} jx: 0,
if (/\.(m3u8|mp4|m4a|mp3)/.test(url)) { url: url,
// @ts-ignore };
input = { } else {
parse: 0, input;
jx: 0, }`;
url: url,
};
} else {
// @ts-ignore
input;
}
});
// 默认嗅探播放 // 默认嗅探播放
// @ts-ignore
let def_lazy = $js.toString(() => { let def_lazy = `js:
// @ts-ignore input = { parse: 1, url: input, js: '' };`;
input = {parse: 1, url: input, js: ''};
});
// 采集站播放 // 采集站播放
// @ts-ignore
let cj_lazy = $js.toString(() => { let cj_lazy = `js:
// @ts-ignore if (/\\.(m3u8|mp4)/.test(input)) {
if (/\.(m3u8|mp4)/.test(input)) { input = { parse: 0, url: input };
// @ts-ignore } else {
input = {parse: 0, url: input}; if (rule.parse_url.startsWith('json:')) {
let purl = rule.parse_url.replace('json:', '') + input;
let html = request(purl);
let json = JSON.parse(html);
if (json.url) {
input = { parse: 0, url: json.url };
}
} else { } else {
// @ts-ignore input = rule.parse_url + input;
if (rule.parse_url.startsWith('json:')) {
// @ts-ignore
let purl = rule.parse_url.replace('json:', '') + input;
// @ts-ignore
let html = request(purl);
let json = JSON.parse(html);
if (json.url) {
// @ts-ignore
input = {parse: 0, url: json.url};
}
} else {
// @ts-ignore
input = rule.parse_url + input;
}
} }
}); }`;
function getMubans() { function getMubans() {
const mubanDict = { // 模板字典 const mubanDict = { // 模板字典