This commit is contained in:
qist 2024-08-30 11:13:39 +08:00
parent 2587e2ab99
commit 3f8a50251c

View File

@ -1,28 +1,28 @@
globalThis.getHeaders = function (input) { globalThis.getHeaders= function(input){
let headers = { let headers = {
'User-Agent': 'okhttp/4.1.0' 'User-Agent': 'okhttp/4.1.0'
}; };
return headers return headers
} }
var rule = { var rule = {
title: '点播', title:'点播',
host: 'http://tv.jsp47.com', host:'http://tv.jsp47.com',
homeUrl: '', homeUrl:'',
searchUrl: 'https://www.tycng.com/cj.php?q=**&pageNum=fypage', searchUrl:'https://www.tycng.com/cj.php?q=**&pageNum=fypage',
searchable: 2, searchable:2,
quickSearch: 1, quickSearch:1,
multi: 1, multi:1,
filterable: 1, filterable:1,
headers: { 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' 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.289 Safari/537.36'
}, },
timeout: 5000, timeout:5000,
limit: 20, limit:20,
play_parse: true, play_parse:true,
lazy: "", lazy:"",
推荐: "", 推荐:"",
一级: "", 一级:"",
二级: `js: 二级:`js:
let d = []; let d = [];
try { try {
let html = request(input, { let html = request(input, {
@ -72,19 +72,21 @@ var rule = {
} catch (e) { } catch (e) {
log('获取二级详情页发生错误:' + e.message) log('获取二级详情页发生错误:' + e.message)
}`, }`,
搜索: `js: 搜索:`js:
let d = []; let d = [];
let html = request(input); let html = request(input);
let json = JSON.parse(html); let json = JSON.parse(html);
json.data.forEach(function(data) { json.data.forEach(function(data) {
d.push({ data.list.forEach(function(it) {
url: "https://www.tycng.com/cj.php?id=" + data.id + "&port=" + json.port, d.push({
title: data.name, url: "https://www.tycng.com/cj.php?jspid=" + it.id + "&port=" + data.port,
img: data.pic, title: it.name,
content:data.content, img: it.pic,
desc: data.remarks + "," + data.type_name + "," + json.port content:it.content,
}) desc: it.remarks + "," + it.type_name + "," + data.portname
})
});
}); });
setResult(d); setResult(d);
` `
} }