6/18/ds/lib/斗鱼直播.js

199 lines
39 KiB
JavaScript
Raw Normal View History

2024-07-12 09:44:07 +03:00
var rule = {
title:'斗鱼直播',
host:'https://m.douyu.com',
homeUrl:'/api/home/mix',//网站的首页链接,用于分类获取和推荐获取
url:'/api/room/list?page=fypage&type=fyfilter',
filterable:1,//是否启用分类筛选,
filter_url:'{{fl.cateId}}',
filter:{
"yl":[{"key":"cateId","name":"分类","value":[{"n":"原创IP","v":"ip"},{"n":"一起看","v":"yqk"},{"n":"二次元","v":"ecy"},{"n":"音乐","v":"music"},{"n":"户外","v":"HW"},{"n":"美食","v":"ms"},{"n":"心动派对","v":"xdpd"},{"n":"音遇恋人","v":"yinyu"},{"n":"星秀","v":"xingxiu"},{"n":"心动FM","v":"dtxs"},{"n":"娱乐推荐","v":"yltj"},{"n":"新选","v":"xinxuan"}]}],
"PCgame":[{"key":"cateId","name":"分类","value":[{"n":"英雄联盟","v":"LOL"},{"n":"热门游戏","v":"rmyx"},{"n":"穿越火线","v":"CF"},{"n":"重生边缘","v":"CSBYOL"},{"n":"无畏契约","v":"VALORANT"},{"n":"CFHD","v":"CFHD"},{"n":"命运方舟","v":"LostArk"},{"n":"DNF","v":"DNF"},{"n":"DOTA2","v":"DOTA2"},{"n":"使命召唤","v":"COD"},{"n":"炉石传说","v":"How"},{"n":"CS2","v":"CounterStrike"},{"n":"lol云顶之弈","v":"ydzhy"},{"n":"魔兽争霸","v":"mszb"},{"n":"魔兽怀旧服","v":"wowclassic"},{"n":"全民街篮","v":"qmjl"},{"n":"自走棋","v":"dota2rpg"},{"n":"传奇","v":"cq"},{"n":"跑跑卡丁车","v":"Popkart"},{"n":"网易游戏","v":"wyyx"},{"n":"星际争霸","v":"SC"},{"n":"守望先锋","v":"Overwatch"},{"n":"DOTA","v":"DOTA"},{"n":"魔兽世界","v":"WOW"},{"n":"剑网3","v":"JX3"},{"n":"魔域","v":"EudemonsOnline"},{"n":"我的世界","v":"MC"},{"n":"超激斗梦境","v":"cjdmj"},{"n":"冒险岛","v":"mxd"},{"n":"三国杀","v":"sanguosha"},{"n":"梦幻西游","v":"MHXYOL"},{"n":"天涯明月刀","v":"tianya"},{"n":"街头篮球","v":"jtlq"},{"n":"NBA2KOL2","v":"NBA2KOL2"},{"n":"QQ飞车端游","v":"qqfcdy"},{"n":"战地之王","v":"AVA"},{"n":"军事游戏","v":"jsyx"},{"n":"棋牌娱乐","v":"qipai"},{"n":"FC ONLINE","v":"FCOL"},{"n":"热门网游","v":"rmwy"},{"n":"卡拉彼丘","v":"klbq"},{"n":"诛仙世界","v":"zxsj"},{"n":"千古风流","v":"qgflpc"},{"n":"APEX","v":"APEX"},{"n":"流放之路POE","v":"PathofExile"},{"n":"剑网3缘起","v":"JW3YQ"},{"n":"逆水寒","v":"nsh"},{"n":"风暴英雄","v":"HOTS"},{"n":"逆战","v":"NZ"},{"n":"坦克世界","v":"TKSJ"},{"n":"战舰世界","v":"wfws"},{"n":"巫师之昆特牌","v":"wszktp"},{"n":"反恐精英Online","v":"CS"},{"n":"暗黑破坏神","v":"DIABLO"},{"n":"梦三国2","v":"msg2"},{"n":"传奇世界","v":"cqsj"},{"n":"方舟:生存进化","v":"fzscjh"},{"n":"神武4电脑版","v":"swdnb"},{"n":"群雄逐鹿","v":"qxzl"},{"n":"堡垒之夜","v":"blzy"},{"n":"无限法则","v":"roe"},{"n":"问道电脑版","v":"wddnb"},{"n":"西山居游戏","v":"Seasun"},{"n":"最终幻想14","v":"FF14"},{"n":"战意","v":"WYZY"},{"n":"剑灵","v":"BladeSoul"},{"n":"星际战甲","v":"Warframe"},{"n":"龙之谷","v":"DragonNest"},{"n":"铁甲雄兵","v":"tjxb"},{"n":"古剑奇谭网络版","v":"gjqtwlb"},{"n":"轩辕传奇","v":"XYCQ"},{"n":"神途","v":"shentu"},{"n":"激战2","v":"GuildWars2"},{"n":"高达文化区","v":"gdyxq"},{"n":"忍者村大战2","v":"rzcdz2"},{"n":"RPG网游专区","v":"rpgwyzq"},{"n":"诛仙3","v":"zhuxian3"},{"n":"笑傲江湖OL","v":"xajhol"},{"n":"冒险岛2","v":"MXD2"},{"n":"超击突破","v":"SuperPeople"},{"n":"无尽战区","v":"WJZQ"},{"n":"斗战神","v":"dzs"},{"n":"永恒之塔","v":"AION"},{"n":"九阴真经","v":"JYZJ"},{"n":"FPS综合网游","v":"FPSOL"},{"n":"劲舞团","v":"jwt"},{"n":"天下","v":"tianxai"},{"n":"泡泡堂","v":"ppt"},{"n":"武侠乂","v":"wxy"},{"n":"音乐游戏","v":"MG"},{"n":"新倩女幽魂","v":"ONLINE"},{"n":"天谕","v":"tianyu"},{"n":"征途2","v":"zhengtu2"},{"n":"QQ炫舞","v":"qqxw"},{"n":"泰亚史诗","v":"tyss"},{"n":"怪物猎人ol","v":"MHol"},{"n":"手工星球","v":"sgxq"},{"n":"星战前夜:晨曦","v":"EVE"},{"n":"热血传奇:本源","v":"rxcqhjsgb"},{"n":"枪火重生","v":"qhcs"},{"n":"彩虹岛","v":"CHD"},{"n":"御龙在天","v":"YLZT"},{"n":"英魂之刃","v":"YHZR"},{"n":"自由篮球","v":"ZYLQ"},{"n":"洛奇英雄传","v":"LQYXZ"},{"n":"封印者","v":"FYZ"},{"n":"合金弹头","v":"HJDT"},{"n":"新英雄年代","v":"XYXSD"},{"n":"星尘传说","v":"XCCS"},{"n":"盛趣游戏","v":"SQYX"},{"n":"新热血英豪","v":"XRXYH"},{"n":"沙盒游戏","v":"SHYX"},{"n":"我的世界:地下城","v":"MD"},{"n":"恐鬼症","v":"KGZ"},{"n":"领地人生","v":"LDRS"},{"n":"梦塔防","v":"TDOTK"},{"n":"大话西游2","v":"dhxy2"},{"n":"猎人","v":"lr"},{"n":"热血江湖online","v":"rxjhol"},{"n":"千年3","v":"qn3"},{"n":"逍遥情缘","v":"xyqy"},{"n":"快乐西游","v":"klxy"},{"n":"鹿鼎记","v":"ldj"},{"n":"新桃花源记","v":"xthyj"},{
"djry":[{"key":"cateId","name":"分类","value":[{"n":"主机游戏","v":"TVgame"},{"n":"刺客信条:英灵殿","v":"AC"},{"n":"马里奥制造","v":"Mario"},{"n":"逃离塔科夫","v":"EFT"},{"n":"命运2","v":"MY2"},{"n":"恐怖游戏","v":"Horror"},{"n":"荒野大镖客","v":"hydbk"},{"n":"灵魂筹码","v":"lhcm"},{"n":"骑马与砍杀","v":"MountAndBlade"},{"n":"只狼","v":"ZL"},{"n":"格斗游戏","v":"FTG"},{"n":"饥荒","v":"DontStarve"},{"n":"全境封锁","v":"qjfs"},{"n":"怀旧游戏","v":"classic"},{"n":"NBA2K","v":"NBA2K"},{"n":"八方旅人","v":"OT"},{"n":"血污:夜之仪式","v":"Blood"},{"n":"人类一败涂地","v":"Human"},{"n":"环世界","v":"RimWorld"},{"n":"古墓丽影","v":"gmly"},{"n":"鬼泣","v":"DMC"},{"n":"往日不再","v":"WRBZ"},{"n":"仙剑奇侠传","v":"PAL"},{"n":"神秘海域","v":"Uncharted"},{"n":"塞尔达系列","v":"TLoZ"},{"n":"僵尸世界大战","v":"WWZ"},{"n":"足球游戏","v":"zq"},{"n":"橙光","v":"cg"},{"n":"了不起的修仙模拟器","v":"ACS"},{"n":"女神异闻录","v":"P5"},{"n":"超级马里奥","v":"SMO"},{"n":"三国志系列","v":"Sangokushi"},{"n":"最终幻想","v":"FF"},{"n":"中土世界:战争之影","v":"MiddleEarth"},{"n":"流放者柯南","v":"Conan"},{"n":"三国群英传","v":"SANGO"},{"n":"无主之地","v":"Bor"},{"n":"辐射","v":"fs"},{"n":"SCUM","v":"Scum"},{"n":"文明","v":"CVI"},{"n":"仁王","v":"NIOH"},{"n":"缺氧","v":"ONI"},{"n":"全面吃鸡模拟器","v":"TAB"},{"n":"古剑奇谭","v":"GuJian3"},{"n":"皇牌空战","v":"hpkz"},{"n":"体育游戏","v":"tyyx"},{"n":"海岛大亨","v":"hddh"},{"n":"碧海黑帆","v":"klhdt"},{"n":"植物大战僵尸:花园战争系列","v":"PvsZ"},{"n":"蜘蛛侠","v":"Spide"},{"n":"勇者斗恶龙建造者2","v":"DQB2"},{"n":"遗迹:灰烬重生","v":"Rem"},{"n":"血源","v":"BB"},{"n":"旺达与巨像","v":"SotC"},{"n":"死亡搁浅","v":"DS"},{"n":"模拟人生","v":"Sims"},{"n":"空洞骑士","v":"HKS"},{"n":"胡闹厨房","v":"Overcooked"},{"n":"地铁:离去","v":"ME"},{"n":"生死狙击2","v":"ssjjtwo"},{"n":"三国战纪","v":"sgzj"},{"n":"怀旧FC","v":"edwcy"},{"n":"经典单机","v":"jddj"},{"n":"英雄无敌","v":"HoMM"},{"n":"街机游戏","v":"jjyx"},{"n":"合金装备","v":"MetalGear"},{"n":"红色警戒","v":"hsjj"},{"n":"镜之边缘","v":"MsE"},{"n":"勿忘我","v":"Remw"},{"n":"火焰纹章系列","v":"FireEmblem"},{"n":"星露谷物语","v":"Stardew"},{"n":"火炬之光","v":"Torchlight"},{"n":"赛博朋克2077","v":"Cyberpunk"},{"n":"中国式家长","v":"CP"},{"n":"精灵宝可梦系列","v":"Pokemon"},{"n":"尼尔:机械纪元","v":"NieR"},{"n":"无人深空","v":"NMS"},{"n":"EVOTINCTION","v":"EVOTINCTION"},{"n":"GT赛车7","v":"GT"},{"n":"超级机器人大战","v":"SRW"},{"n":"这是我的战争","v":"TWoM"},{"n":"杀戮尖塔","v":"sljt"},{"n":"冰汽时代","v":"Frostpunk"},{"n":"帝国时代","v":"AoEIV"},{"n":"死亡空间","v":"swkj"},{"n":"凯瑟琳Full Body","v":"CFB"},{"n":"足球经理","v":"Football"},{"n":"雨中冒险","v":"RoR"},{"n":"亿万僵尸","v":"Billions"},{"n":"武装突袭","v":"ArmA"},{"n":"石油大亨","v":"Oil"},{"n":"欧洲卡车模拟器","v":"Truck"},{"n":"美国逃亡者","v":"Fugitive"},{"n":"漫漫长夜","v":"mmcy"},{"n":"永恒轮回","v":"Survival"},{"n":"孤岛惊魂","v":"FarCry"},{"n":"都市:天际线","v":"Skylines"},{"n":"盗贼之海","v":"hdzh"},{"n":"Dayz","v":"DayZ"},{"n":"60秒","v":"60S"},{"n":"俄罗斯钓鱼","v":"RF"},{"n":"猎人:荒野的召唤","v":"theHunter"},{"n":"恐怖黎明","v":"GD"},{"n":"看门狗","v":"kmg"},{"n":"真三国无双","v":"DW"},{"n":"战斗砖块剧场","v":"BT"},{"n":"泰拉瑞亚","v":"Terraria"},{"n":"异星工厂","v":"Factorio"},{"n":"UFC","v":"UFC"},{"n":"底特律:变人","v":"Detroit"},{"n":"恶魔城","v":"Castlevania"},{"n":"毁灭战士","v":"Doom"},{"n":"火影忍者:究极忍者风暴","v":"Naruto"},{"n":"坎巴拉太空计划","v":"Kerbal"},{"n":"龙珠:超宇宙","v":"DBX"},{"n":"马里奥赛车","v":"MarioKart"},{"n":"欧陆风云","v":"EU"},{"n":"乞丐模
"syxx":[{"key":"cateId","name":"分类","value":[{"n":"元梦之星","v":"YMZX"},{"n":"王者荣耀","v":"wzry"},{"n":"LOL手游","v":"LOLM"},{"n":"崩坏:星穹铁道","v":"bhxqtd"},{"n":"和平精英","v":"hpjy"},{"n":"暗区突围","v":"aqtw"},{"n":"蛋仔派对","v":"dzpd"},{"n":"高能英雄","v":"gnyx"},{"n":"幻塔","v":"ht"},{"n":"火影忍者","v":"hyrz"},{"n":"COD手游","v":"smzhsy"},{"n":"lol电竞经理","v":"EGAME"},{"n":"DNF手游","v":"mdnf"},{"n":"金铲铲之战","v":"JGAME"},{"n":"天刀手游","v":"tdsy"},{"n":"原神","v":"yuanshen"},{"n":"航海王热血航线","v":"HHWRXHX"},{"n":"逆水寒手游","v":"NSHM"},{"n":"万国觉醒","v":"wgjx"},{"n":"鸿图之下","v":"htzx"},{"n":"欢乐麻将","v":"HLMJ"},{"n":"王者模拟战","v":"wzrpg"},{"n":"中国象棋","v":"ZGXQ"},{"n":"天谕手游","v":"tysy"},{"n":"巅峰坦克","v":"DFTK"},{"n":"新游中心","v":"xyzx"},{"n":"热门手游","v":"phone"},{"n":"梦幻手游","v":"mhxy"},{"n":"QQ飞车","v":"qqfcsy"},{"n":"第五人格","v":"dwrg"},{"n":"欢乐斗地主","v":"hlddz"},{"n":"荒野乱斗","v":"hyld"},{"n":"阴阳师","v":"yys"},{"n":"狼人杀","v":"LRS"},{"n":"JJ斗地主","v":"jj"},{"n":"梦幻新诛仙","v":"mhxzx"},{"n":"街霸对决","v":"jbdj"},{"n":"机动都市阿尔法","v":"jddsaef"},{"n":"一人之下","v":"yrzx"},{"n":"多多自走棋","v":"zzq"},{"n":"崩坏3","v":"bhxl"},{"n":"风云岛行动","v":"fydxd"},{"n":"云游戏","v":"cloudgame"},{"n":"跑跑手游","v":"PPKDCSY"},{"n":"率土之滨","v":"stzb"},{"n":"灌篮高手","v":"glgs"},{"n":"皇室战争","v":"hszz"},{"n":"忍者必须死3","v":"rzbxs3"},{"n":"神武4手游","v":"sw3"},{"n":"梦幻模拟战","v":"mhmnz"},{"n":"实况足球","v":"skzq"},{"n":"剑与远征","v":"jyyz"},{"n":"航海王:燃烧意志","v":"hhwrsyz"},{"n":"球球大作战","v":"qqdzz"},{"n":"英雄杀","v":"yxs"},{"n":"魔域口袋版","v":"mykdb"},{"n":"口袋新旅程","v":"KDXLC"},{"n":"剑网3指尖江湖","v":"jw3zjjh"},{"n":"部落冲突","v":"blct"},{"n":"剑与家园","v":"jyjy"},{"n":"新笑傲江湖","v":"xxajh"},{"n":"猫和老鼠","v":"mhls"},{"n":"猎人手游","v":"lrlr"},{"n":"明日之后","v":"mrzh"},{"n":"影之诗","v":"yzs"},{"n":"决战平安京","v":"jzpaj"},{"n":"魂斗罗归来","v":"DLHGL"},{"n":"贪吃蛇大作战","v":"tcsdzz"},{"n":"圣斗士星矢","v":"sdsxs"},{"n":"魔力宝贝手游","v":"mlbbsy"},{"n":"哈利波特:魔法觉醒","v":"HarryPotter"},{"n":"手游推广","v":"rmsy"},{"n":"魔灵召唤","v":"mlzh"},{"n":"香肠派对","v":"xcpd"},{"n":"迷你世界","v":"MNSJ"},{"n":"荒野行动","v":"hyxd"},{"n":"大话西游2口袋版","v":"dhxy2kdb"},{"n":"FC足球世界","v":"FCZQSJ"},{"n":"街篮","v":"jl"},{"n":"一起来捉妖","v":"yiqilaizhuoyao"},{"n":"明日方舟","v":"mrfz"},{"n":"自由幻想手游","v":"zyhx"},{"n":"一梦江湖","v":"ymjh"},{"n":"王牌战争:文明重启","v":"wmcq"},{"n":"完美世界手游","v":"wmsjsy"},{"n":"拳皇98OL","v":"kof98"},{"n":"赛尔号","v":"srh"},{"n":"猎魂觉醒","v":"lhjx"},{"n":"仙境传说","v":"xjcs"},{"n":"逃跑吧少年","v":"tpbsn"},{"n":"石器时代","v":"sqsd"},{"n":"英魂之刃口袋版","v":"yh"},{"n":"拉结尔","v":"lje"},{"n":"倩女幽魂手游","v":"qnyhsy"},{"n":"决斗之城2","v":"jdzc2"},{"n":"传奇手游","v":"cqsy"},{"n":"欢乐升级","v":"hlsj"},{"n":"雀魂","v":"Majsoul"},{"n":"二次元手游","v":"ecysy"},{"n":"天龙八部online","v":"tianlongbabuonline"},{"n":"征途2手游","v":"zt2sy"},{"n":"万王之王3D","v":"wwzw3D"},{"n":"武林外传","v":"wlwz"},{"n":"我叫MT4","v":"MT4"},{"n":"元气骑士","v":"yuanqiqishi"},{"n":"红警OL手游","v":"hjolsy"},{"n":"植物大战僵尸手游","v":"ZWDZJS"},{"n":"龙之谷手游","v":"lzgsy"},{"n":"创造与魔法","v":"ccymf"},{"n":"境界-死神激斗","v":"jjssjd"},{"n":"奇迹觉醒","v":"qjjx"},{"n":"光遇","v":"skygy"},{"n":"游戏王:决斗链接","v":"yxwjdlj"},{"n":"巅峰战舰","v":"dfzj"},{"n":"绝世战魂","v":"jszh"},{"n":"寻仙","v":"xunxian"},{"n":"天天象棋","v":"ttxq"},{"n":"王国纪元","v":"wg
// "yz":[{"key":"cateId","name":"分类","value":[{"n":"颜值","v":"yz"}]}],
"kjwh":[{"key":"cateId","name":"分类","value":[{"n":"数码科技","v":"smkj"},{"n":"纪录片","v":"jlp"},{"n":"成年教育","v":"jiaoyu"},{"n":"人文社科","v":"Humanities"}]}],
"yp":[{"key":"cateId","name":"分类","value":[{"n":"派对","v":"paidui"},{"n":"心动FM.","v":"DIANT"},{"n":"一起玩","v":"yiqiwan"}]}],
"voice":[{"key":"cateId","name":"分类","value":[{"n":"语音交友","v":"yyjy"},{"n":"音乐之声","v":"yyzs"},{"n":"连麦互动","v":"lianmaihudong"},{"n":"娱乐开黑","v":"ylkh"}]}]
// "znl":[{"key":"cateId","name":"分类","value":[{"n":"正能量","v":"znl"}]}]
},
filter_def:{
yl:{cateId:'yqk'},
PCgame:{cateId:'LOL'},
djry:{cateId:'TVgame'},
syxx:{cateId:'wzry'},
yz:{cateId:'yz'},
kjwh:{cateId:'smkj'},
yp:{cateId:'yiqiwan'},
voice:{cateId:'yyzs'},
znl:{cateId:'znl'}
},
class_name:'娱乐天地&网游竞技&单机热游&手游休闲&颜值&科技文化&语音互动&语音直播&正能量',// /api/cate/list
class_url:'yl&PCgame&djry&syxx&yz&kjwh&yp&voice&znl',
detailUrl: 'http://live.yj1211.work/api/live/getRoomInfo?uid=&platform=douyu&roomId=fyid',// JustLive
searchUrl:'/api/search/liveRoom?#did=10000000000000000000000000001501&limit=20&offset=0&sk=**;post',
searchable:2,
quickSearch:0,
headers:{
'User-Agent':'MOBILE_UA'
},
timeout:5000,
limit:8,
play_parse:true,
lazy:'',
推荐:`js:
let d = [];
let jo = JSON.parse(request(input)).data;
jo.forEach((it,idex) => {
let slist = jo[idex].list ;
slist.forEach(it => {
d.push({
url: it.rid,
title: it.roomName,
img: it.roomSrc,
desc: '👁' + it.hn + ' 🆙' + it.nickname,
})
});
});
setResult(d);
`,
一级:`js:
let d = [];
let jo = JSON.parse(request(input)).data.list;
jo.forEach(it => {
d.push({
url: it.rid,
title: it.roomName,
img: it.roomSrc,
desc: '👁' + it.hn + ' 🆙' + it.nickname,
})
});
setResult(d);
`,
二级:`js:
try {
if (typeof play_url === "undefined") {
var play_url = ""
}
var jo = JSON.parse(request(input)).data;
VOD = {
vod_id: jo.roomId,
vod_name: jo.roomName,
vod_pic: jo.roomPic,
type_name: "斗鱼." + jo.categoryName,
vod_director: '🆙 ' + jo.ownerName,
vod_content: "🏷分区:斗鱼" + "·" + jo.categoryName + " 🏷UP主" + jo.ownerName + " 🏷人气:" + jo.online + (jo.isLive === 1 ? " 🏷状态:正在直播" : "状态:未开播")
};
let episodes = JSON.parse(request("http://live.yj1211.work/api/live/getRealUrlMultiSource?platform=" + jo.platForm + "&roomId=" + jo.roomId)).data; //多线路
if (Object.keys(episodes).length !== 0) {
let playFrom = [];
let playList = [];
let kplayList = [];
Object.keys(episodes).forEach(function(key) {
playFrom.append(key);
kplayList = episodes[key].map(function(it) {
let title = it.qualityName;
let playUrl = it.playUrl
return title + "$" + play_url + urlencode(playUrl)
}).join("#")
playList.append(kplayList);
});
let vod_play_from = playFrom.join("$$$");
let vod_play_url = playList.join("$$$");
VOD["vod_play_from"] = vod_play_from;
VOD["vod_play_url"] = vod_play_url;
} else {
var d = [];
episodes = JSON.parse(request("http://live.yj1211.work/api/live/getRealUrl?platform=" + jo.platForm + "&roomId=" + jo.roomId)).data; //单线路
var name = {
"OD": "原画",
"FD": "流畅",
"LD": "标清",
"SD": "高清",
"HD": "超清",
"2K": "2K",
"4K": "4K",
"FHD": "全高清",
"XLD": "极速",
"SQ": "普通音质",
"HQ": "高音质"
};
Object.keys(episodes).forEach(function(key) {
if (!/ayyuid|to/.test(key)) {
d.push({
title: name[key],
url: episodes[key]
})
}
});
d.push(
{
title: "解析1",
url: "http://epg.112114.xyz/huya/" + jo.roomId
},
{
title: "解析2",
url: "https://www.aois.eu.org/live/huya/" + jo.roomId
},
{
title: "解析3",
url: "https://www.goodiptv.club/huya/" + jo.roomId
},
{
title: "解析4",
url: "http://maomao.kandiantv.cn/huya1.php?id=" + jo.roomId
},
{
title: "解析5",
url: "http://43.138.170.29:35455/huya/" + jo.roomId
},
{
title: "解析6",
url: "http://8.210.232.168/php/huya.php?id=" + jo.roomId
},
);
VOD["vod_play_from"] = "播放源";
VOD["vod_play_url"] = d.map(function(it) {
return it.title + "$" + it.url
}).join("#");
setResult(d);
}
} catch (e) {
log("获取二级详情页发生错误:" + e.message);
}
`,
// 搜索:'json:data.list;roomName;roomSrc;nickname;roomId',
搜索: `js:
var d = [];
let rurls = input.split(';')[0].split('#');
let rurl = rurls[0];
let params = rurls.length > 1 ?rurls[1]:'';
let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let postData = {body:params};
Object.assign(_fetch_params,postData);
let jo = JSON.parse(post(rurl,_fetch_params)).data.list;
jo.forEach(it => {
d.push({
url: it.roomId,
title: it.roomName,
img: it.roomSrc,
desc: '👁' + it.hn + ' 🆙' + it.nickname,
})
});
setResult(d);
`,
//是否启用辅助嗅探: 1,0
sniffer:1,
// 辅助嗅探规则js写法
isVideo: `js:
log(input);
if(/\\/huya/.test(input)) {
input = true
} else if(/\\.flv?|\\.m3u8?|\\.mp4?/.test(input)){
input = true
}else{
input = false
}
`,
}