解析逻辑优化

This commit is contained in:
hjdhnx 2023-10-03 17:02:22 +08:00
parent 2d7f95f944
commit 2b6bd6a65e
20 changed files with 301 additions and 243 deletions

View File

@ -86,6 +86,7 @@ def parse_home(filename):
env = get_env() env = get_env()
py_ctx.update({ py_ctx.update({
'vipUrl': url, 'vipUrl': url,
'input': url,
'fetch_params': {'headers': {'Referer':url}, 'timeout': 10, 'encoding': 'utf-8'}, 'fetch_params': {'headers': {'Referer':url}, 'timeout': 10, 'encoding': 'utf-8'},
'jsp':jsp, 'jsp':jsp,
'重定向':重定向, '重定向':重定向,
@ -105,7 +106,9 @@ def parse_home(filename):
t1 = time() t1 = time()
try: try:
loader, _ = runJScode(jscode, ctx=ctx) loader, _ = runJScode(jscode, ctx=ctx)
realUrl = loader.eval('realUrl') # realUrl = loader.eval('realUrl')
# realUrl = loader.eval(f'lazy("{url}")')
realUrl = loader.eval('lazy()')
if not realUrl: if not realUrl:
return R.failed(f'解析失败:{realUrl}') return R.failed(f'解析失败:{realUrl}')
if isinstance(realUrl, PyJsString): if isinstance(realUrl, PyJsString):

View File

@ -1,13 +1,17 @@
function lazy(){
let jxUrl = 'https://vip.lianfaka.com/vip/?url='; let jxUrl = 'https://vip.lianfaka.com/vip/?url=';
fetch_params.headers.Referer = 'https://www.dy6g.com'; fetch_params.headers.Referer = 'https://www.dy6g.com';
// fetch_params.headers['User-Agent'] = 'Mozilla/5.0 (Linux; Android 6.0.1; OPPO R9s Plus Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36'; // fetch_params.headers['User-Agent'] = 'Mozilla/5.0 (Linux; Android 6.0.1; OPPO R9s Plus Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36';
fetch_params.headers['User-Agent'] = MOBILE_UA; fetch_params.headers['User-Agent'] = MOBILE_UA;
try { try {
let html = request(jxUrl+vipUrl); let html = request(jxUrl+input);
log(html); log(html);
realUrl=html.match(/source src="(.*?)"/)[1]; realUrl=html.match(/source src="(.*?)"/)[1];
log('解析到真实播放地址:'+realUrl); log('解析到真实播放地址:'+realUrl);
}catch (e) { }catch (e) {
log('解析发生错误:'+e.message); log('解析发生错误:'+e.message);
realUrl = vipUrl; realUrl = input;
}
return realUrl
} }

View File

@ -1,12 +1,15 @@
let jxUrl = 'https://80k.tv/jxplayer.php?v='; function lazy() {
fetch_params.headers.Referer = 'https://1080p.tv'; let jxUrl = 'https://80k.tv/jxplayer.php?v=';
fetch_params.headers['User-Agent'] = MOBILE_UA; fetch_params.headers.Referer = 'https://1080p.tv';
try { fetch_params.headers['User-Agent'] = MOBILE_UA;
let html = request(jxUrl+vipUrl); try {
log(html); let html = request(jxUrl + input);
realUrl=html.match(/src="(h.*?)"/)[1]; log(html);
log('解析到真实播放地址:'+realUrl); realUrl = html.match(/src="(h.*?)"/)[1];
}catch (e) { log('解析到真实播放地址:' + realUrl);
log('解析发生错误:'+e.message); } catch (e) {
realUrl = vipUrl; log('解析发生错误:' + e.message);
realUrl = input;
}
return realUrl
} }

View File

@ -1,12 +1,21 @@
let jxUrl = 'https://json.legendwhb.cn/llq/?url='; function lazy() {
fetch_params.headers.Referer = jxUrl; let jxUrl = 'https://json.legendwhb.cn/llq/?url=';
try { fetch_params.headers.Referer = jxUrl;
let html = request(jxUrl+vipUrl); try {
eval(html.match(/var config = {[\s\S]*?}/)[0] + ""); let html = request(jxUrl + input);
let play = request("https://json.legendwhb.cn/llq/API.php", {headers: {"User-Agent": MOBILE_UA, "X-Requested-With": "XMLHttpRequest", "origin": "https://json.legendwhb.cn"}, body: "url=" + config.url + "&time=" + config.time + "&key=" + config.key, method: "POST"}); eval(html.match(/var config = {[\s\S]*?}/)[0] + "");
realUrl = JSON.parse(play).url; let play = request("https://json.legendwhb.cn/llq/API.php", {
log('解析到真实播放地址:'+realUrl); headers: {
}catch (e) { "User-Agent": MOBILE_UA,
log('解析发生错误:'+e.message); "X-Requested-With": "XMLHttpRequest",
realUrl = vipUrl; "origin": "https://json.legendwhb.cn"
}, body: "url=" + config.url + "&time=" + config.time + "&key=" + config.key, method: "POST"
});
realUrl = JSON.parse(play).url;
log('解析到真实播放地址:' + realUrl);
} catch (e) {
log('解析发生错误:' + e.message);
realUrl = input;
}
return realUrl
} }

View File

@ -1,4 +1,4 @@
// realUrl = 重定向('https://play.fuqizhishi.com/juhe/API.php?appkey=caijijuhe220902&url='+vipUrl) function lazy() {
// https://play.fuqizhishi.com/jx2/API.php?appkey=iiiixiaobai&url= realUrl = 重定向('https://play.fuqizhishi.com/jx2/API.php?appkey=iiiixiaobai&url=' + input);
// realUrl = 重定向('http://jxhc.ioivip.xyz/?url='+vipUrl); return realUrl
realUrl = 重定向('https://play.fuqizhishi.com/jx2/API.php?appkey=iiiixiaobai&url='+vipUrl) }

View File

@ -1,76 +1,80 @@
// 星驰免嗅 // 星驰免嗅
// let jxUrl = 'https://vip.swuii.top/player/?url='; function lazy() {
let jxUrl = 'https://vip.swuii.top/player/analysis.php?v='; let jxUrl = 'https://vip.swuii.top/player/analysis.php?v=';
fetch_params.headers.Referer = jxUrl; fetch_params.headers.Referer = jxUrl;
try { try {
let html = request(jxUrl + vipUrl); let html = request(jxUrl + input);
eval(html.match(/var config = {[\s\S]*?}/)[0]); eval(html.match(/var config = {[\s\S]*?}/)[0]);
url = config.url; url = config.url;
_0x4909f4 = url; _0x4909f4 = url;
let _0xc6d095=''; let _0xc6d095 = '';
log(url); log(url);
eval(getCryptoJS()); eval(getCryptoJS());
var _0x4909f4 = atob(_0x4909f4); var _0x4909f4 = atob(_0x4909f4);
log(_0x4909f4); log(_0x4909f4);
// log(_0x4909f4.length); // log(_0x4909f4.length);
var _0x3e9518 = _0x4909f4.length; var _0x3e9518 = _0x4909f4.length;
// log(_0x4909f4); // log(_0x4909f4);
var _0x2c3abf = []; var _0x2c3abf = [];
var _0x1c7cc5 = []; var _0x1c7cc5 = [];
var _0xfc0e29 = "202205051426239465"; var _0xfc0e29 = "202205051426239465";
var _0x1a1b75 = _0xfc0e29.length; var _0x1a1b75 = _0xfc0e29.length;
var _0x320253 = {"EmMtr": function (_0xcb360, _0x190522) { var _0x320253 = {
return _0xcb360 < _0x190522; "EmMtr": function (_0xcb360, _0x190522) {
}, "INrFk": function (_0x118889, _0x267e98) { return _0xcb360 < _0x190522;
return _0x118889 % _0x267e98; }, "INrFk": function (_0x118889, _0x267e98) {
}, "YJmqv": function (_0x31bf52, _0x2fd6b6) { return _0x118889 % _0x267e98;
return _0x31bf52 % _0x2fd6b6; }, "YJmqv": function (_0x31bf52, _0x2fd6b6) {
}, "IVJrP": function (_0x43c04f, _0x1fa873) { return _0x31bf52 % _0x2fd6b6;
return _0x43c04f % _0x1fa873; }, "IVJrP": function (_0x43c04f, _0x1fa873) {
}, "aTggn": function (_0x13bd41, _0x2f040c) { return _0x43c04f % _0x1fa873;
return _0x13bd41 + _0x2f040c; }, "aTggn": function (_0x13bd41, _0x2f040c) {
}, "txtvd": function (_0x450d4d, _0x107d6d) { return _0x13bd41 + _0x2f040c;
return _0x450d4d % _0x107d6d; }, "txtvd": function (_0x450d4d, _0x107d6d) {
}, "EpjZa": function (_0x54d0f7, _0x37f36f) { return _0x450d4d % _0x107d6d;
return _0x54d0f7 ^ _0x37f36f; }, "EpjZa": function (_0x54d0f7, _0x37f36f) {
}, "WgDgB": function (_0x166316, _0x170b36) { return _0x54d0f7 ^ _0x37f36f;
return _0x166316 < _0x170b36; }, "WgDgB": function (_0x166316, _0x170b36) {
}, "vwjta": function (_0x13d5f4, _0x4d75ba) { return _0x166316 < _0x170b36;
return _0x13d5f4 + _0x4d75ba; }, "vwjta": function (_0x13d5f4, _0x4d75ba) {
}}; return _0x13d5f4 + _0x4d75ba;
for (i = 0; _0x320253["EmMtr"](i, 256); i++) { }
_0x2c3abf[i] = _0xfc0e29[_0x320253["YJmqv"](i, _0x1a1b75)]["charCodeAt"](); };
_0x1c7cc5[i] = i; for (i = 0; _0x320253["EmMtr"](i, 256); i++) {
} _0x2c3abf[i] = _0xfc0e29[_0x320253["YJmqv"](i, _0x1a1b75)]["charCodeAt"]();
_0x1c7cc5[i] = i;
}
// log(_0x1c7cc5); // log(_0x1c7cc5);
for (j = i = 0; _0x320253["EmMtr"](i, 256); i++) { for (j = i = 0; _0x320253["EmMtr"](i, 256); i++) {
j = _0x320253["INrFk"](_0x320253["vwjta"](j, _0x1c7cc5[i]) + _0x2c3abf[i], 256); j = _0x320253["INrFk"](_0x320253["vwjta"](j, _0x1c7cc5[i]) + _0x2c3abf[i], 256);
tmp = _0x1c7cc5[i]; tmp = _0x1c7cc5[i];
_0x1c7cc5[i] = _0x1c7cc5[j]; _0x1c7cc5[i] = _0x1c7cc5[j];
_0x1c7cc5[j] = tmp; _0x1c7cc5[j] = tmp;
} }
// log(_0x2c3abf); // log(_0x2c3abf);
// log(_0x1c7cc5); // log(_0x1c7cc5);
for (a = j = i = 0; _0x320253["WgDgB"](i, _0x3e9518); i++) { for (a = j = i = 0; _0x320253["WgDgB"](i, _0x3e9518); i++) {
a = _0x320253["IVJrP"](a + 1, 256); a = _0x320253["IVJrP"](a + 1, 256);
j = _0x320253["aTggn"](j, _0x1c7cc5[a]) % 256; j = _0x320253["aTggn"](j, _0x1c7cc5[a]) % 256;
tmp = _0x1c7cc5[a]; tmp = _0x1c7cc5[a];
_0x1c7cc5[a] = _0x1c7cc5[j]; _0x1c7cc5[a] = _0x1c7cc5[j];
_0x1c7cc5[j] = tmp; _0x1c7cc5[j] = tmp;
k = _0x1c7cc5[_0x320253["txtvd"](_0x320253["aTggn"](_0x1c7cc5[a], _0x1c7cc5[j]), 256)]; k = _0x1c7cc5[_0x320253["txtvd"](_0x320253["aTggn"](_0x1c7cc5[a], _0x1c7cc5[j]), 256)];
_0xc6d095 += String["fromCharCode"](_0x320253["EpjZa"](_0x4909f4[i]["charCodeAt"](), k)); _0xc6d095 += String["fromCharCode"](_0x320253["EpjZa"](_0x4909f4[i]["charCodeAt"](), k));
// log(_0x4909f4[i]); // log(_0x4909f4[i]);
} }
// log(_0x1c7cc5); // log(_0x1c7cc5);
log(_0xc6d095); log(_0xc6d095);
url = unescape(_0xc6d095); url = unescape(_0xc6d095);
if (/m3u8|mp4/.test(url)) { if (/m3u8|mp4/.test(url)) {
realUrl = url; realUrl = url;
}else { } else {
realUrl = toast(vipUrl+'解析失败:'+url); realUrl = toast(input + '解析失败:' + url);
} }
log('解析到真实播放地址:'+realUrl); log('解析到真实播放地址:' + realUrl);
}catch (e) { } catch (e) {
log('解析发生错误:'+e.message); log('解析发生错误:' + e.message);
realUrl = vipUrl; realUrl = input;
}
return realUrl
} }

View File

@ -1,5 +1,5 @@
// print(env); // print(env);
// vipUrl = 'https://www.bilibili.com/bangumi/play/ep704873'; // input = 'https://www.bilibili.com/bangumi/play/ep704873';
fetch_params.headers = { fetch_params.headers = {
'User-Agent':PC_UA, 'User-Agent':PC_UA,
"Referer": "https://www.bilibili.com", "Referer": "https://www.bilibili.com",
@ -17,15 +17,15 @@ let epUrl = unescape(short_link);
return epUrl return epUrl
} }
function getCidEid(vipUrl){ function getCidEid(input){
// print(vipUrl); // print(input);
let url = vipUrl.split('?')[0]; let url = input.split('?')[0];
// print(url); // print(url);
if(url.endsWith('/')){ if(url.endsWith('/')){
url = url.slice(0,-1); url = url.slice(0,-1);
} }
if(url.includes('bilibili.com/video/')){ if(url.includes('bilibili.com/video/')){
let r = request(vipUrl); let r = request(input);
try{ try{
let mtext = r.match(/window\.__INITIAL_STATE__=(.*?);\(function/)[1]; let mtext = r.match(/window\.__INITIAL_STATE__=(.*?);\(function/)[1];
mtext = JSON.parse(mtext); mtext = JSON.parse(mtext);
@ -54,18 +54,19 @@ return [cid,avid,null];
return null return null
} }
}else if(url.includes('/ss')){ }else if(url.includes('/ss')){
let epUrl = getEpUrl(vipUrl); let epUrl = getEpUrl(input);
return getCid(epUrl) return getCid(epUrl)
}else{ }else{
return null return null
} }
} }
if(!/bilibili/.test(vipUrl)){ function lazy(){
realUrl = vipUrl; if(!/bilibili/.test(input)){
realUrl = input;
}else { }else {
try { try {
// print(vipUrl); // print(input);
let ids = getCidEid(vipUrl); let ids = getCidEid(input);
if (Array.isArray(ids)) { if (Array.isArray(ids)) {
print(ids); print(ids);
let cid = ids[0]; let cid = ids[0];
@ -83,12 +84,15 @@ if(!/bilibili/.test(vipUrl)){
} catch (e) { } catch (e) {
print(e.message); print(e.message);
realUrl = vipUrl; realUrl = input;
} }
} else { } else {
realUrl = vipUrl; realUrl = input;
} }
} catch (e) { } catch (e) {
print(e.message); print(e.message);
} }
} }
return realUrl
}

View File

@ -1,12 +1,15 @@
let jxUrl = 'http://chaloli.cn/home/api?type=ys&uid=1&key=ekloswzABCGHKLOT58&url='; function lazy() {
fetch_params.headers.Referer = jxUrl; let jxUrl = 'http://chaloli.cn/home/api?type=ys&uid=1&key=ekloswzABCGHKLOT58&url=';
try { fetch_params.headers.Referer = jxUrl;
// realUrl = null; try {
let html = request(jxUrl+vipUrl); // realUrl = null;
// log(html); let html = request(jxUrl + input);
realUrl = jsp.pjfh(html,'$..url'); // log(html);
log('解析到真实播放地址:'+realUrl); realUrl = jsp.pjfh(html, '$..url');
}catch (e) { log('解析到真实播放地址:' + realUrl);
log('解析发生错误:'+e.message); } catch (e) {
realUrl = vipUrl; log('解析发生错误:' + e.message);
realUrl = input;
}
return realUrl
} }

View File

@ -1,5 +1,5 @@
js: js:
//输入的vipUrl如:https://m.douyu.com/312212?dyshid=0-00000003333&dyshci=1 //输入的input如:https://m.douyu.com/312212?dyshid=0-00000003333&dyshci=1
function getSign(script, rid, did, tt){ function getSign(script, rid, did, tt){
let result = script.match(/(function ub98484234.*)\s(var.*)/)[0]; let result = script.match(/(function ub98484234.*)\s(var.*)/)[0];
@ -19,26 +19,31 @@ function getSign(script, rid, did, tt){
return params return params
} }
// log(env); // log(env);
// fetch_params.headers.Referer = vipUrl; // fetch_params.headers.Referer = input;
try { function lazy() {
// realUrl = null; try {
let html = request(vipUrl); // realUrl = null;
// log(html); let html = request(input);
let rid = html.match(/rid":(.*?),"vipId/)[1]; // log(html);
log(rid); let rid = html.match(/rid":(.*?),"vipId/)[1];
// let tt = Date.parse(new Date()).toString().substr(0, 10); log(rid);
let tt = Math.round(new Date().getTime()/1000).toString(); // let tt = Date.parse(new Date()).toString().substr(0, 10);
let did = '10000000000000000000000000001501'; let tt = Math.round(new Date().getTime() / 1000).toString();
let param_body = getSign(html, rid, did, tt); let did = '10000000000000000000000000001501';
log(param_body); let param_body = getSign(html, rid, did, tt);
let stream_json = request('https://m.douyu.com/api/room/ratestream', {headers: { log(param_body);
'Content-Type': 'application/x-www-form-urlencoded', let stream_json = request('https://m.douyu.com/api/room/ratestream', {
}, body: param_body, method:'POST'}); headers: {
log(stream_json); 'Content-Type': 'application/x-www-form-urlencoded',
let stream = JSON.parse(stream_json).data; }, body: param_body, method: 'POST'
realUrl = stream.url; });
log('解析到真实播放地址:'+realUrl); log(stream_json);
}catch (e) { let stream = JSON.parse(stream_json).data;
log('解析发生错误:'+e.message); realUrl = stream.url;
realUrl = vipUrl; log('解析到真实播放地址:' + realUrl);
} catch (e) {
log('解析发生错误:' + e.message);
realUrl = input;
}
return realUrl
} }

View File

@ -1,14 +1,17 @@
// let jxUrl = 'http://api.ckflv.cn/?url='; // let jxUrl = 'http://api.ckflv.cn/?url=';
log(env); function lazy() {
let jxUrl = 'https://k.json.icu/home/api?type=ys&uid=12406929&key=adgouwyCGIRSTUV046&url='; log(env);
fetch_params.headers.Referer = jxUrl; let jxUrl = 'https://k.json.icu/home/api?type=ys&uid=12406929&key=adgouwyCGIRSTUV046&url=';
try { fetch_params.headers.Referer = jxUrl;
// realUrl = null; try {
let html = request(jxUrl+vipUrl); // realUrl = null;
log(html); let html = request(jxUrl + input);
realUrl = jsp.pjfh(html,'$..url'); log(html);
log('解析到真实播放地址:'+realUrl); realUrl = jsp.pjfh(html, '$..url');
}catch (e) { log('解析到真实播放地址:' + realUrl);
log('解析发生错误:'+e.message); } catch (e) {
realUrl = vipUrl; log('解析发生错误:' + e.message);
realUrl = input;
}
return realUrl
} }

View File

@ -1,15 +1,16 @@
// realUrl = 重定向('http://211.99.99.236:4567/jhjson/ceshi.php?url='+vipUrl); function lazy() {
// let jxUrl = 'http://211.99.99.236:4567/jhjson/ceshi.php?url='; let jxUrl = 'http://45.248.10.163:4433/json.php?wap=0&url=';
// let jxUrl = 'http://jx.vipmv.co/json.php?token=123457&url='; fetch_params.headers.Referer = jxUrl;
let jxUrl = 'http://45.248.10.163:4433/json.php?wap=0&url='; try {
fetch_params.headers.Referer = jxUrl; // realUrl = null;
try { let html = request(jxUrl + input);
// realUrl = null; // log(html);
let html = request(jxUrl+vipUrl); realUrl = jsp.pjfh(html, '$..url');
// log(html); log('解析到真实播放地址:' + realUrl);
realUrl = jsp.pjfh(html,'$..url'); } catch (e) {
log('解析到真实播放地址:'+realUrl); log('解析发生错误:' + e.message);
}catch (e) { realUrl = input;
log('解析发生错误:'+e.message); }
realUrl = vipUrl; return realUrl
} }

