萍果.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. globalThis.h_ost = 'http://tipu.xjqxz.top/';
  2. globalThis.playh_ost = 'http://194.147.100.39/m3u8/';
  3. globalThis.vodlist = function(t, pg) {
  4. let time = Date.now();
  5. const options = {
  6. method: 'GET',
  7. headers: {
  8. 'User-Agent': 'okhttp/3.12.11',
  9. 'user_id': 'XPGBOX',
  10. 'version': 'XPGBOX com.phoenix.tv1.3.3',
  11. 'hash': '37c6',
  12. 'screenx': '2331'
  13. }
  14. };
  15. let html = fetch(h_ost + 'api.php/v2.vod/androidfilter?page=' + pg + '&type=' + t, options);
  16. return JSON.parse(html);
  17. }
  18. globalThis.vodids = function(ids) {
  19. const options = {
  20. method: 'GET',
  21. headers: {
  22. 'User-Agent': 'okhttp/3.12.11',
  23. 'user_id': 'XPGBOX',
  24. 'version': 'XPGBOX com.phoenix.tv1.3.3',
  25. 'hash': '37c6',
  26. 'screenx': '2331'
  27. }
  28. };
  29. let html = fetch(h_ost + 'api.php/v3.vod/androiddetail2?vod_id=' + ids, options)
  30. let bata = JSON.parse(html);
  31. let rdata = bata.data;
  32. // 创建 data 对象并初始化
  33. let data = {
  34. vod_id: ids,
  35. vod_name: rdata.name,
  36. vod_remarks: '已更新-'+ rdata.updateInfo,
  37. vod_actor: rdata.actor,
  38. vod_director: rdata.director,
  39. vod_content: rdata.content,
  40. vod_play_from: 'HD',
  41. vod_play_url: ''
  42. };
  43. //return data;
  44. // 遍历 vod_play_list 数组
  45. rdata.urls.forEach((value) => {
  46. data.vod_play_url += value.key + "$" + playh_ost + value.url + '~' + rdata.name + '~' +
  47. value.key + "#";
  48. //data.vod_play_url += '$$$';
  49. });
  50. return data;
  51. }
  52. //console.log(vodids(123120));
  53. globalThis.svodlist = function(wd) {
  54. const options = {
  55. method: 'GET',
  56. headers: {
  57. 'User-Agent': 'okhttp/3.12.11',
  58. 'user_id': 'XPGBOX',
  59. 'version': 'XPGBOX com.phoenix.tv1.3.3',
  60. 'hash': '37c6',
  61. 'screenx': '2331'
  62. }
  63. };
  64. let html = fetch(h_ost + 'api.php/v2.vod/androidsearch10086?page=1&wd=' + wd, options)
  65. return JSON.parse(html);
  66. }
  67. globalThis.jxx = function(url) {
  68. if ("741852963" == '741852963') {
  69. return url;
  70. } else {
  71. return 'https://mp4.ziyuan.wang/view.php/3c120366111dde9c318be64962b5684f.mp4';
  72. }
  73. }
  74. var rule = {
  75. title: '苹果',
  76. host: '',
  77. detailUrl: 'fyid',
  78. searchUrl: '**',
  79. url: 'fyclass',
  80. searchable: 2,
  81. quickSearch: 1,
  82. filterable: 0,
  83. headers: {
  84. 'User-Agent': 'okhttp/3.12.11'
  85. },
  86. class_name: '电影&电视剧&综艺&动漫',
  87. class_url: '1&2&3&4',
  88. play_parse: 1,
  89. proxy_rule: $js.toString(() => {
  90. const options = {
  91. method: 'GET',
  92. headers: {
  93. 'User-Agent': 'okhttp/3.12.11',
  94. 'Connection': 'Keep-Alive',
  95. //'Accept-Encoding': 'br,gzip',
  96. 'Accept-Language': 'zh-CN,zh;q=0.8',
  97. 'user_id': 'XPGBOX',
  98. 'token2': 'XFxIummRrngadHB4TCzeUaleebTX10Vl/ftCvGLPeI5tN2Y/liZ5tY5e4t8=',
  99. 'version': 'XPGBOX com.phoenix.tv1.3.3',
  100. 'hash': '0d51',
  101. 'screenx': '2331',
  102. 'token': 'SH4EsXSBhi1ybXp3XQypB5lsfLfbzSpim+hOlmv7IIZ9Kkwoykkh1Y0r9dAKGx/0Smx2VqjAKdYKQuImbjN/Vuc2GWY/wnqwKk1McYhZES5fuT4fGlR0n2ii1nKqbBk8ketLdT0CXrXr8kcZVTdW77fUVG8S5jaTrSrsN/HnCiT4XT1GEkdnV0pqcr5wQL7NV2HHkG/e',
  103. 'timestamp': '1731848468',
  104. 'screeny': '1121'
  105. }
  106. };
  107. let html = fetch(input.url + '.m3u8', options)
  108. const parts = input.url.split('m3u8');
  109. const linesArray = html.split('\n');
  110. for (let i = 3; i < linesArray.length; i++) {
  111. try {
  112. if (linesArray[i].includes('key')) {
  113. linesArray[i] = linesArray[i].replace("/m3u8key", parts[0]+"m3u8key");
  114. }
  115. } catch {}
  116. }
  117. // console.log(html);
  118. const restoredStr = linesArray.join('\n');
  119. input = [200, 'application/vnd.apple.mpegurl', restoredStr];
  120. }),
  121. lazy: $js.toString(() => {
  122. console.log(input)
  123. const parts = input.split('~');
  124. input = {
  125. parse: 0,
  126. url: getProxyUrl() + '&url=' + jxx(parts[0]),
  127. jx: 0,
  128. danmaku: 'http://43.242.202.175:9595/nnjsdm.php?key=741852963&id=' + '&jm=' + parts[1] + '&js=' + parts[2] + '&key=741852963'
  129. };
  130. }),
  131. 推荐: $js.toString(() => {
  132. let bdata = vodlist(1, 1);
  133. console.log(bdata);
  134. let bata = bdata.data;
  135. bata.forEach(it => {
  136. d.push({
  137. url: it.id,
  138. title: it.name,
  139. img: it.pic,
  140. desc: it.updateInfo
  141. });
  142. });
  143. setResult(d);
  144. }),
  145. 一级: $js.toString(() => {
  146. let bdata = vodlist(input, MY_PAGE);
  147. console.log(bdata);
  148. let bata = bdata.data;
  149. bata.forEach(it => {
  150. d.push({
  151. url: it.id,
  152. title: it.name,
  153. img: it.pic,
  154. desc: it.updateInfo
  155. });
  156. });
  157. setResult(d);
  158. }),
  159. 二级: $js.toString(() => {
  160. console.log("调试信息2" + input);
  161. let data = vodids(input);
  162. //console.log(data);
  163. VOD = data;
  164. }),
  165. 搜索: $js.toString(() => {
  166. let ddata = svodlist(input);
  167. console.log(ddata);
  168. let bata = ddata.data;
  169. bata.forEach(it => {
  170. if(!it.name.includes('金瓶梅')){
  171. d.push({
  172. url: it.id,
  173. title: it.name,
  174. img: it.pic,
  175. desc: it.updateInfo
  176. });}
  177. });
  178. setResult(d);
  179. }),
  180. }