tvbox/my/js/斗鱼直播.js

131 lines
36 KiB
JavaScript
Raw Permalink Normal View History

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":"二次元","v":"ecy"},{"n":"一起看","v":"yqk"},{"n":"音乐","v":"music"},{"n":"户外","v":"HW"},{"n":"美食","v":"ms"},{"n":"原创IP","v":"ip"},{"n":"心动派对","v":"xdpd"},{"n":"音遇恋人","v":"yinyu"},{"n":"星秀","v":"xingxiu"},{"n":"心动FM","v":"dtxs"},{"n":"娱乐推荐","v":"yltj"},{"n":"中国地质大学(武汉)","v":"CUGWH"}]}],
"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":"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":"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":"jsyx"},{"n":"棋牌娱乐","v":"qipai"},{"n":"FC ONLINE","v":"FCOL"},{"n":"热门网游","v":"rmwy"},{"n":"卡拉彼丘","v":"klbq"},{"n":"诛仙世界","v":"zxsj"},{"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":"反恐精英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":"AION"},{"n":"竞速游戏","v":"jingsu"},{"n":"FPS综合网游","v":"FPSOL"},{"n":"劲舞团","v":"jwt"},{"n":"天下","v":"tianxai"},{"n":"火箭联盟","v":"hjlm"},{"n":"泡泡堂","v":"ppt"},{"n":"音乐游戏","v":"MG"},{"n":"新倩女幽魂","v":"ONLINE"},{"n":"天谕","v":"tianyu"},{"n":"QQ炫舞","v":"qqxw"},{"n":"大唐无双","v":"dtws"},{"n":"怪物猎人ol","v":"MHol"},{"n":"手工星球","v":"sgxq"},{"n":"热血传奇:本源","v":"rxcqhjsgb"},{"n":"彩虹岛","v":"CHD"},{"n":"御龙在天","v":"YLZT"},{"n":"自由篮球","v":"ZYLQ"},{"n":"洛奇英雄传","v":"LQYXZ"},{"n":"洛奇","v":"LQ"},{"n":"封印者","v":"FYZ"},{"n":"合金弹头","v":"HJDT"},{"n":"新英雄年代","v":"XYXSD"},{"n":"盛趣游戏","v":"SQYX"},{"n":"新热血英豪","v":"XRXYH"},{"n":"沙盒游戏","v":"SHYX"},{"n":"恐鬼症","v":"KGZ"},{"n":"领地人生","v":"LDRS"},{"n":"大话西游2","v":"dhxy2"},{"n":"猎人","v":"lr"},{"n":"热血江湖online","v":"rxjhol"},{"n":"千年3","v":"qn3"},{"n":"逍遥情缘","v":"xyqy"},{"n":"快乐西游","v":"klxy"},{"n":"诺亚传说","v":"nycs"},{"n":"鹿鼎记","v":"ldj"},{"n":"武魂2电脑版","v":"wh2pc"},{"n":"奇迹世界sun","v":"qjsjsun"},{"n":"剑侠世界2电脑版","v":"jxsj2pc"},{"n":"斩魂","v":"zhpc"},{"n":"大唐2","v":"dt2pc"},{"n":"幻想神域电脑版","v":"hxsypc"},{"n":"蜀山:初章","v":"ssczpc"},{"n":"狼人对决网游","v":"lrdjpc"},{"n":"武林群侠传","v":"wlqxzpc"},{"n":"飘流幻境","v":"plhjpc"},{"n":"破天一剑","v":"ptyj"},{"n":"四国军<EFBFBD><EFBFBD>
"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":"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":"SMO"},{"n":"三国志系列","v":"Sangokushi"},{"n":"星际公民","v":"StarCitizen"},{"n":"最终幻想","v":"FF"},{"n":"中土世界:战争之影","v":"MiddleEarth"},{"n":"流放者柯南","v":"Conan"},{"n":"三国群英传","v":"SANGO"},{"n":"无主之地","v":"Bor"},{"n":"辐射","v":"fs"},{"n":"太吾绘卷","v":"twhj"},{"n":"SCUM","v":"Scum"},{"n":"正当防卫","v":"zdfw"},{"n":"以撒的结合","v":"Isaac"},{"n":"文明","v":"CVI"},{"n":"仁王","v":"NIOH"},{"n":"缺氧","v":"ONI"},{"n":"皇牌空战","v":"hpkz"},{"n":"体育游戏","v":"tyyx"},{"n":"海岛大亨","v":"hddh"},{"n":"植物大战僵尸:花园战争系列","v":"PvsZ"},{"n":"蜘蛛侠","v":"Spide"},{"n":"勇者斗恶龙建造者2","v":"DQB2"},{"n":"遗迹:灰烬重生","v":"Rem"},{"n":"血源","v":"BB"},{"n":"旺达与巨像","v":"SotC"},{"n":"模拟人生","v":"Sims"},{"n":"空洞骑士","v":"HKS"},{"n":"极品飞车","v":"jpfc"},{"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":"FireEmblem"},{"n":"星露谷物语","v":"Stardew"},{"n":"赛博朋克2077","v":"Cyberpunk"},{"n":"中国式家长","v":"CP"},{"n":"尼尔:机械纪元","v":"NieR"},{"n":"无人深空","v":"NMS"},{"n":"EVOTINCTION","v":"EVOTINCTION"},{"n":"GT赛车7","v":"GT"},{"n":"超级机器人大战","v":"SRW"},{"n":"信长之野望","v":"KOEINOBU"},{"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":"Honor"},{"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":"Terraria"},{"n":"UFC","v":"UFC"},{"n":"底特律:变人","v":"Detroit"},{"n":"恶魔城","v":"Castlevania"},{"n":"毁灭战士","v":"Doom"},{"n":"火影忍者:究极忍者风暴","v":"Naruto"},{"n":"无尽地牢","v":"DOTE"},{"n":"坎巴拉太空计划","v":"Kerbal"},{"n":"龙珠:超宇宙","v":"DBX"},{"n":"马里奥赛车","v":"MarioKart"},{"n":"模拟山羊","v":"GoatSim"},{"n":"欧陆风云","v":"EU"},{"n":"乞丐模拟器","v":"HoboToughLife"},{"n":"小偷模拟器","v":"ThiefSimulator"},{"n":"逆转
"syxx":[{"key":"cateId","name":"分类","value":[{"n":"王者荣耀","v":"wzry"},{"n":"LOL手游","v":"LOLM"},{"n":"崩坏:星穹铁道","v":"bhxqtd"},{"n":"逆水寒手游","v":"NSHM"},{"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":"YMZX"},{"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":"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":"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":"sdsxs"},{"n":"魔力宝贝手游","v":"mlbbsy"},{"n":"哈利波特:魔法觉醒","v":"HarryPotter"},{"n":"手游推广","v":"rmsy"},{"n":"魔灵召唤","v":"mlzh"},{"n":"香肠派对","v":"xcpd"},{"n":"迷你世界","v":"MNSJ"},{"n":"FC足球世界","v":"FCZQSJ"},{"n":"街篮","v":"jl"},{"n":"明日方舟","v":"mrfz"},{"n":"一梦江湖","v":"ymjh"},{"n":"完美世界手游","v":"wmsjsy"},{"n":"拳皇98OL","v":"kof98"},{"n":"赛尔号","v":"srh"},{"n":"仙境传说","v":"xjcs"},{"n":"流星群侠传","v":"liuxinghudiejian"},{"n":"逃跑吧少年","v":"tpbsn"},{"n":"石器时代","v":"sqsd"},{"n":"RPG手游","v":"rpgsy"},{"n":"英魂之刃口袋版","v":"yh"},{"n":"倩女幽魂手游","v":"qnyhsy"},{"n":"决斗之城2","v":"jdzc2"},{"n":"传奇手游","v":"cqsy"},{"n":"雀魂","v":"Majsoul"},{"n":"二次元手游","v":"ecysy"},{"n":"征途2手游","v":"zt2sy"},{"n":"万王之王3D","v":"wwzw3D"},{"n":"武林外传","v":"wlwz"},{"n":"潮人篮球","v":"crlq"},{"n":"元气骑士","v":"yuanqiqishi"},{"n":"红警OL手游","v":"hjolsy"},{"n":"植物大战僵尸手游","v":"ZWDZJS"},{"n":"创造与魔法","v":"ccymf"},{"n":"奇迹觉醒","v":"qjjx"},{"n":"光遇","v":"skygy"},{"n":"游戏王:决斗链接","v":"yxwjdlj"},{"n":"巅峰战舰","v":"dfzj"},{"n":"寻仙","v":"xunxian"},{"n":"天天象棋","v":"ttxq"},{"n":"王国纪元","v":"wgjy"},{"n":"龙族幻想","v":"lzhx"},{"n":"三国杀移动版","v":"SGSSY"},{"n":"罗布乐思","v":"Roblox"},{"n":"足球手游","v":"zqsy"},{"n":"月圆之夜","v":"yyzy"},{"n":"秦时明月世界","v":"qsmysj"},{"n":"麻将来了","v":"mjll"},{"n":"风之大陆","v":"fzdl"},{"n":"金属对决","v":"jsdj"},{"n":"轩辕剑龙舞云山","v":"xyjlwys"},{"n":"微乐棋牌","v":"WLQP"},{"n":"辐射避难所Online","v":"fsbnsonline"},{"n":"街篮2","v":"jl2"},{"n":"极光计划","v":"jgjh"},{"n":"不良人3","v":"blr3"},{"n":"镇魔曲手游","v":"zmq"},{"n":"乱世王者","v":"lswz"},{
// "yz":[{"key":"cateId","name":"分类","value":[{"n":"颜值","v":"yz"}]}],
"kjwh":[{"key":"cateId","name":"分类","value":[{"n":"企鹅直播","v":"qezb"},{"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:'AC'},
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:
var d = [];
var jo = JSON.parse(request(input)).data;
VOD = {
vod_id: jo.roomId,
vod_name: jo.roomName,
vod_pic: jo.roomPic,
type_name: jo.platForm.replace("douyu", "斗鱼") + "." + jo.categoryName,
vod_remarks: '🏷roomId ' + jo.roomId,
vod_director: '👥在线人数 ' + jo.online,
vod_actor: '🆙 ' + jo.ownerName,
vod_content: '🏷roomId' + jo.roomId + "" + ' 🏷状态:' + (jo.isLive == 1 ? '正在直播' : '未开播'),
// vod_content: "🏷分区:" + jo.platForm.replace("douyu", "斗鱼") + "·" + jo.categoryName + " 🏷UP主" + jo.ownerName + " 🏷人气:" + jo.online + (jo.isLive === 1 ? " 🏷状态:正在直播" : "状态:未开播"),
};
var playurl = JSON.parse(request("http://live.yj1211.work/api/live/getRealUrl?platform=" + jo.platForm + "&roomId=" + jo.roomId)).data;
// var name = {
// OD: "JustLive",
// FD: "流畅",
// LD: "标清",
// SD: "高清",
// HD: "JustLive(预览)",
// "2K": "2K",
// "4K": "4K",
// FHD: "全高清",
// XLD: "极速",
// SQ: "普通音质",
// HQ: "高音质",
// };
Object.keys(playurl).forEach(function(key) {
// if (!/ayyuid|to/.test(key)) {
if (/OD/.test(key)) {
d.push({
// title: name[key],
title: 'JustLive',
url: playurl[key]
})
}
});
d.push({
title: "斗鱼解析1",
url: "http://epg.112114.xyz/douyu/" + jo.roomId
}, {
title: "斗鱼解析2",
url: "https://www.aois.eu.org/live/douyu/" + jo.roomId
}, {
title: "斗鱼解析3",
url: "https://www.goodiptv.club/douyu/" + jo.roomId
}, {
title: "斗鱼解析4",
url: "http://maomao.kandiantv.cn/douyu1.php?id=" + jo.roomId
});
VOD.vod_play_from = "播放源";
VOD.vod_play_url = d.map(function(it) {
return it.title + "$" + it.url
}).join("#");
setResult(d);
`,
搜索:'json:data.list;roomName;roomSrc;nickname;roomId',
}