xzys.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. var rule = {
  2. title:'校长影视[云盘]',
  3. host:'https://xzys.fun',
  4. homeUrl: '/',
  5. url: '/fyclass.html?page=fypage',
  6. filter_url:'{{fl.class}}',
  7. filter:{
  8. },
  9. searchUrl: '/search.html?keyword=**',
  10. searchable:2,
  11. quickSearch:0,
  12. filterable:0,
  13. headers:{
  14. 'User-Agent': 'PC_UA',
  15. 'Cookie':''
  16. },
  17. timeout:5000,
  18. class_name: '电视剧&电影&动漫&纪录片&综艺',
  19. class_url: 'dsj&dy&dm&jlp&zy',
  20. play_parse:true,
  21. play_json:[{
  22. re:'*',
  23. json:{
  24. parse:0,
  25. jx:0
  26. }
  27. }],
  28. lazy:'',
  29. limit:6,
  30. 推荐:'div.container div.row a:has(>img);img&&alt;img&&src;img&&alt;a&&href',
  31. 一级:'div.container div.row div.list-boxes;img&&alt;img&&src;div.list-actions&&Text;a&&href',
  32. 二级:{
  33. title:"div.container div.row h1&&Text",
  34. img:"div.container div.row img&&src",
  35. desc:'div.container div.row div.article-infobox&&Text', //remark
  36. content:'div.container div.row div#info&&Text',
  37. tabs:`js:
  38. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  39. TABS=[]
  40. let d = pdfa(html, 'div.container div.row a');
  41. let tabsa = [];
  42. let tabsq = [];
  43. let tabsm = false;
  44. let tabse = false;
  45. d.forEach(function(it) {
  46. let burl = pdfh(it, 'a&&href');
  47. if (burl.startsWith("https://www.aliyundrive.com/s/") || burl.startsWith("https://www.alipan.com/s/")){
  48. tabsa.push("阿里雲盤");
  49. }else if (burl.startsWith("https://pan.quark.cn/s/")){
  50. tabsq.push("夸克網盤");
  51. }else if (burl.startsWith("magnet")){
  52. tabsm = true;
  53. }else if (burl.startsWith("ed2k")){
  54. tabse = true;
  55. }
  56. });
  57. if (tabsm === true){
  58. TABS.push("磁力");
  59. }
  60. if (tabse === true){
  61. TABS.push("電驢");
  62. }
  63. if (false && tabsa.length + tabsq.length > 1){
  64. TABS.push("選擇右側綫路");
  65. }
  66. let tmpIndex;
  67. tmpIndex=1;
  68. tabsa.forEach(function(it){
  69. TABS.push(it + tmpIndex);
  70. tmpIndex = tmpIndex + 1;
  71. });
  72. tmpIndex=1;
  73. tabsq.forEach(function(it){
  74. TABS.push(it + tmpIndex);
  75. tmpIndex = tmpIndex + 1;
  76. });
  77. log('xzys TABS >>>>>>>>>>>>>>>>>>' + TABS);
  78. `,
  79. lists:`js:
  80. log(TABS);
  81. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  82. LISTS = [];
  83. let d = pdfa(html, 'div.container div.row a');
  84. let lista = [];
  85. let listq = [];
  86. let listm = [];
  87. let liste = [];
  88. d.forEach(function(it){
  89. let burl = pdfh(it, 'a&&href');
  90. let title = pdfh(it, 'a&&Text');
  91. log('dygang title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  92. log('dygang burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  93. let loopresult = title + '$' + burl;
  94. if (burl.startsWith("https://www.aliyundrive.com/s/") || burl.startsWith("https://www.alipan.com/s/")){
  95. if (true){
  96. if (TABS.length==1){
  97. burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&confirm=0&url=" + encodeURIComponent(burl);
  98. }else{
  99. burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl);
  100. }
  101. }else{
  102. burl = "push://" + burl;
  103. }
  104. loopresult = title + '$' + burl;
  105. lista.push(loopresult);
  106. }else if (burl.startsWith("https://pan.quark.cn/s/")){
  107. if (true){
  108. if (TABS.length==1){
  109. burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl);
  110. }else{
  111. burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl);
  112. }
  113. }else{
  114. burl = "push://" + burl;
  115. }
  116. loopresult = title + '$' + burl;
  117. listq.push(loopresult);
  118. }else if (burl.startsWith("magnet")){
  119. listm.push(loopresult);
  120. }else if (burl.startsWith("ed2k")){
  121. liste.push(loopresult);
  122. }
  123. });
  124. if (listm.length>0){
  125. LISTS.push(listm);
  126. }
  127. if (liste.length>0){
  128. LISTS.push(liste);
  129. }
  130. if (false && lista.length + listq.length > 1){
  131. LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]);
  132. }
  133. lista.forEach(function(it){
  134. LISTS.push([it]);
  135. });
  136. listq.forEach(function(it){
  137. LISTS.push([it]);
  138. });
  139. `,
  140. },
  141. 搜索:`js:
  142. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  143. if (rule_fetch_params.headers.Cookie.startsWith("http")){
  144. rule_fetch_params.headers.Cookie=fetch(rule_fetch_params.headers.Cookie);
  145. let cookie = rule_fetch_params.headers.Cookie;
  146. setItem(RULE_CK, cookie);
  147. };
  148. log('xzys seach cookie>>>>>>>>>>>>>' + rule_fetch_params.headers.Cookie);
  149. let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
  150. log("xzys search params>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params));
  151. let search_html = request( HOST + '/search.html?keyword=' + encodeURIComponent(KEY), _fetch_params)
  152. //log("xzys search result>>>>>>>>>>>>>>>" + search_html);
  153. let d=[];
  154. let dlist = pdfa(search_html, 'div.container div.row div.list-boxes');
  155. dlist.forEach(function(it){
  156. let title = pdfh(it, 'h2 a img&&alt');
  157. if (searchObj.quick === true){
  158. if (title.includes(KEY)){
  159. title = KEY;
  160. }
  161. }
  162. let img = pd(it, 'h2 a img&&src', HOST);
  163. let content = pdfh(it, 'p.text_p&&Text');
  164. let desc = pdfh(it, 'div.list-actions&&Text'); //remark
  165. let url = pd(it, 'h2 a&&href', HOST);
  166. d.push({
  167. title:title,
  168. img:img,
  169. content:content,
  170. desc:desc,
  171. url:url
  172. })
  173. });
  174. setResult(d);
  175. `,
  176. }