xb6v.js 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. var rule = {
  2. title:'新版6V[磁]',
  3. host:'http://www.xb6v.com',
  4. homeUrl:'/',
  5. url: '/fyclass/index_fypage.html?',
  6. filter_url:'{{fl.class}}',
  7. filter:{
  8. },
  9. searchUrl: '/e/search/index.php#tempid=1&tbname=article&mid=1&dopost=search&submit=&keyborad=**;post',
  10. searchable:2,
  11. quickSearch:0,
  12. filterable:0,
  13. headers:{
  14. 'User-Agent': 'PC_UA',
  15. 'Referer': 'http://www.xb6v.com/'
  16. },
  17. timeout:5000,
  18. class_name:'最新50部&喜剧片&动作片&爱情片&科幻片&恐怖片&剧情片&战争片&纪录片&动画片&电视剧&综艺',
  19. class_url:'qian50m.html&xijupian&dongzuopian&aiqingpian&kehuanpian&kongbupian&juqingpian&zhanzhengpian&jilupian&donghuapian&dianshiju&ZongYi',
  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. 推荐:`js:
  31. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  32. let d = [];
  33. let html = request(input);
  34. let list = pdfa(html, 'div.mainleft ul#post_container li');
  35. list.forEach(it => {
  36. d.push({
  37. title: pdfh(it, 'div.thumbnail img&&alt'),
  38. desc: pdfh(it, 'div.info&&span.info_date&&Text') + ' / ' + pdfh(it, 'div.info&&span.info_category&&Text'),
  39. pic_url: pd(it, 'div.thumbnail img&&src', HOST),
  40. url: pdfh(it, 'div.thumbnail&&a&&href')
  41. });
  42. });
  43. setResult(d);
  44. `,
  45. 一级:'',
  46. 一级:`js:
  47. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  48. let d = [];
  49. if (MY_CATE !== 'qian50m.html') {
  50. let turl = (MY_PAGE === 1)? '/' : '/index_'+ MY_PAGE + '.html';
  51. input = rule.homeUrl + MY_CATE + turl;
  52. let html = request(input);
  53. let list = pdfa(html, 'div.mainleft ul#post_container li');
  54. list.forEach(it => {
  55. d.push({
  56. title: pdfh(it, 'div.thumbnail img&&alt'),
  57. desc: pdfh(it, 'div.info&&span.info_date&&Text') + ' / ' + pdfh(it, 'div.info&&span.info_category&&Text'),
  58. pic_url: pd(it, 'div.thumbnail img&&src', HOST),
  59. url: pdfh(it, 'div.thumbnail&&a&&href')
  60. });
  61. })
  62. }else{
  63. input = rule.homeUrl + MY_CATE;
  64. let html = request(input);
  65. let list = pdfa(html, 'div.container div#tab-content&&ul&&li');
  66. list.forEach(it => {
  67. let title = pdfh(it, 'a&&Text');
  68. if (title!==""){
  69. d.push({
  70. title: title,
  71. desc: pdfh(it, 'a&&Text'),
  72. pic_url: '',
  73. url: pdfh(it, 'a&&href')
  74. });
  75. }
  76. })
  77. }
  78. setResult(d);
  79. `,
  80. 二级:{
  81. title:"div.article_container h1&&Text",
  82. img:"div#post_content img&&src",
  83. desc:"div#post_content&&Text",
  84. content:"div#post_content&&Text",
  85. tabs:`js:
  86. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  87. TABS=[]
  88. let d = pdfa(html, 'div#post_content table tbody tr a');
  89. let tabsa = [];
  90. let tabsq = [];
  91. let tabsm = false;
  92. let tabse = false;
  93. let tabm3u8 = [];
  94. d.forEach(function(it) {
  95. let burl = pdfh(it, 'a&&href');
  96. if (burl.startsWith("https://www.aliyundrive.com/s/") || burl.startsWith("https://www.alipan.com/s/")){
  97. tabsa.push("阿里雲盤");
  98. }else if (burl.startsWith("https://pan.quark.cn/s/")){
  99. tabsq.push("夸克網盤");
  100. }else if (burl.startsWith("magnet")){
  101. tabsm = true;
  102. }else if (burl.startsWith("ed2k")){
  103. tabse = true;
  104. }
  105. });
  106. if (false){
  107. d = pdfa(html, 'div:has(>div#post_content) div.widget:has(>h3)');
  108. d.forEach(function(it) {
  109. tabm3u8.push(pdfh(it, 'h3&&Text'));
  110. });
  111. }
  112. if (tabsm === true){
  113. TABS.push("磁力");
  114. }
  115. if (tabse === true){
  116. TABS.push("電驢");
  117. }
  118. if (false && tabsa.length + tabsq.length > 1){
  119. TABS.push("選擇右側綫路");
  120. }
  121. let tmpIndex;
  122. tmpIndex=1;
  123. tabsa.forEach(function(it){
  124. TABS.push(it + tmpIndex);
  125. tmpIndex = tmpIndex + 1;
  126. });
  127. tmpIndex=1;
  128. tabsq.forEach(function(it){
  129. TABS.push(it + tmpIndex);
  130. tmpIndex = tmpIndex + 1;
  131. });
  132. tabm3u8.forEach(function(it){
  133. TABS.push(it);
  134. });
  135. log('xb6v TABS >>>>>>>>>>>>>>>>>>' + TABS);
  136. `,
  137. lists:`js:
  138. log(TABS);
  139. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  140. LISTS = [];
  141. let d = pdfa(html, 'div#post_content table tbody tr a');
  142. let lista = [];
  143. let listq = [];
  144. let listm = [];
  145. let liste = [];
  146. let listm3u8 = {};
  147. d.forEach(function(it){
  148. let burl = pdfh(it, 'a&&href');
  149. let title = pdfh(it, 'a&&Text');
  150. log('xb6v title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  151. log('xb6v burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  152. let loopresult = title + '$' + burl;
  153. if (burl.startsWith("https://www.aliyundrive.com/s/") || burl.startsWith("https://www.alipan.com/s/")){
  154. if (true){
  155. if (TABS.length==1){
  156. burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&confirm=0&url=" + encodeURIComponent(burl);
  157. }else{
  158. burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl);
  159. }
  160. }else{
  161. burl = "push://" + burl;
  162. }
  163. loopresult = title + '$' + burl;
  164. lista.push(loopresult);
  165. }else if (burl.startsWith("https://pan.quark.cn/s/")){
  166. if (true){
  167. if (TABS.length==1){
  168. burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&confirm=0&url=" + encodeURIComponent(burl);
  169. }else{
  170. burl = "http://127.0.0.1:9978/proxy?do=quark&type=push&url=" + encodeURIComponent(burl);
  171. }
  172. }else{
  173. burl = "push://" + burl;
  174. }
  175. loopresult = title + '$' + burl;
  176. listq.push(loopresult);
  177. }else if (burl.startsWith("magnet")){
  178. listm.push(loopresult);
  179. }else if (burl.startsWith("ed2k")){
  180. liste.push(loopresult);
  181. }
  182. });
  183. if (listm.length>0){
  184. LISTS.push(listm);
  185. }
  186. if (liste.length>0){
  187. LISTS.push(liste);
  188. }
  189. if (false && lista.length + listq.length > 1){
  190. LISTS.push(["選擇右側綫路,或3秒後自動跳過$http://127.0.0.1:10079/delay/"]);
  191. }
  192. lista.forEach(function(it){
  193. LISTS.push([it]);
  194. });
  195. listq.forEach(function(it){
  196. LISTS.push([it]);
  197. });
  198. for ( const key in listm3u8 ){
  199. if (listm3u8.hasOwnProperty(key)){
  200. LISTS.push(listm3u8[key]);
  201. }
  202. };
  203. `,
  204. },
  205. 搜索:`js:
  206. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  207. let params = 'show=title&tempid=1&tbname=article&mid=1&dopost=search&submit=&keyboard=' + encodeURIComponent(KEY);
  208. let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
  209. let postData = {
  210. method: "POST",
  211. body: params
  212. };
  213. delete(_fetch_params.headers['Content-Type']);
  214. Object.assign(_fetch_params, postData);
  215. log("xb6v search postData>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params));
  216. let search_html = request( HOST + '/e/search/index.php', _fetch_params, true);
  217. //log("xb6v search result>>>>>>>>>>>>>>>" + search_html);
  218. let d=[];
  219. let dlist = pdfa(search_html, 'div.mainleft&&ul#post_container&&li');
  220. dlist.forEach(function(it){
  221. let title = pdfh(it, 'div.thumbnail img&&alt').replace( /(<([^>]+)>)/ig, '');
  222. if (searchObj.quick === true){
  223. if (false && title.includes(KEY)){
  224. title = KEY;
  225. }
  226. }
  227. let img = pd(it, 'div.thumbnail img&&src', HOST);
  228. let content = pdfh(it, 'div.article div.entry_post&&Text');
  229. let desc = pdfh(it, 'div.info&&span.info_date&&Text');
  230. let url = pd(it, 'div.thumbnail&&a&&href', HOST);
  231. d.push({
  232. title:title,
  233. img:img,
  234. content:content,
  235. desc:desc,
  236. url:url
  237. });
  238. });
  239. setResult(d);
  240. `,
  241. }