X/js/tzfile.js
2023-09-11 15:33:14 +08:00

104 lines
2.8 KiB
JavaScript

var rule = {
title:'团长资源',
host:'https://t-rex.tzfile.com',
homeUrl:'/',
url: '/fyclass/page/fypage?',
filter_url:'{{fl.class}}',
filter:{
},
searchUrl: '/?s=**&type=post',
searchable:2,
quickSearch:0,
filterable:0,
headers:{
'User-Agent': 'PC_UA',
'Accept': '*/*',
'Referer': 'https://t-rex.tzfile.com/'
},
图片来源:'@Headers={"Accept":"*/*","Referer":"https://t-rex.tzfile.com/","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36"}',
timeout:5000,
class_name:'电影&电视剧&动画&纪录片演唱会&真人秀综艺',
class_url:'movies&tvshow&animation&faction&show',
play_parse:true,
play_json:[{
re:'*',
json:{
parse:0,
jx:0
}
}],
lazy:'',
limit:6,
推荐:'*',
一级:`js:
pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
let d = [];
log("tzfiles input>>>>>>>>>>>>>>"+input);
let html = request(input);
//log("tzfiles 1level html>>>>>>>>>>>>>>"+html);
let list = pdfa(html, '#primary-home ul li:has(img)');
list.forEach(function(it) {
d.push({
title: pdfh(it, 'img&&alt'),
desc: pdfh(it, 'div.post-info div.list-footer time.b2timeago&&Text') + '/' + pdfh(it, 'div.post-info div.list-footer a&&Text'),
pic_url: 'http://127.0.0.1:10079/i/0/s/'+pd(it, 'img&&src', HOST),
url: pd(it, 'a&&href', HOST)
});
})
setResult(d);
`,
二级:{
title:"#primary-home h1&&Text",
img:"#primary-home article div.entry-content img&&src",
desc:"#primary-home .post-meta li.single-date&&Text",
content:"#primary-home article .entry-content&&Text",
tabs:`js:
pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
TABS=[];
let d = pdfa(html, '#primary-home article div.entry-content p');
let tabsq=[];
d.forEach(function(it) {
let purl = pd(it, 'a&&href', HOST);
if (purl.includes("pan.quark.cn")){
tabsq.push("夸克網盤");
} else if (purl.includes("www.aliyundrive.com")){
tabsq.push("阿里雲盤");
}
});
if (tabsq.length==1){
TABS=tabsq;
}else{
let tmpIndex=1;
tabsq.forEach(function(it){
TABS.push(it+tmpIndex);
tmpIndex++;
});
}
log('tzfile TABS >>>>>>>>>>>>>>>>>>' + TABS);
`,
lists:`js:
log(TABS);
LISTS=[];
pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
let d = pdfa(html, '#primary-home article div.entry-content p');
d.forEach(function(it) {
let purl = pd(it, 'a&&href', HOST);
if (/(pan.quark.cn|www.aliyundrive.com)/.test(purl)){
let type="ali";
if (purl.includes("pan.quark.cn")){
type="quark";
} else if (purl.includes("www.aliyundrive.com")){
type="ali";
}
let confirm="";
if (TABS.length==1){
confirm="&confirm=0";
}
LISTS.push([purl+'$'+'http://127.0.0.1:9978/proxy?do='+type+'&type=push'+confirm+'&url='+encodeURIComponent(purl)]);
}
});
`,
},
搜索:'#primary-home ul li:has(img);img&&alt;img&&src;div.post-info div.list-fotter time.b2timeago&&Text;a&&href',
}