tvbox/js/caiji.js

93 lines
3.3 KiB
JavaScript
Raw Normal View History

2024-08-30 11:13:39 +08:00
globalThis.getHeaders= function(input){
let headers = {
2024-07-31 19:26:42 +08:00
'User-Agent': 'okhttp/4.1.0'
2024-08-30 11:13:39 +08:00
};
return headers
2024-07-31 19:26:42 +08:00
}
var rule = {
2024-08-30 11:13:39 +08:00
title:'点播',
host:'http://tv.jsp47.com',
homeUrl:'',
2024-09-09 14:40:39 +08:00
searchUrl:'https://www.ugigc.us.kg/cj.php?q=**&pageNum=fypage',
2024-08-30 11:13:39 +08:00
searchable:2,
quickSearch:1,
multi:1,
filterable:1,
headers:{
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.289 Safari/537.36'
2024-07-31 19:26:42 +08:00
},
2024-08-30 11:13:39 +08:00
timeout:5000,
limit:20,
play_parse:true,
lazy:"",
推荐:"",
一级:"",
二级:`js:
2024-08-01 09:52:20 +08:00
let d = [];
try {
let html = request(input, {
headers: getHeaders(url)
});
let json = JSON.parse(html);
VOD = {
vod_name: "",
type_name: "",
vod_actor: "",
vod_year: "",
vod_content: "",
vod_remarks: "",
vod_pic: ""
};
let playData = json.data;
let playMap = {};
playData.forEach(function(it, index) {
VOD.vod_name =it.name;
VOD.type_name = it.class ? it.class+"     线路:"+json.portname : "未知     线路:"+json.portname;
VOD.vod_actor = it.actor;
VOD.vod_content = it.content ? it.content : "特别提醒:ㅤ友情提示您请勿相信影片中的广告,以免上当受骗";
VOD.vod_year = it.year;
VOD.vod_pic = it.pic ? it.pic : "http://114.100.48.52:18008/movjpg/" + it.name + ".jpg";
2024-08-04 13:08:55 +08:00
//let names = it.name +" ("+ (index+1) +")";
let names = it.name;
2024-08-01 09:52:20 +08:00
let playEsp = it.source.eps;
playEsp.forEach(function(it) {
let source = names;
2024-07-31 19:26:42 +08:00
if (!playMap.hasOwnProperty(source)) {
playMap[source] = []
2024-08-01 09:52:20 +08:00
}
playMap[source].append(it['name'].strip() + '$' + it['url']);
})
})
let playFrom = [];
let playList = [];
Object.keys(playMap).forEach(function(key) {
playFrom.append(key);
playList.append(playMap[key].join('#'))
});
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
2024-07-31 19:26:42 +08:00
} catch (e) {
log('获取二级详情页发生错误:' + e.message)
2024-08-01 09:52:20 +08:00
}`,
2024-08-30 11:13:39 +08:00
搜索:`js:
2024-07-31 19:26:42 +08:00
let d = [];
let html = request(input);
let json = JSON.parse(html);
2024-08-04 13:08:55 +08:00
json.data.forEach(function(data) {
2024-08-30 11:13:39 +08:00
data.list.forEach(function(it) {
d.push({
2024-09-09 14:40:39 +08:00
url: "https://www.ugigc.us.kg/cj.php?id=" + it.id + "&port=" + data.port,
2024-08-30 11:49:35 +08:00
title: it.name + "【" + data.portname + "】",
2024-08-30 11:13:39 +08:00
img: it.pic,
content:it.content,
2024-08-30 11:35:51 +08:00
desc: it.remarks + "," + it.type_name
2024-08-30 11:13:39 +08:00
})
});
2024-07-31 19:26:42 +08:00
});
setResult(d);
2024-08-30 11:13:39 +08:00
`
2024-07-31 19:26:42 +08:00
}