View File

@ -1,9 +1,12 @@
let PWD = 'drpy'; function lazy() {
let PWD = 'drpy';
// log(params); // log(params);
if(!params.passwd){ if (!params.passwd) {
realUrl = vipUrl realUrl = input
} else if(params.passwd !== PWD){ } else if (params.passwd !== PWD) {
realUrl = toast(vipUrl+' 解析失败。解析密码错误'); realUrl = toast(input + ' 解析失败。解析密码错误');
}else{ } else {
realUrl = 重定向('http://211.99.99.236:4567/jhjson/ceshi.php?url='+vipUrl) realUrl = 重定向('http://211.99.99.236:4567/jhjson/ceshi.php?url=' + input)
}
return realUrl
} }

View File

@ -1,20 +1,23 @@
let jxUrl = 'http://api.kunyu77.com/api.php/provide/parserUrl?url='; function lazy() {
var t = Math.floor(new Date().getTime() /1000).toString(); let jxUrl = 'http://api.kunyu77.com/api.php/provide/parserUrl?url=';
let jxExt = "&retryNum=0&pcode=010110002&version=2.1&devid=f9c9ce5bb5827a266829383718e6131a&package=com.sevenVideo.app.android&sys=android&sysver=12&brand=Xiaomi&model=Mi_10_Pro&sj="+t; var t = Math.floor(new Date().getTime() / 1000).toString();
let url = jxUrl+vipUrl+jxExt; let jxExt = "&retryNum=0&pcode=010110002&version=2.1&devid=f9c9ce5bb5827a266829383718e6131a&package=com.sevenVideo.app.android&sys=android&sysver=12&brand=Xiaomi&model=Mi_10_Pro&sj=" + t;
let TK = "/api.php/provide/parserUrl"+"Xiaomif9c9ce5bb5827a266829383718e6131aMi_10_Procom.sevenVideo.app.android010110002"+0+t+"android12"+ encodeURIComponent(vipUrl) + "2.1"+t+"XSpeUFjJ"; let url = jxUrl + input + jxExt;
fetch_params.headers.Referer = jxUrl; let TK = "/api.php/provide/parserUrl" + "Xiaomif9c9ce5bb5827a266829383718e6131aMi_10_Procom.sevenVideo.app.android010110002" + 0 + t + "android12" + encodeURIComponent(input) + "2.1" + t + "XSpeUFjJ";
fetch_params.headers.Referer = jxUrl;
// fetch_params.headers['User-Agent'] = "Dalvik/2.1.0"; // fetch_params.headers['User-Agent'] = "Dalvik/2.1.0";
fetch_params.headers['User-Agent'] = "okhttp/3.12.0"; fetch_params.headers['User-Agent'] = "okhttp/3.12.0";
fetch_params.headers['TK'] = md5(TK); fetch_params.headers['TK'] = md5(TK);
try { try {
// realUrl = null; // realUrl = null;
let html = request(url); let html = request(url);
log(html); log(html);
realUrl = jsp.pjfh(html,'$..url'); realUrl = jsp.pjfh(html, '$..url');
realUrl = 重定向(realUrl); realUrl = 重定向(realUrl);
log('解析到真实播放地址:'+realUrl); log('解析到真实播放地址:' + realUrl);
}catch (e) { } catch (e) {
log('解析发生错误:'+e.message); log('解析发生错误:' + e.message);
realUrl = vipUrl; realUrl = input;
}
return realUrl
} }

