喵次元.js 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. globalThis.getTime = function(){
  2. let ts= Math.round(new Date().getTime()/1000).toString();
  3. log('获取时间戳:'+ts);
  4. return ts
  5. }
  6. globalThis.signUrl=function(json){
  7. // 获取所有节点的名称并按字母顺序排序
  8. let json1=JSON.parse(json);
  9. var sortedKeys = Object.keys(json1).sort();
  10. // 遍历排好序的节点名称列表,并打印相应的值
  11. let s='';
  12. for (let key in sortedKeys){
  13. let value=json1[sortedKeys[key]];
  14. if(value!=undefined){
  15. s=s+value;
  16. }
  17. }
  18. //log(s);
  19. //log(md5(s+"alskeuscli"));
  20. s=json.slice(0,-1)+",\"sign\":\""+md5(s+"alskeuscli")+"\"\}";
  21. log(s);
  22. return s;
  23. }
  24. globalThis.posturl=function(url,json){
  25. let html= fetch(url, {
  26. body: JSON.parse(signUrl(json)),
  27. headers: {"User-Agent": "okhttp/3.12.3"},
  28. method: "POST"
  29. }, true);
  30. return JSON.parse(html);
  31. }
  32. var rule = {
  33. title: '喵次元[APP]',
  34. host: 'https://cym.zhui.la/api.php',
  35. hostJs:`
  36. var json2 = '{"versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","versionCode":"35","ctime":"'+getTime()+'"}';
  37. let url="https://cym.zhui.la/api.php/type/get_list";
  38. let jo=posturl(url,json2).data.list;
  39. let filters = {};
  40. let cb={"class":"类型","area":"地区","lang":"语言","year":"年份","star":"演员","director":"导演","state":"状态","version":"版本"};
  41. let class1=[];
  42. jo.forEach(function(tp) {
  43. rule.class_name=rule.class_name +"&"+tp['type_name'];
  44. rule.class_url=rule.class_url +"&"+tp['type_id'];
  45. let ep=tp['type_extend'];
  46. let classes = [];
  47. for (let key in ep){
  48. let value=ep[key];
  49. if (value.length>1){
  50. class1.append(key);
  51. //写成{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"}]}这种格式
  52. let dd=value.toString().split(',');
  53. var s=[];
  54. dd.forEach(function(i){
  55. s.append({'n':i,'v':i});
  56. })
  57. let ss={"key":key,"name":cb[key],"value":s};
  58. classes.append(ss);
  59. }
  60. }
  61. filters[tp['type_id']]=classes;
  62. });
  63. class1=Array.from(new Set(class1)).sort();
  64. let s=""
  65. class1.forEach(function(tp) {
  66. s=s+"&" + tp +"={{fl."+tp+"}}";
  67. })
  68. log(s);
  69. rule.filter_url=s;
  70. rule.filter=filters;
  71. log(rule.filter);
  72. log(rule.class_name);
  73. log(rule.class_url);
  74. `,
  75. homeUrl:'?hpindigo=**&page=fypage',
  76. url:'?t=fyclass&page=fypage',
  77. filter_url:'',
  78. filter: {},
  79. detailUrl:'?ids=',
  80. searchUrl: '?hpindigo=**&page=fypage',
  81. searchable: 2,
  82. quickSearch: 0,
  83. filterable:1,//是否启用分类筛选,
  84. headers:{'User-Agent':'MOBILE_UA'},
  85. timeout:10000,
  86. class_name:'全部', // 分类筛选 /api.php/app/nav
  87. class_url:'0',
  88. play_parse:true,
  89. lazy:`js:
  90. log("*************测试*************");
  91. let dd=input.split("&");
  92. let ju_id=dd[0];
  93. let plyer=dd[1];
  94. let video_id=dd[2];
  95. var json2 = '{"player_id":"'+plyer+'","ju_id":"'+ju_id+'","vod_id":"'+video_id+'","versionName":"5.6.9","uuid":"3899af59c0b12b98","version":"4835d0a2","versionCode":"35","ctime":"'+getTime()+'"}';
  96. let url="https://cym.zhui.la/api.php/video/get_definition";
  97. let html = posturl(url,json2).data[0].url.trim();
  98. log(html);
  99. //input=aesX("AES/CBC/PKCS7",false,html,true,"sLunqcoH85Nm/jDmFKns7A==","fedcba9876543210",false);
  100. //log(input);
  101. eval(getCryptoJS);
  102. var key = CryptoJS.enc.Hex.parse("734C756E71636F4838354E6D2F6A446D464B6E7337413D3D0000000000000000");
  103. var iv = CryptoJS.enc.Utf8.parse("fedcba9876543210");
  104. input=(CryptoJS.AES.decrypt(html, key, {
  105. iv: iv,
  106. mode: CryptoJS.mode.CBC,
  107. padding: CryptoJS.pad.Pkcs7
  108. })).toString(CryptoJS.enc.Utf8)
  109. log(input)
  110. `,
  111. //lazy:'js:input=/m3u8|mp4|flv/.test(input)?{jx:0,url:input,parse:0}:{jx:1,url:input,parse:1}',
  112. limit:6,
  113. // 推荐:'json:items;*;*;*;*',
  114. 推荐:'json:data.sections[0].items;*;*;*;*',
  115. 推荐:`js:
  116. log(input);
  117. let page=input.split("&")[1].split("=")[1];
  118. log(page);
  119. var json2 = '{"page":"'+page+'","versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","versionCode":"35","ctime":"'+getTime()+'"}';
  120. let url="https://cym.zhui.la/api.php/video/index";
  121. let jo = posturl(url,json2);
  122. let vodList = jo.data;
  123. log(vodList);
  124. let videos=[];
  125. vodList.forEach(function(vod) {
  126. vod.video.forEach(function(vod1) {
  127. let aid = (vod1["vod_id"]);
  128. let title = vod1["vod_name"];
  129. let img = vod1["vod_pic"];
  130. let remark = vod1["vod_remarks"];
  131. videos.push({
  132. vod_id: aid,
  133. vod_name: title,
  134. vod_pic: img,
  135. vod_remarks: remark
  136. })
  137. })
  138. })
  139. VODS=videos;
  140. `,
  141. 一级:`js:
  142. log(input);
  143. let canshu=input.split("?")[1].split("&");
  144. let dd={};
  145. canshu.forEach(function(key){
  146. log(key);
  147. let k=key.split("=");
  148. dd[k[0]]=k[1];
  149. })
  150. var json2 = '{"type_id":"'+dd["t"]+'","vod_year":"'+dd["year"]+'","limit":"20","orderby":"","vod_area":"'+dd["area"]+'","vod_class":"'+dd["class"]+'","page":"'+dd["page"]+'","versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","vod_name":"","versionCode":"35","ctime":"'+getTime()+'"}';
  151. log(json2);
  152. let url="https://cym.zhui.la/api.php/video/get_list";
  153. let jo = posturl(url,json2);
  154. var d=[];
  155. jo.data.list.forEach(function(it){
  156. d.push({
  157. title:it.vod_name,
  158. img:it.vod_pic,
  159. desc:it.vod_remarks,
  160. url:it.vod_id,
  161. content:it.vod_blurb})
  162. });
  163. setResult(d);
  164. `,
  165. 二级:`js:
  166. log(orId);
  167. var json2 = '{"vod_id":"'+orId+'","versionName":"5.6.9","uuid":"3899af59c0b12b98","version":"4835d0a2","versionCode":"35","ctime":"'+getTime()+'"}';
  168. log(json2);
  169. let url="https://cym.zhui.la/api.php/video/get_detail";
  170. let jo = posturl(url,json2);
  171. let node = jo.data;
  172. VOD = {
  173. vod_id: node["vod_id"],
  174. vod_name: node["vod_name"],
  175. vod_pic: node["vod_pic"],
  176. type_name: node["vod_class"],
  177. vod_year: node["vod_year"],
  178. vod_area: node["vod_area"],
  179. vod_remarks: node["vod_remarks"],
  180. vod_actor: node["vod_actor"],
  181. vod_director: node["vod_director"],
  182. vod_content: node["vod_content"]
  183. };
  184. let episodes = node.player;
  185. let playMap = {};
  186. episodes.forEach(function(ep) {
  187. let playurls = ep["code"];
  188. let source = ep["name"];
  189. log (playurls);
  190. log (source);
  191. //这里分别获取线路
  192. var json2 = '{"limit":"5000","vod_id":"'+orId+'","page":"1","versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","versionCode":"35","player":"'+playurls+'","ctime":"'+getTime()+'"}';
  193. log(json2);
  194. let url="https://cym.zhui.la/api.php/video/get_player";
  195. let jo1 = posturl(url,json2);
  196. jo1.data.list.forEach(function(playurl) {
  197. if (!playMap.hasOwnProperty(source)) {
  198. playMap[source] = []
  199. }
  200. playMap[source].append(playurl["drama"]+"$"+playurl["ju_id"]+"&"+playurl["plyer"]+"&"+playurl["video_id"])
  201. })
  202. });
  203. let playFrom = [];
  204. let playList = [];
  205. Object.keys(playMap)
  206. .forEach(function(key) {
  207. playFrom.append(key);
  208. playList.append(playMap[key].join("#"))
  209. });
  210. let vod_play_from = playFrom.join("$$$");
  211. let vod_play_url = playList.join("$$$");
  212. VOD["vod_play_from"] = vod_play_from;
  213. VOD["vod_play_url"] = vod_play_url
  214. `,
  215. 搜索:`js:
  216. let page=input.split("&")[1].split("=")[1];
  217. log(page);
  218. var json2 = '{"vod_year":"","limit":"20","orderby":"up","vod_area":"","vod_class":"","page":"'+page+'","versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","vod_name":"'+KEY+'","versionCode":"35","ctime":"'+getTime()+'"}';
  219. let url="https://cym.zhui.la/api.php/video/get_list";
  220. let jo = posturl(url,json2);
  221. var d=[];
  222. jo.data.list.forEach(function(it){
  223. d.push({
  224. title:it.vod_name,
  225. img:it.vod_pic,
  226. desc:it.vod_remarks,
  227. url:it.vod_id})
  228. });
  229. setResult(d);`,
  230. }