tzfile.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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=**&type=post',
  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. 推荐:'*',
  33. 一级:`js:
  34. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  35. let d = [];
  36. log("tzfiles input>>>>>>>>>>>>>>"+input);
  37. let html = request(input);
  38. //log("tzfiles 1level html>>>>>>>>>>>>>>"+html);
  39. let list = pdfa(html, '#primary-home ul li:has(img)');
  40. list.forEach(function(it) {
  41. d.push({
  42. title: pdfh(it, 'img&&alt'),
  43. desc: pdfh(it, 'div.post-info .post-list-cat&&Text'),
  44. pic_url: 'http://127.0.0.1:10079/i/0/s/'+pd(it, 'img&&src', HOST),
  45. url: pd(it, 'a&&href', HOST)
  46. });
  47. })
  48. setResult(d);
  49. `,
  50. 二级:{
  51. title:"#primary-home h1&&Text",
  52. img:"#primary-home article div.entry-content img&&src",
  53. desc:"#primary-home .post-meta li.single-date&&Text",
  54. content:"#primary-home article .entry-content&&Text",
  55. tabs:`js:
  56. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  57. TABS=[];
  58. let d = pdfa(html, '#primary-home article div.entry-content p');
  59. let tabsq=[];
  60. d.forEach(function(it) {
  61. let purl = pd(it, 'a&&href', HOST);
  62. if (purl.includes("pan.quark.cn")){
  63. tabsq.push("夸克網盤");
  64. } else if (purl.includes("www.aliyundrive.com")){
  65. tabsq.push("阿里雲盤");
  66. }
  67. });
  68. if (tabsq.length==1){
  69. TABS=tabsq;
  70. }else{
  71. let tmpIndex=1;
  72. tabsq.forEach(function(it){
  73. TABS.push(it+tmpIndex);
  74. tmpIndex++;
  75. });
  76. }
  77. log('tzfile TABS >>>>>>>>>>>>>>>>>>' + TABS);
  78. `,
  79. lists:`js:
  80. log(TABS);
  81. LISTS=[];
  82. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  83. let d = pdfa(html, '#primary-home article div.entry-content p');
  84. d.forEach(function(it) {
  85. let purl = pd(it, 'a&&href', HOST);
  86. if (/(pan.quark.cn|www.aliyundrive.com)/.test(purl)){
  87. let type="ali";
  88. if (purl.includes("pan.quark.cn")){
  89. type="quark";
  90. } else if (purl.includes("www.aliyundrive.com")){
  91. type="ali";
  92. }
  93. let confirm="";
  94. if (TABS.length==1){
  95. confirm="&confirm=0";
  96. }
  97. LISTS.push([purl+'$'+'http://127.0.0.1:9978/proxy?do='+type+'&type=push'+confirm+'&url='+encodeURIComponent(purl)]);
  98. }
  99. });
  100. `,
  101. },
  102. 搜索:`js:
  103. //'#primary-home ul li:has(img);img&&alt;img&&src;div.post-info .post-list-cat&&Text;a&&href',
  104. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  105. let html = request(input);
  106. let d=[];
  107. let dlist = pdfa(html, '#primary-home ul li:has(img)');
  108. dlist.forEach(function(it){
  109. let title=pdfh(it, 'img&&alt');
  110. if (title.includes(KEY)){
  111. if (searchObj.quick === true){
  112. title = KEY;
  113. }
  114. let img='http://127.0.0.1:10079/i/0/s/' + pd(it, 'img&&src',HOST);
  115. let content=pdfh(it, 'div.text_info h2&&Text');
  116. let url=pd(it, 'a&&href', HOST);
  117. let desc=pdfh(it, 'p.info&&Text');
  118. d.push({
  119. title:title,
  120. img:img,
  121. content:content,
  122. desc:desc,
  123. url:url
  124. })
  125. }
  126. });
  127. setResult(d);
  128. `,
  129. }