Anime1动畫.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. // 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
  2. // 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
  3. // 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
  4. // 3个set-Cookie
  5. var rule = {
  6. title:'Anime1动畫',
  7. host:'https://anime1.me',
  8. url: '/fyclass',
  9. detailUrl:'/?cat=fyid',
  10. searchUrl: '/page/fypage?s=**',
  11. searchable:2,
  12. quickSearch:0,
  13. headers:{'User-Agent': 'PC_UA'},
  14. timeout:5000,
  15. class_name:'連載中&2024&2023&2022&2021&2020&2019&2018&更早',
  16. class_url:'連載中&2024&2023&2022&2021&2020&2019&2018&2017',
  17. play_parse:true,
  18. lazy:`js:
  19. var apiurl = 'https://v.anime1.me/api';
  20. var html = request(apiurl, {
  21. headers: {
  22. 'Referer': HOST,
  23. },
  24. body: 'd=' + input,
  25. method: 'POST',
  26. withHeaders: true
  27. });
  28. let json = JSON.parse(html);
  29. print(json);
  30. log(Object.keys(json));
  31. let setCk = Object.keys(json).filter(it => it.toLowerCase() === "set-cookie");
  32. let cookie = setCk ? json[setCk] : "";
  33. // 3个set-Cookie
  34. if (Array.isArray(cookie)) {
  35. cookie = cookie.join(';');
  36. }
  37. cookie = cookie.split(';').filter(function(it) {
  38. return ['e', 'p', 'h'].includes(it.split('=')[0])
  39. }).join(';');
  40. log(cookie);
  41. var purl = JSON.parse(json.body).s[0].src;
  42. if (purl.startsWith('/')) {
  43. purl = 'https:' + purl
  44. }
  45. input = {
  46. jx: 0,
  47. url: purl,
  48. parse: 0,
  49. header: JSON.stringify({
  50. 'referer': HOST,
  51. 'Cookie': cookie,
  52. 'user-agent': PC_UA
  53. }),
  54. }
  55. `,
  56. limit:6,
  57. 推荐: `js:
  58. var d = [];
  59. function stripHtmlTag(src) {
  60. return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
  61. }
  62. var timestamp = new Date().getTime();
  63. var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
  64. var list = JSON.parse(json);
  65. let playKeys = Object.values(list).filter(function(x) {
  66. return x[2].includes('連載中');
  67. });
  68. playKeys.forEach(function(it) {
  69. d.push({
  70. title: stripHtmlTag(it[1]),
  71. img: 'https://sta.anicdn.com/playerImg/8.jpg',
  72. desc: it[2],
  73. url: it[0],
  74. });
  75. });
  76. setResult(d);
  77. `,
  78. 一级: `js:
  79. var d = [];
  80. function stripHtmlTag(src) {
  81. return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
  82. }
  83. var timestamp = new Date().getTime();
  84. var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
  85. var list = JSON.parse(json);
  86. let playKeys = Object.values(list).filter(function(x) {
  87. if (MY_CATE === '連載中') return x[2].includes(MY_CATE);
  88. else if (MY_CATE === '2017') return x[3] <= MY_CATE;
  89. else return x[3] == MY_CATE;
  90. });
  91. playKeys.forEach(function(it) {
  92. d.push({
  93. title: stripHtmlTag(it[1]),
  94. img: 'https://sta.anicdn.com/playerImg/8.jpg',
  95. desc: it[2],
  96. url: it[0],
  97. });
  98. });
  99. setResult(d);
  100. `,
  101. 二级: `js:
  102. pdfh = jsp.pdfh; pdfa = jsp.pdfa; pd = jsp.pd;
  103. var html = request(input);
  104. var timestamp = new Date().getTime();
  105. var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
  106. var list = JSON.parse(json);
  107. var vid = input.split('=')[1];
  108. let playKeys = Object.values(list).find(function(x) {
  109. return x[0] === parseInt(vid);
  110. });
  111. VOD = {
  112. vod_pic: 'https://sta.anicdn.com/playerImg/8.jpg',
  113. vod_id: playKeys[0],
  114. vod_name: playKeys[1],
  115. vod_content: playKeys[2],
  116. vod_year: playKeys[3],
  117. type_name: playKeys[4],
  118. vod_actor: playKeys[5],
  119. };
  120. var pageurl = pd(html, '.cat-links&&a&&href');
  121. var pagenum = 1;
  122. let vod_tab_list = [];
  123. let vlist = [];
  124. for (let p = 1; p < parseInt(pagenum) + 1; p++) {
  125. let phtml = request(pageurl + '/page/' + pagenum);
  126. let new_vod_list = [];
  127. let vodList = [];
  128. vodList = pdfa(phtml, '.site-main&&article');
  129. for (let i = 0; i < vodList.length; i++) {
  130. let it = vodList[i];
  131. let ptitle = pdfh(it, '.entry-title&&Text').replace(/\\[(.*)\\]/, '$1');
  132. let purl = pd(it, '.video-js&&data-apireq');
  133. new_vod_list.push(ptitle + '$' + purl);
  134. }
  135. vlist = vlist.concat(new_vod_list);
  136. try {
  137. pagenum = pd(phtml, '.nav-previous&&a&&href').split('/page/')[1];
  138. } catch(e) {}
  139. }
  140. let vlist2 = vlist.reverse().join("#");
  141. vod_tab_list.push(vlist2);
  142. VOD.vod_play_from = '道长在线';
  143. VOD.vod_play_url = vod_tab_list.join("$$$");
  144. `,
  145. 搜索: `js:
  146. var d = [];
  147. function stripHtmlTag(src) {
  148. return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
  149. }
  150. var timestamp = new Date().getTime();
  151. var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
  152. var list = JSON.parse(json);
  153. var wd = input.split('=')[1];
  154. let playKeys = Object.values(list).filter(function(x) {
  155. return x[1].includes(wd);
  156. });
  157. log(playKeys);
  158. playKeys.forEach(function(it) {
  159. d.push({
  160. title: stripHtmlTag(it[1]),
  161. img: 'https://sta.anicdn.com/playerImg/8.jpg',
  162. desc: it[2],
  163. url: it[0],
  164. });
  165. });
  166. setResult(d);
  167. `,
  168. }