影视看吧.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. var rule = {
  2. title: "影视看吧",
  3. host: "https://m.yskanba.com",
  4. url: "/fyfilter",
  5. searchUrl: '/search/$wd/fypage',
  6. searchable: 2,
  7. quickSearch: 0,
  8. filterable: 1,
  9. filter: "H4sIAAAAAAAAA62XXVPaQBSG/wvXTr33r3R6ESUki2FDIQkfjjNUKiNMK9paPwrjx1SKbUFx7DgWiv4ZNwn/oidx2lHYN2jHCy9g9nE3J+95zrIUizOFFxjXYnMvl2KLaiE2FxNrFe98EJuJcSWl3v/sKIathgs5fe2Vu6Odk+Br+qCb1iz9pUyHqbOJQlrR1Be6lTJiyzP/VrsbzXurLTOdVZXMgh7N7B7eY7iZSxtKcFwMifcXole5vao9RA3FUjNTYW/t3C2vwlMq7DXh8m23m6LahmSeJW0p55Zr7spnyCUZTzL5Udub4tcAgouqbitcftRqO+ohkzZ8SHel421v4oe0gyxJyVF3K+q0KROftnZyO8TBiZtcK9qm/Lg7rdHBN4hmmA72dDtt73odgqadUuWP6V6diXoPgprCNUuRo+K4Pdqr4Oek3kP18bZwZYP6UG3lERrUxepVVPYCOzwO/dv8BGmQGv3YJZlIKE0xE+oY82r51Uyop6xOzfM8frKcJ8oJAOLNpSjX5YBp5+nQ8gbyT0qg9SynoHBsl/qx/wVwml3EzXN6Kfrd299fvQ1ptCwnyRSLdjVsbgDPXK8DsVkOtQHQGvUdpKjrNGTDnRbEMlChsOmoOBEd51704GbEgN2w6C0HWh7L2nIiTI19S3th2WJlWk6UL/FgoJzgqSAqq6IJ6s9VFgeHbAxv++3x9tRscwFamd5zdZLAaZoIYQjQvx9ff6caqkxK4f8lGmCPBTPFFpBxJuSEV7sb+15HmoOQIXuScuTv1GvU3L0+RAusqIP3U/kw2pMOzxBMhXuCF1Vedd8eQDQIkoaENZ6KsSeNisdOy212IJph8+MTZuq0D0E87cXpO2/wEYI5Chq4Z/o3+/5wCEmDKltE1trueZ++QzTPeALf+0Sz71XXIJy0g+pq82jol7v+UQlXmC6A4FoN9ReCEQb0bzbIZji+Ng/aVl6owyPR6EYUSjELULzNvru2i+tEXQMn7lFUmLK6ylGcvNY+XZMjUfrpIjFXkUpQYM8prqxu5h7trSmL3cZPyuxDxE7H6fcYBP3TG78njWmAJMKZ/lT1BGSUeUalqteWhjsgg2mbZ+BGAOdfQOIJiO8tARd5c4Hz4I7E44D8Ko63IWmbObClX+27zTMEFlgW3M2aJXr5ExHgam5KBO5AUd8UV+WHYNqeN1hWElHqheU/vFhpUtEQAAA=",
  10. filter_url: "{{fl.分类}}",
  11. filter_def: {
  12. dianying: {
  13. 分类: "hot/hotmovie/fypage.html"
  14. },
  15. dianshiju: {
  16. 分类: "hot/hottv/fypage.html"
  17. },
  18. dongman: {
  19. 分类: "hot/topsearchcomic/fypage.html"
  20. },
  21. zongyi: {
  22. 分类: "hot/topsearchshow/fypage.html"
  23. }
  24. },
  25. headers: {
  26. "User-Agent": "MOBILE_UA"
  27. },
  28. timeout: 5000,
  29. class_parse: ".subNav&&a;a&&Text;a&&href;([^\/]+$)",
  30. cate_exclude: "推荐",
  31. play_parse: true,
  32. lazy: $js.toString(() => {
  33. input = {parse: 0, url: input, js: ''};
  34. }),
  35. double: true,
  36. 推荐: '.main&&.globalPadding;.picTxtA&&li;*;img&&src;*;*',
  37. 一级: '.picTxtA&&li;.sTit&&Text;img&&data-original;.emScore&&Text;a&&href',
  38. 二级: {
  39. title: 'h1&&Text;.ulTxt&&li&&Text',
  40. img: '.posterPic&&img&&src',
  41. desc: ';.ulTxt&&li:eq(1)&&Text;.ulTxt&&li:eq(2)&&Text;.zpmy&&Text',
  42. content: '',
  43. tabs: '.tabt3&&span',
  44. //lists:'dd.ulNumList:eq(#id)&&li',
  45. lists: $js.toString(() => {
  46. LISTS = [];
  47. //let tabs = pdfa(html,rule.二级.tabs);
  48. let tabs = pdfa(html, 'dd.ulNumList');
  49. // log(tabs.length);
  50. //log(tabs[0]);
  51. for (let tab of tabs) {
  52. let lists = pdfa(tab, 'ul&&li');
  53. // log(lists.length);
  54. let list1 = [];
  55. for (let ls of lists) {
  56. let tt = pdfh(ls, 'a&&Text');
  57. let href = pd(ls, 'a&&href', MY_URL);
  58. if (!tt.includes('展开')) {
  59. list1.push(tt + '$' + href);
  60. } else {
  61. let script = pdfh(ls, 'script&&Html');
  62. //log(script);
  63. let a = script.match(/window.*=(.*?);/)[1];
  64. //log(a);
  65. let b = eval(a);
  66. //log(b.length);
  67. let c = b.map(it => it.t + '$' + urljoin(MY_URL, it.l));
  68. // log(c);
  69. list1 = list1.concat(c);
  70. }
  71. }
  72. LISTS.push(list1);
  73. }
  74. }),
  75. tab_text: 'body&&Text',
  76. list_text: 'body&&Text',
  77. list_url: 'a&&href'
  78. },
  79. 搜索: $js.toString(() => {
  80. function encodeWd(t) {
  81. var n;
  82. return t.length < 7 && (t = t + " ".substr(0, 7 - t.length)),
  83. t.length > 15 && (t = t.substr(0, 15)),
  84. n = base64Encode(t),
  85. n = n.replace(/\//g, "_").replace(/\+/g, "-").replace(/=/g, ""),
  86. n = n.slice(0, 6) + "j" + n.slice(6);
  87. }
  88. let wd = encodeWd(KEY);
  89. input = input.replace('$wd', wd);
  90. input = urljoin(HOST, input);
  91. let html = request(input);
  92. let d = [];
  93. let p = rule.一级.split(';');
  94. pdfa(html, p[0]).forEach(it => {
  95. d.push({
  96. title: pdfh(it, p[1]),
  97. img: pdfh(it, p[2]),
  98. desc: pdfh(it, p[3]),
  99. url: pd(it, p[4], input),
  100. });
  101. });
  102. setResult(d);
  103. }),
  104. }