tzfile.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. var rule = {
  2. title:'团长资源',
  3. host:'https://t-rex.tzfile.com',
  4. homeUrl:'/',
  5. url: '/fyclass/page/fypage?',
  6. filter_url:'{{fl.class}}',
  7. filter:{
  8. },
  9. searchUrl: '/?s=**',
  10. searchable:2,
  11. quickSearch:0,
  12. filterable:0,
  13. headers:{
  14. 'User-Agent': 'PC_UA',
  15. 'Accept': '*/*',
  16. 'Referer': 'https://t-rex.tzfile.com/'
  17. },
  18. 图片来源:'@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"}',
  19. timeout:5000,
  20. class_name:'电影&电视剧&动画&纪录片演唱会&真人秀综艺',
  21. class_url:'movies&tvshow&animation&faction&show',
  22. play_parse:true,
  23. play_json:[{
  24. re:'*',
  25. json:{
  26. parse:0,
  27. jx:0
  28. }
  29. }],
  30. lazy:'',
  31. limit:6,
  32. // 推荐:'main#main article:has(img);a&&title;img&&data-src;div.entry-wrapper a&&Text;a&&href',
  33. 推荐:'*',
  34. 一级:`js:
  35. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  36. let d = [];
  37. log("tzfiles input>>>>>>>>>>>>>>"+input);
  38. let html = request(input);
  39. //log("tzfiles 1level html>>>>>>>>>>>>>>"+html);
  40. let list = pdfa(html, 'main#main article:has(img)');
  41. list.forEach(function(it) {
  42. d.push({
  43. title: pdfh(it, 'a&&title'),
  44. desc: pdfh(it, 'div.entry-wrapper a&&Text'),
  45. pic_url: 'http://127.0.0.1:10079/i/0/s/'+pd(it, 'img&&data-src', HOST),
  46. url: pd(it, 'a&&href', HOST)
  47. });
  48. })
  49. setResult(d);
  50. `,
  51. //一级:`js:
  52. //let html=request(input);
  53. //log("html>>>>>>>>>>>>>>>>"+html);
  54. //`,
  55. 二级:{
  56. title:"#app .container header h1&&Text",
  57. img:"#main article div.entry-content img&&src",
  58. desc:"#app .container header .meta-date time&&datetime",
  59. content:"#main article .entry-content&&Text",
  60. tabs:`js:
  61. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  62. TABS=[];
  63. let d = pdfa(html, '#main article div.entry-content p');
  64. let tabsq=[];
  65. d.forEach(function(it) {
  66. let purl = pd(it, 'a&&href', HOST);
  67. if (purl.includes("pan.quark.cn")){
  68. tabsq.push("夸克雲盤");
  69. } else if (purl.includes("www.aliyundrive.com")){
  70. tabsq.push("阿里雲盤");
  71. }
  72. });
  73. if (tabsq.length==1){
  74. TABS=tabsq;
  75. }else{
  76. let tmpIndex=1;
  77. tabsq.forEach(function(it){
  78. TABS.push(it+tmpIndex);
  79. tmpIndex++;
  80. });
  81. }
  82. log('tzfile TABS >>>>>>>>>>>>>>>>>>' + TABS);
  83. `,
  84. lists:`js:
  85. log(TABS);
  86. LISTS=[];
  87. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  88. let d = pdfa(html, '#main article div.entry-content p');
  89. d.forEach(function(it) {
  90. let purl = pd(it, 'a&&href', HOST);
  91. if (/(pan.quark.cn|www.aliyundrive.com)/.test(purl)){
  92. let type="ali";
  93. if (purl.includes("pan.quark.cn")){
  94. type="quark";
  95. } else if (purl.includes("www.aliyundrive.com")){
  96. type="ali";
  97. }
  98. let confirm="";
  99. if (TABS.length==1){
  100. confirm="&confirm=0";
  101. }
  102. LISTS.push([purl+'$'+'http://127.0.0.1:9978/proxy?do='+type+'&type=push'+confirm+'&url='+encodeURIComponent(purl)]);
  103. }
  104. });
  105. `,
  106. },
  107. 搜索:'main#main div.container article:has(img);a&&title;img&&data-src;div.entry-wrapper a&&Text;a&&href',
  108. }