悠悠弹幕.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. globalThis.h_ost = 'http://124.223.11.25:11024/';
  2. var key = CryptoJS.enc.Base64.parse("NjYyYjIxYWZlM2Y2YWRmMw==");
  3. var iv = CryptoJS.enc.Base64.parse("NjYyYjIxYWZlM2Y2YWRmMw==");
  4. globalThis.AES_Decrypt = function(word) {
  5. try {
  6. var decrypt = CryptoJS.AES.decrypt(word, key, {
  7. iv: iv,
  8. mode: CryptoJS.mode.CBC,
  9. padding: CryptoJS.pad.Pkcs7,
  10. });
  11. const decryptedText = decrypt.toString(CryptoJS.enc.Utf8);
  12. if (!decryptedText) {
  13. throw new Error("解密后的内容为空");
  14. }
  15. return decryptedText;
  16. } catch (e) {
  17. console.error("解密失败:", e);
  18. return null;
  19. }
  20. };
  21. globalThis.AES_Encrypt = function(word) {
  22. var encrypted = CryptoJS.AES.encrypt(word, key, {
  23. iv: iv,
  24. mode: CryptoJS.mode.CBC,
  25. padding: CryptoJS.pad.Pkcs7
  26. });
  27. return encrypted.toString();
  28. };
  29. globalThis.vod1 = function(t, pg) {
  30. let html1 = request(h_ost + 'api.php/getappapi.index/typeFilterVodList', {
  31. body: {
  32. area: '全部',
  33. year: '全部',
  34. type_id: t,
  35. page: pg,
  36. sort: '最新',
  37. lang: '全部',
  38. class: '全部'
  39. },
  40. headers: {
  41. 'User-Agent': 'okhttp/3.14.9',
  42. 'Content-Type': 'application/x-www-form-urlencoded'
  43. },
  44. 'method': 'POST'
  45. }, true);
  46. let html = JSON.parse(html1);
  47. return (AES_Decrypt(html.data));
  48. }
  49. globalThis.vodids = function(ids) {
  50. let html1 = fetch(h_ost + 'api.php/getappapi.index/vodDetail', {
  51. method: 'POST',
  52. headers: {
  53. 'User-Agent': 'okhttp/3.14.9',
  54. 'Content-Type': 'application/x-www-form-urlencoded'
  55. },
  56. body: {
  57. vod_id: ids,
  58. }
  59. });
  60. let html = JSON.parse(html1);
  61. const rdata = JSON.parse(AES_Decrypt(html.data));
  62. const data = {
  63. vod_id: ids,
  64. vod_name: rdata.vod.vod_name,
  65. vod_remarks: rdata.vod.vod_remarks,
  66. vod_actor: rdata.vod.vod_actor,
  67. vod_director: rdata.vod.vod_director,
  68. vod_content: rdata.vod.vod_content,
  69. vod_play_from: '',
  70. vod_play_url: ''
  71. };
  72. rdata.vod_play_list.forEach((value) => {
  73. data.vod_play_from += value.player_info.show + '$$$';
  74. value.urls.forEach((v) => {
  75. data.vod_play_url += v.name + '$' + value.player_info.parse + '|' + v.url + '#';
  76. });
  77. data.vod_play_url += '$$$';
  78. });
  79. return data;
  80. }
  81. //搜索
  82. globalThis.ssvod = function(wd) {
  83. var html1 = fetch(h_ost + 'api.php/getappapi.index/searchList', {
  84. method: 'POST',
  85. headers: {
  86. 'User-Agent': 'okhttp/3.14.9',
  87. 'Content-Type': 'application/x-www-form-urlencoded'
  88. },
  89. body: {
  90. keywords: wd,
  91. typepage_id: 1,
  92. }
  93. });
  94. let html = JSON.parse(html1);
  95. return AES_Decrypt(html.data);
  96. }
  97. //解析
  98. globalThis.jxx = function(id, url) {
  99. /* if(""!=='104847347'){
  100. return 'https://mp4.ziyuan.wang/view.php/3c120366111dde9c318be64962b5684f.mp4';
  101. }*/
  102. if (id.startsWith('http')) {
  103. let purl = JSON.parse(request(id + url)).url;
  104. return {
  105. parse: 0,
  106. url: purl,
  107. jx: 0,
  108. danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
  109. };
  110. }
  111. if (id == 0) {
  112. return {
  113. parse: 0,
  114. url: id + url,
  115. jx: 1,
  116. danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
  117. };
  118. }
  119. let html1 = request(h_ost + 'api.php/getappapi.index/vodParse', {
  120. method: 'POST',
  121. headers: {
  122. 'User-Agent': 'okhttp/3.14.9',
  123. 'Content-Type': 'application/x-www-form-urlencoded'
  124. },
  125. body: {
  126. parse_api: id,
  127. url: AES_Encrypt(url),
  128. }
  129. });
  130. let html = AES_Decrypt(JSON.parse(html1).data);
  131. console.log(html);
  132. let decry = html.replace(/\n/g, '').replace(/\\/g, '');
  133. let matches = decry.match(/"url":"([^"]+)"/);
  134. if (!matches || matches[1] === null) {
  135. matches = decry.match(/"url": "([^"]+)"/);
  136. }
  137. return {
  138. parse: 0,
  139. url: matches[1],
  140. jx: 0,
  141. danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
  142. };
  143. }
  144. var rule = {
  145. title: '小虎斑|悠悠',
  146. host: '',
  147. detailUrl: 'fyid',
  148. searchUrl: '**',
  149. url: 'fyclass',
  150. searchable: 2,
  151. quickSearch: 1,
  152. filterable: 0,
  153. class_name: '电影&电视剧&综艺&动漫',
  154. class_url: '1&2&3&4',
  155. play_parse: true,
  156. lazy: $js.toString(() => {
  157. const parts = input.split('|');
  158. input = jxx(parts[0], parts[1]);
  159. }),
  160. 推荐: $js.toString(() => {
  161. let data = vod1(0, 0);
  162. let bata = JSON.parse(data).recommend_list;
  163. bata.forEach(it => {
  164. d.push({
  165. url: it.vod_id,
  166. title: it.vod_name,
  167. img: it.vod_pic,
  168. desc: it.vod_remarks
  169. });
  170. });
  171. setResult(d);
  172. }),
  173. 一级: $js.toString(() => {
  174. let data = vod1(input, MY_PAGE);
  175. let bata = JSON.parse(data).recommend_list;
  176. bata.forEach(it => {
  177. d.push({
  178. url: it.vod_id,
  179. title: it.vod_name,
  180. img: it.vod_pic,
  181. desc: it.vod_remarks
  182. });
  183. });
  184. setResult(d);
  185. }),
  186. 二级: $js.toString(() => {
  187. console.log("调试信息2" + input);
  188. let data = vodids(input);
  189. //console.log(data);
  190. VOD = data;
  191. }),
  192. 搜索: $js.toString(() => {
  193. let data = ssvod(input);
  194. let bata = JSON.parse(data).search_list;
  195. bata.forEach(it => {
  196. d.push({
  197. url: it.vod_id,
  198. title: it.vod_name,
  199. img: it.vod_pic,
  200. desc: it.vod_remarks
  201. });
  202. });
  203. // console.log(data);
  204. setResult(d);
  205. }),
  206. }