忍者影视.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. globalThis.RSAdata=function (data,pub) {
  2. let publickey='-----BEGIN PUBLIC KEY-----MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQCAliLnnNy2iPebSiwsfSlc1dV2gyQZjBVVAACMLmFa4svzF2XsM26dQ2AqXjDIMurDn8EfrevDMuq5TGqIFCaawEYdzWQFE3IMmnxEkxieEK7Lr0o0BjSZ5NLcaTnoWL0/+To837i5XPhzaZWHy4d9G+AaJ9MJDA3FBR5CQ7vi1wIBAw==-----END PUBLIC KEY-----';
  3. if (pub){
  4. return RSA.encode(data, publickey);
  5. }else{
  6. return NODERSA.decryptRSAWithPublicKey(data, publickey, {
  7. // PublicFormat: "pkcs1-private",
  8. // outEncoding: "hex"
  9. options: {environment: "browser", encryptionScheme: 'pkcs1_oaep'},
  10. });
  11. }
  12. }
  13. var rule = {
  14. title: '忍者影视',
  15. host: '',
  16. hostJs: `
  17. let html=request("http://212.64.23.171:5566/api.php/App/getRzysBaseURList")
  18. html=JSON.parse(html).data;
  19. HOST=RSAdata(html,false).split(',')[0];
  20. console.log(HOST);
  21. let sign='rzys996'+Math.round(new Date().getTime()/1000).toString()+'150';
  22. sign=encodeURIComponent(RSAdata(sign,true));
  23. html=request(HOST+"/x1/v1/macTypes/types?sign="+sign+"&os=2");
  24. let jo=JSON.parse(html).data.list;
  25. let filters = {};
  26. let cb={"class":"类型","area":"地区","lang":"语言","year":"年份","star":"演员","director":"导演","state":"状态","version":"版本"};
  27. let class1=[];
  28. jo.forEach(function(tp) {
  29. rule.class_name=rule.class_name +"&"+tp['type_name'];
  30. //log(rule.class_name)
  31. rule.class_url=rule.class_url +"&"+tp['type_id'];
  32. //log(tp['type_id'])
  33. let ep=tp['type_extend'];
  34. let classes = [];
  35. for (let key in ep){
  36. let value=ep[key];
  37. if (value.length>1){
  38. class1.append(key);
  39. //写成{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"}]}这种格式
  40. let dd=value.toString().split(',');
  41. var s=[];
  42. dd.forEach(function(i){
  43. s.append({'n':i,'v':i});
  44. });//这里的;去掉,蜜蜂里面会报错。
  45. let ss={"key":key,"name":cb[key],"value":s};
  46. //选择特定的分类
  47. log("特定的分类:"+key);
  48. if ((' type_class year area').indexOf(key)>0)
  49. classes.append(ss);
  50. }
  51. }
  52. filters[tp['type_id']]=classes;
  53. });
  54. class1=Array.from(new Set(class1)).sort();
  55. let s=""
  56. class1.forEach(function(tp) {
  57. //这里过滤掉一些不要的分类
  58. log("分类:"+s) ;
  59. s=s+"&" + tp +"={{fl."+tp+"}}";
  60. })
  61. s='classtype={{fl.type_class}}&area={{fl.area}}&year={{fl.year}}'
  62. rule.filter_url=s;
  63. rule.filter=filters;
  64. rule.class_name=rule.class_name.slice(1);
  65. rule.class_url=rule.class_url.slice(1);
  66. log(rule.class_name);
  67. log(rule.class_url);
  68. `,
  69. class_name: '',
  70. class_url: '',
  71. searchUrl: '/x1/v1/Search/search?data=**&page=fypage&limit=12&',
  72. searchable: 2,
  73. quickSearch: 0,
  74. headers: {
  75. 'User-Agent': 'okhttp/4.9.3',
  76. },
  77. url: '/x1/v1/macTypes/detail?&typeid=fyclass&fyfilter&page=fypage&limit=30&',
  78. homeUrl:'/x1/v1/macTypes/detail?classtype=&area=&year=&typeid=1&page=1&limit=30&',
  79. filterable: 0,
  80. filter_url: '',
  81. filter: {},
  82. filter_def: {},
  83. cate_exclude: '体育',
  84. detailUrl: '/x1/v1/vod/details2?vodidstr=fyid&',
  85. play_parse: true,
  86. lazy: `js:
  87. input=RSAdata(input,false);
  88. `,
  89. limit: 6,
  90. 预处理: `js: let xrequest = request;
  91. (function() {
  92. request = function(url, obj) {
  93. let sign='rzys996'+Math.round(new Date().getTime()/1000).toString()+'150';
  94. log(sign);
  95. sign=encodeURIComponent(RSAdata(sign,true));
  96. if (url.indexOf('ils2')>0)
  97. sign=sign+'&uuid=36e3ec45-ea44-35df-ae36-664858bc6953';
  98. url=url+"sign="+sign+"&os=2";
  99. return xrequest(url)
  100. }
  101. })()`,
  102. 推荐: '*',
  103. 一级: 'json:data.list;vod_name;vod_pic;vod_remarks;vod_id;vod_actor',
  104. 二级: `js:
  105. VOD = {};
  106. let html = request(input);
  107. let json = JSON.parse(html).data;
  108. VOD.vod_name = json.vod_name;
  109. VOD.vod_id = input;
  110. VOD.vod_pic = json.vod_pic;
  111. VOD.vod_year = json.vod_year;
  112. VOD.vod_area = json.vod_area;
  113. VOD.vod_remarks = json.vod_remarks;
  114. VOD.vod_content = json.vod_content;
  115. VOD.vod_actor = json.vod_actor;
  116. VOD.vod_play_from = json.vod_play_list.map(it => it.from).join('$$$');
  117. let playUrls = [];
  118. json.vod_play_list.forEach((it) => {
  119. let plist = it.urls.map(it => it.name + '$' + it.url).join('#');
  120. playUrls.push(plist);
  121. });
  122. VOD.vod_play_url = playUrls.join('$$$');
  123. `,
  124. 搜索: '*',
  125. }