蓝光磁力.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. var rule = {
  2. title:'4KHDR[磁]',
  3. host:'https://www.4khdr.cn',
  4. homeUrl: "/forum.php?mod=forumdisplay&fid=2&page=1",
  5. url: '/forum.php?mod=forumdisplay&fid=2&filter=typeid&typeid=fyclass&page=fypage',
  6. filter_url:'{{fl.class}}',
  7. filter:{
  8. },
  9. searchUrl: '/search.php#searchsubmit=yes&srchtxt=**;post',
  10. searchable:2,
  11. quickSearch:1,
  12. filterable:0,
  13. headers:{
  14. 'User-Agent': 'PC_UA',
  15. 'Cookie':'hvLw_2132_saltkey=TIHLl6lF; hvLw_2132_lastvisit=1692640733; hvLw_2132_visitedfid=2; hvLw_2132_sendmail=1; _clck=bmvlfv|2|fec|0|1328; hvLw_2132_seccodecSAH73=7547.d0a543395de43bfa49; hvLw_2132_ulastactivity=1692644363%7C0; hvLw_2132_auth=8608dKQC6bKMZh5FKg09ZhhWjbrygDZw3i%2FXQTK6RYYYKIhxi%2FVywBubisxssBZlQ%2BNfz9nK3ZiCNnUvF9HlL%2Fehrg; hvLw_2132_lastcheckfeed=99213%7C1692644363; hvLw_2132_checkfollow=1; hvLw_2132_lip=163.204.43.186%2C1692644363; hvLw_2132_sid=0; hvLw_2132_checkpm=1; hvLw_2132_noticeTitle=1; _clsk=x9bivq|1692644368391|2|1|x.clarity.ms/collect; hvLw_2132_lastact=1692644370%09index.php%09forumdisplay; hvLw_2132_st_t=99213%7C1692644370%7Ceeabd9f3f324a9138f1be3cc46fdcd01; hvLw_2132_forum_lastvisit=D_2_1692644370',
  16. },
  17. timeout:5000,
  18. class_name: "4K电影&4K美剧&4K华语&4K动画&4K纪录片&4K日韩印&蓝光电影&蓝光美剧&蓝光华语&蓝光动画&蓝光日韩印",
  19. class_url:"3&8&15&6&11&4&29&31&33&32&34",
  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. 推荐:'ul#waterfall li;a&&title;img&&src;div.auth.cl&&Text;a&&href',
  31. 一级:'ul#waterfall li;a&&title;img&&src;div.auth.cl&&Text;a&&href',
  32. 二级:{
  33. title:"#thead_subject&&Text",
  34. img:"img.zoom&&src",
  35. desc:'td[id^="postmessage_"] font&&Text',
  36. content:'td[id^="postmessage_"] font&&Text',
  37. tabs:`js:
  38. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  39. TABS=[]
  40. let d = pdfa(html, 'table.t_table');
  41. let aliIndex=1;
  42. d.forEach(function(it) {
  43. let burl = pdfh(it, 'a&&href');
  44. log("burl >>>>>>" + burl);
  45. if (burl.startsWith("https://www.aliyundrive.com/s/")){
  46. TABS.push("aliyun"+aliIndex);
  47. aliIndex = aliIndex + 1;
  48. }
  49. });
  50. d = pdfa(html, 'table.t_table a[href^="magnet"]');
  51. if (d.length>0){
  52. TABS.push("磁力");
  53. }
  54. log('4khdr TABS >>>>>>>>>>>>>>>>>>' + TABS);
  55. `,
  56. lists:`js:
  57. log(TABS);
  58. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  59. LISTS = [];
  60. let d = pdfa(html, 'table.t_table');
  61. d.forEach(function(it){
  62. let burl = pdfh(it, 'a&&href');
  63. if (burl.startsWith("https://www.aliyundrive.com/s/")){
  64. let title = pdfh(it, 'a&&Text');
  65. log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  66. burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl);
  67. log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  68. let loopresult = title + '$' + burl;
  69. LISTS.push([loopresult]);
  70. }
  71. });
  72. let listm = [];
  73. d.forEach(function(it){
  74. let burl = pdfh(it, 'a&&href');
  75. if (burl.startsWith("magnet")){
  76. let title = pdfh(it, 'a&&Text');
  77. log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  78. log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  79. let loopresult = title + '$' + burl;
  80. listm.push(loopresult);
  81. }
  82. });
  83. if (listm.length>0){
  84. LISTS.push(listm);
  85. }
  86. `,
  87. },
  88. 一级:'ul#waterfall li;a&&title;img&&src;div.auth.cl&&Text;a&&href',
  89. 搜索:`js:
  90. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  91. if (rule_fetch_params.headers.Cookie.startsWith("http")){
  92. rule_fetch_params.headers.Cookie=fetch(rule_fetch_params.headers.Cookie);
  93. let cookie = rule_fetch_params.headers.Cookie;
  94. setItem(RULE_CK, cookie);
  95. };
  96. log('4khdr search cookie>>>>>>>>>>>>>>>' + rule_fetch_params.headers.Cookie);
  97. let new_host= HOST + '/search.php';
  98. let new_html=request(new_host);
  99. let formhash = pdfh(new_html, 'input[name="formhash"]&&value');
  100. log("4khdr formhash>>>>>>>>>>>>>>>" + formhash);
  101. let params = 'formhash=' + formhash + '&searchsubmit=yes&srchtxt=' + KEY;
  102. let _fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
  103. let postData = {
  104. body: params
  105. };
  106. Object.assign(_fetch_params, postData);
  107. log("4khdr search postData>>>>>>>>>>>>>>>" + JSON.stringify(_fetch_params));
  108. let search_html = post( HOST + '/search.php', _fetch_params)
  109. //log("4khdr search result>>>>>>>>>>>>>>>" + search_html);
  110. let d=[];
  111. let dlist = pdfa(search_html, 'div#threadlist ul li');
  112. dlist.forEach(function(it){
  113. let title = pdfh(it, 'h3&&Text');
  114. if (searchObj.quick === true){
  115. if (title.includes(KEY)){
  116. title = KEY;
  117. }
  118. }
  119. let img = "";
  120. let content = pdfh(it, 'p:eq(3)&&Text');
  121. let desc = pdfh(it, 'p:eq(2)&&Text');
  122. let url = pd(it, 'a&&href', HOST);
  123. d.push({
  124. title:title,
  125. img:img,
  126. content:content,
  127. desc:desc,
  128. url:url
  129. })
  130. });
  131. setResult(d);
  132. `,
  133. }