View File

@ -1,2 +1,5 @@
// realUrl = 重定向('http://ivips.ml/jx/json.php/?url='+vipUrl) // realUrl = 重定向('http://ivips.ml/jx/json.php/?url='+input)
realUrl = 重定向('http://103.40.240.46/jh/?url='+vipUrl) function lazy() {
realUrl = 重定向('http://103.40.240.46/jh/?url=' + input);
return realUrl
}

View File

@ -2,57 +2,62 @@
// fetch_params.headers.Referer = jxUrl; // fetch_params.headers.Referer = jxUrl;
// try { // try {
// // realUrl = null; // // realUrl = null;
// let html = request(jxUrl+vipUrl); // let html = request(jxUrl+input);
// log(html); // log(html);
// //realUrl = jsp.pjfh(html,'$..url'); // //realUrl = jsp.pjfh(html,'$..url');
// realUrl=html.match(/var urls = "(.*?)"/)[1]; // realUrl=html.match(/var urls = "(.*?)"/)[1];
// log('解析到真实播放地址:'+realUrl); // log('解析到真实播放地址:'+realUrl);
// }catch (e) { // }catch (e) {
// log('解析发生错误:'+e.message); // log('解析发生错误:'+e.message);
// realUrl = vipUrl; // realUrl = input;
// } // }
// 虾米免嗅 // 虾米免嗅
let jxUrl = 'https://jx.xmflv.com/?url='; function lazy() {
fetch_params.headers.Referer = jxUrl; let jxUrl = 'https://jx.xmflv.com/?url=';
eval(getCryptoJS()); fetch_params.headers.Referer = jxUrl;
function encrypt(_0x5cf953) { eval(getCryptoJS());
var _0x5efb07 = CryptoJS.enc.Utf8.parse(vkey);
var _0x45c0ea = CryptoJS.enc.Utf8.parse('ash3omcjsoajh1ur');
var _0x268682 = CryptoJS.AES.encrypt(_0x5cf953, _0x5efb07, {
'iv': _0x45c0ea,
'mode': CryptoJS.mode.CBC,
'padding': CryptoJS.pad.ZeroPadding
});
return _0x268682.toString();
}
function jsdecrypt(_0x1a43fe) { function encrypt(_0x5cf953) {
var _0x10ab4d = CryptoJS.enc.Utf8.parse(vkey); var _0x5efb07 = CryptoJS.enc.Utf8.parse(vkey);
var _0x291247 = CryptoJS.enc.Utf8.parse('contentDocuments'); var _0x45c0ea = CryptoJS.enc.Utf8.parse('ash3omcjsoajh1ur');
var _0x5abb12 = CryptoJS.AES.decrypt(_0x1a43fe, _0x10ab4d, { var _0x268682 = CryptoJS.AES.encrypt(_0x5cf953, _0x5efb07, {
'iv': _0x291247, 'iv': _0x45c0ea,
'mode': CryptoJS.mode.CBC, 'mode': CryptoJS.mode.CBC,
'padding': CryptoJS.pad.ZeroPadding 'padding': CryptoJS.pad.ZeroPadding
}).toString(CryptoJS.enc.Utf8); });
return _0x5abb12.toString(); return _0x268682.toString();
} }
try {
let html = request(jxUrl+vipUrl); function jsdecrypt(_0x1a43fe) {
let time = html.match(/var time = '(.*?)'/)[1]; var _0x10ab4d = CryptoJS.enc.Utf8.parse(vkey);
let ua = html.match(/var ua = '(.*?)'/)[1]; var _0x291247 = CryptoJS.enc.Utf8.parse('contentDocuments');
let vkey = html.match(/var vkey = '(.*?)'/)[1]; var _0x5abb12 = CryptoJS.AES.decrypt(_0x1a43fe, _0x10ab4d, {
'iv': _0x291247,
'mode': CryptoJS.mode.CBC,
'padding': CryptoJS.pad.ZeroPadding
}).toString(CryptoJS.enc.Utf8);
return _0x5abb12.toString();
}
try {
let html = request(jxUrl + input);
let time = html.match(/var time = '(.*?)'/)[1];
let ua = html.match(/var ua = '(.*?)'/)[1];
let vkey = html.match(/var vkey = '(.*?)'/)[1];
// log(encrypt(vkey)); // log(encrypt(vkey));
let phtml = request("https://jx.xmflv.com/favicon.ico", { let phtml = request("https://jx.xmflv.com/favicon.ico", {
headers: { headers: {
"origin": "https://jx.xmflv.com" "origin": "https://jx.xmflv.com"
}, },
body: "url=" + vipUrl + "&time=" + time + "&ua=" + ua + "&vkey=" + encrypt(vkey), body: "url=" + input + "&time=" + time + "&ua=" + ua + "&vkey=" + encrypt(vkey),
method: "post" method: "post"
}); });
// log(phtml); // log(phtml);
realUrl = jsdecrypt(JSON.parse(phtml).url); realUrl = jsdecrypt(JSON.parse(phtml).url);
log('解析到真实播放地址:'+realUrl); log('解析到真实播放地址:' + realUrl);
}catch (e) { } catch (e) {
log('解析发生错误:'+e.message); log('解析发生错误:' + e.message);
realUrl = vipUrl; realUrl = input;
}
return realUrl
} }

