梦米弹幕.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. globalThis.h_ost = 'http://op.ysdqjs.cn/';
  2. globalThis.vodlist = function($t, $pg) {
  3. const currentTimestamp = parseInt(Date.now() / 1000, 10);
  4. const url = h_ost + '/v2/home/type_search';
  5. const hx = CryptoJS.MD5('kj5649ertj84ks89r4jh8s45hf84hjfds04k' + currentTimestamp).toString();
  6. let html = request(url, {
  7. body: {
  8. sign: hx,
  9. type_id: $t,
  10. page: $pg,
  11. },
  12. headers: {
  13. 'User-Agent': 'okhttp-okgo/jeasonlzy',
  14. 'Content-Type': 'application/x-www-form-urlencoded'
  15. },
  16. 'method': 'POST'
  17. }, true);
  18. return JSON.parse(html).data.list;
  19. }
  20. globalThis.seach = function(wd) {
  21. const currentTimestamp = parseInt(Date.now() / 1000, 10);
  22. const url = h_ost + '/v2/home/search';
  23. const hx = CryptoJS.MD5('kj5649ertj84ks89r4jh8s45hf84hjfds04k' + currentTimestamp).toString();
  24. let html = request(url, {
  25. body: {
  26. sign: hx,
  27. keyword: wd,
  28. timestamp: currentTimestamp,
  29. },
  30. headers: {
  31. 'User-Agent': 'okhttp-okgo/jeasonlzy',
  32. 'Content-Type': 'application/x-www-form-urlencoded'
  33. },
  34. 'method': 'POST'
  35. }, true);
  36. return JSON.parse(html).data.list;
  37. }
  38. globalThis.vodids = function(ids) {
  39. const currentTimestamp = parseInt(Date.now() / 1000, 10);
  40. const url = h_ost + '/v2/home/vod_details';
  41. const hx = CryptoJS.MD5('kj5649ertj84ks89r4jh8s45hf84hjfds04k' + currentTimestamp).toString();
  42. let html = request(url, {
  43. body: {
  44. sign: hx,
  45. vod_id: ids,
  46. timestamp: currentTimestamp,
  47. },
  48. headers: {
  49. 'User-Agent': 'okhttp-okgo/jeasonlzy',
  50. 'Content-Type': 'application/x-www-form-urlencoded'
  51. },
  52. 'method': 'POST'
  53. }, true);
  54. const redata = JSON.parse(html);
  55. let vodPlayFrom = '';
  56. let vodPlayUrl = '';
  57. redata.data.vod_play_list.forEach((value, key) => {
  58. if (value.flag.includes("nby") || value.flag.includes("mgtv") || value.flag.includes("qq") || value.flag.includes("qiyi") || value.flag.includes("mgtv") || 1) {
  59. vodPlayFrom += `${value.flag}$$$`;
  60. value.urls.forEach(url => {
  61. vodPlayUrl += `${url.name}$${value.parse_urls[0]}${url.url}~${url.name}#`;
  62. });
  63. vodPlayUrl += '$$$';
  64. }
  65. });
  66. const regeshi = {
  67. vod_id: redata.data.vod_id,
  68. vod_name: redata.data.vod_name,
  69. vod_remarks: `${redata.data.vod_remarks}`,
  70. type_name: redata.data.vod_class,
  71. vod_pic: redata.data.vod_pic,
  72. vod_year: redata.data.vod_year,
  73. vod_area: redata.data.vod_area,
  74. vod_actor: `${redata.data.vod_actor}`,
  75. vod_director: redata.data.vod_director,
  76. vod_content: `${redata.data.vod_content}`,
  77. vod_play_from: vodPlayFrom,
  78. vod_play_url: vodPlayUrl
  79. };
  80. return regeshi;
  81. }
  82. globalThis.jxx = function(input) {
  83. if ("741852963" !== '741852963') {
  84. return 'https://s0.mall.tcl.com/group1/M00/00/89/CvoGBGdcOPaAAUxvADwZniVV2bc476.mp4';
  85. }
  86. const parts = input.split('~');
  87. try {
  88. let response = fetch(parts[0], {
  89. method: 'get',
  90. headers: {
  91. 'User-Agent': 'okhttp/3.14.9',
  92. 'Content-Type': 'application/x-www-form-urlencoded'
  93. }
  94. });
  95. if (response.includes("成功") || response.includes("success") || response.includes("nby")) {
  96. let bata = JSON.parse(response);
  97. input = {
  98. parse: 0,
  99. url: bata.url,
  100. jx: 0,
  101. danmaku: 'http://43.242.202.175:9595/nnjsdm.php?key=789456123&id=' + '&jm=' + VOD.vod_name + '&js=' + parts[1] + '&key=741852963'
  102. }
  103. } else {
  104. input = {
  105. parse: 0,
  106. url: parts[0].includes('url=') ? parts[0].slice(parts[0].indexOf('url=') + 4) : null,
  107. jx: 1,
  108. danmaku: 'http://43.242.202.175:9595/nnjsdm.php?key=789456123&id=' + '&jm=' + VOD.vod_name + '&js=' + parts[1] + '&key=741852963'
  109. }
  110. }
  111. } catch {
  112. input = {
  113. parse: 0,
  114. url: '解析失败',
  115. jx: 0,
  116. }
  117. }
  118. return input;
  119. }
  120. var rule = {
  121. title: '天天',
  122. host: '',
  123. detailUrl: 'fyid',
  124. searchUrl: '**',
  125. url: 'fyclass',
  126. searchable: 2,
  127. quickSearch: 1,
  128. filterable: 0,
  129. class_name: '电影&电视剧&综艺&动漫',
  130. class_url: '1&2&4&3',
  131. play_parse: true,
  132. lazy: $js.toString(() => {
  133. input = jxx(input);
  134. }),
  135. 推荐: $js.toString(() => {
  136. let bdata = vodlist(1, 1);
  137. console.log(bdata);
  138. bdata.forEach(it => {
  139. d.push({
  140. url: it.vod_id,
  141. title: it.vod_name,
  142. img: it.vod_pic,
  143. desc: it.vod_remarks
  144. });
  145. });
  146. setResult(d);
  147. }),
  148. 一级: $js.toString(() => {
  149. let bdata = vodlist(input, MY_PAGE);
  150. console.log(bdata);
  151. bdata.forEach(it => {
  152. d.push({
  153. url: it.vod_id,
  154. title: it.vod_name,
  155. img: it.vod_pic,
  156. desc: it.vod_remarks
  157. });
  158. });
  159. setResult(d);
  160. }),
  161. 二级: $js.toString(() => {
  162. console.log("调试信息2" + input);
  163. let data = vodids(input);
  164. //console.log(data);
  165. VOD = (data);
  166. }),
  167. 搜索: $js.toString(() => {
  168. let ddata = seach(input);
  169. ddata.forEach(it => {
  170. d.push({
  171. url: it.vod_id,
  172. title: it.vod_name,
  173. img: it.vod_pic,
  174. desc: it.vod_remarks
  175. });
  176. });
  177. setResult(d);
  178. }),
  179. }