赞赞影视.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. var rule = {
  2. title: 'zanzan', // csp_AppYsV2
  3. host: 'http://154.12.21.186:119/api.php/app/',
  4. url: 'video?tid=fyclassfyfilter&limit=20&pg=fypage',
  5. filter_url:'&class={{fl.class}}&area={{fl.area}}&lang={{fl.lang}}&letter={{fl.letter}}&year={{fl.year}}&by={{fl.by}}',
  6. filter:{
  7. "1":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"恐怖","v":"恐怖"},{"n":"动作","v":"动作"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"战争","v":"战争"},{"n":"警匪","v":"警匪"},{"n":"犯罪","v":"犯罪"},{"n":"动画","v":"动画"},{"n":"奇幻","v":"奇幻"},{"n":"武侠","v":"武侠"},{"n":"冒险","v":"冒险"},{"n":"枪战","v":"枪战"},{"n":"恐怖","v":"恐怖"},{"n":"悬疑","v":"悬疑"},{"n":"惊悚","v":"惊悚"},{"n":"经典","v":"经典"},{"n":"青春","v":"青春"},{"n":"文艺","v":"文艺"},{"n":"微电影","v":"微电影"},{"n":"古装","v":"古装"},{"n":"历史","v":"历史"},{"n":"运动","v":"运动"},{"n":"农村","v":"农村"},{"n":"儿童","v":"儿童"},{"n":"网络电影","v":"网络电影"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"美国","v":"美国"},{"n":"法国","v":"法国"},{"n":"英国","v":"英国"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"德国","v":"德国"},{"n":"泰国","v":"泰国"},{"n":"印度","v":"印度"},{"n":"意大利","v":"意大利"},{"n":"西班牙","v":"西班牙"},{"n":"加拿大","v":"加拿大"},{"n":"其他","v":"其他"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"法语","v":"法语"},{"n":"德语","v":"德语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]}],
  8. "2":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"古装","v":"古装"},{"n":"战争","v":"战争"},{"n":"青春偶像","v":"青春偶像"},{"n":"喜剧","v":"喜剧"},{"n":"家庭","v":"家庭"},{"n":"犯罪","v":"犯罪"},{"n":"动作","v":"动作"},{"n":"奇幻","v":"奇幻"},{"n":"剧情","v":"剧情"},{"n":"历史","v":"历史"},{"n":"经典","v":"经典"},{"n":"乡村","v":"乡村"},{"n":"情景","v":"情景"},{"n":"商战","v":"商战"},{"n":"网剧","v":"网剧"},{"n":"其他","v":"其他"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"内地","v":"内地"},{"n":"韩国","v":"韩国"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"},{"n":"其他","v":"其他"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]}],
  9. "3":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"选秀","v":"选秀"},{"n":"情感","v":"情感"},{"n":"访谈","v":"访谈"},{"n":"播报","v":"播报"},{"n":"旅游","v":"旅游"},{"n":"音乐","v":"音乐"},{"n":"美食","v":"美食"},{"n":"纪实","v":"纪实"},{"n":"曲艺","v":"曲艺"},{"n":"生活","v":"生活"},{"n":"游戏互动","v":"游戏互动"},{"n":"财经","v":"财经"},{"n":"求职","v":"求职"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"内地","v":"内地"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]}],
  10. "4":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"情感","v":"情感"},{"n":"科幻","v":"科幻"},{"n":"热血","v":"热血"},{"n":"推理","v":"推理"},{"n":"搞笑","v":"搞笑"},{"n":"冒险","v":"冒险"},{"n":"萝莉","v":"萝莉"},{"n":"校园","v":"校园"},{"n":"动作","v":"动作"},{"n":"机战","v":"机战"},{"n":"运动","v":"运动"},{"n":"战争","v":"战争"},{"n":"少年","v":"少年"},{"n":"少女","v":"少女"},{"n":"社会","v":"社会"},{"n":"原创","v":"原创"},{"n":"亲子","v":"亲子"},{"n":"益智","v":"益智"},{"n":"励志","v":"励志"},{"n":"其他","v":"其他"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"国产","v":"国产"},{"n":"日本","v":"日本"},{"n":"欧美","v":"欧美"},{"n":"其他","v":"其他"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]}]
  11. },
  12. detailUrl:'/detail?vod_id=fyid',
  13. searchUrl: '/search?text=**&pg=fypage',
  14. searchable: 2,
  15. quickSearch: 0,
  16. filterable:1,//是否启用分类筛选,
  17. headers:{'User-Agent':'okhttp/4.1.0'},
  18. timeout:5000,
  19. // 分类筛选 /api.php/app/nav || /xgapp.php/v1/nav || /api.php/v1.vod/types
  20. class_name:'电影&连续剧&综艺&动漫',
  21. class_url:'1&2&3&4',
  22. play_parse: true,
  23. lazy:'js:if(/m3u8|mp4/.test(input)){input}else{let purl=request("http://zn.ghlyys.com/znjsonapi.php.php?url="+input);input={jx:0,url:JSON.parse(purl).url,parse:0}}',
  24. limit:6,
  25. // 图片来源:'@Referer=https://api.douban.com/@User-Agent=Mozilla/5.0%20(Windows%20NT%2010.0;%20Win64;%20x64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/113.0.0.0%20Safari/537.36',
  26. 推荐:`js:
  27. let d = [];
  28. let jsondata = [];
  29. let videoList = [];
  30. if (/v1\\.vod/.test(HOST)) {
  31. if(HOST.endsWith('/')){
  32. jsondata = JSON.parse(request(HOST + 'vodPhbAll'));
  33. } else {
  34. jsondata = JSON.parse(request(HOST + '/vodPhbAll'));
  35. }
  36. videoList = jsondata.data.list;
  37. } else {
  38. if(HOST.endsWith('/')){
  39. jsondata = JSON.parse(request(HOST + 'index_video'));
  40. } else {
  41. jsondata = JSON.parse(request(HOST + '/index_video'));
  42. }
  43. videoList = /xgapp/.test(HOST) ? jsondata.data : jsondata.list;
  44. }
  45. // log('videoList =========> '+stringify(videoList));
  46. videoList.forEach((it,idex) => {
  47. let vlist = /v1\\.vod/.test(HOST) ? videoList[idex].vod_list : videoList[idex].vlist ;
  48. vlist.forEach(it => {
  49. d.push({
  50. url:it.vod_id,
  51. title:it.vod_name,
  52. img:it.vod_pic.startsWith('http') ? it.vod_pic : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  53. desc:it.vod_remarks,
  54. });
  55. });
  56. });
  57. setResult(d);
  58. `,
  59. 一级:`js:
  60. let d = [];
  61. let jsondata = [];
  62. let videoList = [];
  63. if (/v1\\.vod/.test(HOST)) {
  64. input = input.replace('video','v1.vod').replace('tid','type').replace('pg=','page=');
  65. jsondata = JSON.parse(request(input));
  66. videoList = jsondata.data.list;
  67. } else {
  68. input = HOST + '/'+ input.split('/')[4];
  69. jsondata = JSON.parse(request(input));
  70. videoList = jsondata.list || jsondata.data;
  71. }
  72. // log('videoList =========> '+stringify(videoList));
  73. videoList.forEach(it => {
  74. d.push({
  75. url:it.vod_id,
  76. title:it.vod_name,
  77. img:it.vod_pic.startsWith('http') ? it.vod_pic : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  78. desc:it.vod_remarks,
  79. });
  80. });
  81. setResult(d);
  82. `,
  83. 二级:`js:
  84. if (/v1\\.vod/.test(HOST)) {
  85. input = HOST + '/'+ input.split('/')[3];
  86. } else {
  87. input = HOST + '/'+ input.split('/')[3].replace('detail','video_detail').replace('vod_id','id');
  88. }
  89. try {
  90. let html = request(input);
  91. html = JSON.parse(html);
  92. let node = /xgapp/.test(HOST) ? html.data.vod_info : html.data;
  93. VOD = {
  94. vod_id: node.vod_id,
  95. vod_name: node.vod_name,
  96. vod_pic: node.vod_pic,
  97. type_name: node.vod_class,
  98. vod_year: node.vod_year,
  99. vod_area: node.vod_area,
  100. vod_remarks: node.vod_remarks,
  101. vod_actor: node.vod_actor,
  102. vod_director: node.vod_director,
  103. vod_content: node.vod_content.strip()
  104. };
  105. if (typeof play_url === 'undefined') {
  106. var play_url = ''
  107. }
  108. let episodes = /v1\\.vod/.test(HOST)?node.vod_play_list:node.vod_url_with_player;
  109. if (episodes != '') {
  110. let playMap = {};
  111. episodes.forEach(ep => {
  112. let from = [];
  113. if (/v1\\.vod/.test(HOST)) {
  114. from = ep.player_info.from||ep.player_info.show||ep.from||ep.show;
  115. } else {
  116. from = ep.code||ep.name;
  117. }
  118. if (!playMap.hasOwnProperty(from)) {
  119. playMap[from] = []
  120. }
  121. let parse_api = '';
  122. if (/v1\\.vod/.test(HOST)) {
  123. parse_api = ep.player_info.parse != null ? ep.player_info.parse : ep.player_info.parse2;
  124. // parse_api = /,/.test(parse_api) ? parse_api.split(',')[1] : parse_api;
  125. } else {
  126. parse_api = ep.parse_api;
  127. }
  128. log('parse_api =========> '+parse_api);
  129. if (parse_api != null && !/\\.m3u8|\\.mp4/.test(ep.url)) {
  130. parse_api = parse_api.replaceAll('..','.') ;
  131. ep.url = ep.url.replaceAll('$','$'+parse_api);
  132. }
  133. playMap[from].push(ep.url)
  134. });
  135. let playFrom = [];
  136. let playList = [];
  137. Object.keys(playMap).forEach(key => {
  138. playFrom.push(key);
  139. playList.push(playMap[key])
  140. });
  141. VOD.vod_play_from = playFrom.join('$$$');
  142. VOD.vod_play_url = playList.join('$$$');
  143. } else {
  144. VOD.vod_play_from = node.vod_play_from;
  145. VOD.vod_play_url = node.vod_play_url;
  146. }
  147. } catch (e) {
  148. log("获取二级详情页发生错误:" + e.message);
  149. }
  150. `,
  151. 搜索:`js:
  152. let d = [];
  153. let jsondata = [];
  154. let videoList = [];
  155. if (/v1\\.vod/.test(HOST)) {
  156. input = (HOST + '/'+ input.split('/')[3]).replace('/search','').replace('text=','wd=').replace('pg=','page=');
  157. jsondata = JSON.parse(request(input));
  158. videoList = jsondata.data.list;
  159. } else {
  160. input = HOST + '/'+ input.split('/')[3]
  161. jsondata = JSON.parse(request(input));
  162. videoList = jsondata.list || jsondata.data;
  163. }
  164. // log('videoList =========> '+stringify(videoList));
  165. videoList.forEach(it => {
  166. d.push({
  167. url:it.vod_id,
  168. title:it.vod_name,
  169. img:it.vod_pic.startsWith('http') ? it.vod_pic : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  170. desc:it.vod_remarks,
  171. });
  172. });
  173. setResult(d);
  174. `,
  175. }