View File

@ -183,7 +183,7 @@ def jxTxt2Json(text: str, host: str):
return jxs return jxs
def getJxs(path='js', host=None): def getJxs(path=None, host=None):
custom_jx = 'base/解析.conf' custom_jx = 'base/解析.conf'
if not os.path.exists(custom_jx): if not os.path.exists(custom_jx):
with open(custom_jx, 'w+', encoding='utf-8') as f1: with open(custom_jx, 'w+', encoding='utf-8') as f1:
@ -195,8 +195,10 @@ def getJxs(path='js', host=None):
""" """
f1.write(msg) f1.write(msg)
base_path = 'jiexi' # 自建解析目录 base_path = 'jiexi' # 自建解析目录
if path is None:
path = base_path
os.makedirs(base_path, exist_ok=True) os.makedirs(base_path, exist_ok=True)
file_name = os.listdir(base_path) file_name = os.listdir(path)
file_name = list( file_name = list(
filter(lambda x: str(x).endswith('.js') and str(x).find('模板') < 0 and str(x).find('加密') < 0, file_name)) filter(lambda x: str(x).endswith('.js') and str(x).find('模板') < 0 and str(x).find('加密') < 0, file_name))
# print(file_name) # print(file_name)

View File

@ -1 +1 @@
3.9.47beta40 3.9.47beta41

