2024-05-26 21:37:53 +08:00
|
|
|
|
var rule = {
|
2024-06-18 22:04:57 +08:00
|
|
|
|
title: '斗鱼直播[官]',
|
2024-05-26 21:37:53 +08:00
|
|
|
|
host: 'https://m.douyu.com',
|
|
|
|
|
homeUrl: '/api/home/mix',//网站的首页链接,用于分类获取和推荐获取
|
|
|
|
|
url: '/api/room/list?page=fypage&type=fyfilter',
|
|
|
|
|
filterable: 1,//是否启用分类筛选,
|
|
|
|
|
filter_url: '{{fl.cateId}}',
|
|
|
|
|
filter: 'H4sIAAAAAAAAA519aVPb2pruX+Huz923z0n2Oad7fyPMCUOCyXirq0tYwpaRLZDseOg6VThswIQ5IQwxcyAQRhMIg81Qde8/ueUlyZ/6L9x3SV5a73L2/XC6KlVBg6U1vMPzjvrPX9LaL7/9r//8pV9J//LbL0EprrTJv/zTLzEpqsAxyY3apyU4fitpCcW9MUZPT6+TXL7tKb0Ah+rAL3//J+9K+WrI+XFpr0xUL6UH+/m14qR1uElGhqvXlGDav1ZZPytfz1YvRBOmGvQvWblLsr1QvdT60j9v301Xvqyzn5j+eXI/TN7vWed35OS6ejUlD8j4VZXsmJWdKBeLbJRqLJ3gL1xat3eH2E/VWCilJmqe3txRvSzHU+jNe6cwCWt6z5liU0lr8Qh/8EKhMjTOH5xKSLFf/v7vf//3f/rlaUPIXfF/dCecidNK/ncnO2/n2VK0d7XzNRo+qizuWVdXVm6metmIplP8+rd75+K9nT2wi/fV6w3NfKXGpuz5defu2r5ZYlcDj16j51uLG/anGbIzZxe/Vu94Ud/e1V3f2ePf09Dc2ug/G/70V2vu1rmftRaunZw/dN2M1xucYho7m6tX6F/+2a6e+gfsvPu3T2G39/BUMnNI5rfZK7v4G+134zbQ2c2Gc3LO6ElP8oEG2FMb9EQsrhiBuKH2K/51TdfKxbnK5kX5eoLc5NgOy5kwouOjeTJyWy6OV1aufNLM9NZct4aGrMVda2WqektSTwY1ycRUT0b2rMKcs7lonxxX7xqMRjT/ujO27/woWF8Yo8l6XHpgDI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2YYmTjI/PeNf/SYI7Ky7kM6TxdRhOFvcocqy5rSBIvN/S
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
`,
|
|
|
|
|
}
|