From 929805f465cf27620008142bed35632226ed99cd Mon Sep 17 00:00:00 2001 From: Yoursmile7 Date: Tue, 7 Mar 2023 07:14:02 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/虎牙直播.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/虎牙直播.js b/js/虎牙直播.js index 51c56b4..de376d6 100644 --- a/js/虎牙直播.js +++ b/js/虎牙直播.js @@ -39,8 +39,11 @@ var rule = { timeout:5000, limit:8, play_parse:true, + // play_json:[{re:'*', json:{jx:0, parse:1}}], + // play_json:0, // lazy:"js:let rid=input.match(/\\/(\\d+)/)[1];log(rid);let purl=JSON.parse(request('https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid='+rid)).data.stream.baseSteamInfoList[0].sStreamName;log(purl);let rurl='http://txtest-xp2p.p2p.huya.com/src/'+purl+'.xs?ratio=4000';input={jx:0,url:rurl,parse:0}", - lazy:"js:let rid=input.match(/\\/(\\d+)/)[1];function getRealUrl(live_url){let[i,b]=live_url.split('?');let r=i.split('/').pop();let s=r.replace(/\.(flv|m3u8)/,'');let c_tmp=b.split('&').filter(n=>n);let n={};let c_tmp2=[];c_tmp.forEach(function(tmp,index){if(index<3){n[tmp.split('=')[0]]=tmp.split('=')[1]}else{c_tmp2.push(tmp)}});let tmp2=c_tmp2.join('&');n[tmp2.split('=')[0]]=tmp2.split('=')[1];let fm=decodeURIComponent(n.fm).split('&')[0];let u=base64Decode(fm);let p=u.split('_')[0];let f=new Date().getTime()+'0000';let ll=n.wsTime;let t='0';let h=[p,t,s,f,ll].join('_');let m=md5(h);return(i+'?wsSecret='+m+'&wsTime='+ll+'&u='+t+'&seqid='+f+'&'+c_tmp2.pop()).replace('hls','flv').replace('m3u8','flv')}let purl=JSON.parse(request('https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid='+rid)).data.stream.flv.multiLine[0].url;input={jx:0,url:getRealUrl(purl),parse:0,header:JSON.stringify({'user-agent':'Mozilla/5.0'})}", + lazy:"js:let rid=input.match(/\\/(\\d+)/)[1];let purl=JSON.parse(request('https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid='+rid)).data.stream.baseSteamInfoList[0].sStreamName;input={jx:0,url:'http://txtest-xp2p.p2p.huya.com/src/'+purl+'.xs?ratio=4000',parse:0}", + double:false, 推荐:'*', 一级:'json:data.datas;introduction;screenshot;nick;profileRoom', 二级:'*',