View File

@ -11,6 +11,9 @@
* "Cookie":"$bili_cookie" * "Cookie":"$bili_cookie"
* 手动替换为 * 手动替换为
* "Cookie":"将获取的Cookie黏贴在这" * "Cookie":"将获取的Cookie黏贴在这"
* 客户端长期Cookie设置教程:
* 抓包哔哩手机端搜索access_key,取任意链接里的access_key和appkey在drpy环境变量中增加同名的环境变量即可
* 此时哔哩.js这个解析可用于此源的解析线路用
*/ */
var rule = { var rule = {

View File

@ -70,14 +70,14 @@
"url": "{{ jx.url }}", "url": "{{ jx.url }}",
"type": {{ jx.type }}, "type": {{ jx.type }},
"ext": { "ext": {
"flag": ["qiyi","imgo","爱奇艺", "奇艺", "qq","qq 预告及花絮", "腾讯", "youku", "优酷", "pptv", "PPTV", "letv", "乐视","leshi", "bilibili", "哔哩哔哩", "哔哩", "mgtv", "芒果","sohu", "xigua","fun","风行"], "flag": ["qiyi","imgo","爱奇艺", "奇艺", "qq","qq 预告及花絮", "腾讯", "youku", "优酷", "pptv", "PPTV", "letv", "乐视","leshi", "mgtv", "芒果","sohu", "xigua","fun","风行"],
"header": { "header": {
"User-Agent": "{{ jx.ua }}" "User-Agent": "{{ jx.ua }}"
} }
} }
}{% if loop.last==False %},{% endif %}{% endfor %} }{% if loop.last==False %},{% endif %}{% endfor %}
], ],
"flags": ["imgo","youku", "qq","qq 预告及花絮", "iqiyi", "qiyi","fun", "letv","leshi","sohu", "tudou","xigua","cntv","1905", "pptv", "mgtv", "wasu", "bilibili", "renrenmi"], "flags": ["imgo","youku", "qq","qq 预告及花絮", "iqiyi", "qiyi","fun", "letv","leshi","sohu", "tudou","xigua","cntv","1905", "pptv", "mgtv", "wasu", "renrenmi"],
"hotSearch": [{ "hotSearch": [{
"name": "mobilesearch", "name": "mobilesearch",
"request": { "request": {