xb6v.js 6.5 KB

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