荐片.js 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /**
  2. * 影视TV 超連結跳轉支持
  3. * https://t.me/fongmi_offical/
  4. * https://github.com/FongMi/Release/tree/main/apk
  5. */
  6. var rule = {
  7. title: '荐片',
  8. host: 'http://api2.rinhome.com',
  9. homeUrl: '/api/tag/hand?code=unknown601193cf375db73d&channel=wandoujia',//网站的首页链接,用于分类获取和推荐获取
  10. // url:'/api/crumb/list?area=0&category_id=fyclass&page=fypage&type=0&limit=24&fyfilter',
  11. url: '/api/crumb/list?page=fypage&type=0&limit=24&fyfilter',
  12. class_name: '全部&电影&电视剧&动漫&综艺', // 筛选 /api/term/ad_fenlei?limit=10&page=1
  13. class_url: '0&1&2&3&4',
  14. detailUrl: '/api/node/detail?channel=wandoujia&token=&id=fyid',//二级详情拼接链接(json格式用)
  15. searchUrl: '/api/video/search?key=**&page=fypage',
  16. searchable: 2,
  17. quickSearch: 0,
  18. filterable: 1,
  19. filter: {
  20. "0":[{"key":"area","name":"地區","value":[{"n":"全部","v":"0"},{"n":"国产","v":"1"},{"n":"中国香港","v":"3"},{"n":"中国台湾","v":"6"},{"n":"美国","v":"5"},{"n":"韩国","v":"18"},{"n":"日本","v":"2"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":"0"},{"n":"2024","v":"119"},{"n":"2023","v":"153"},{"n":"2022","v":"101"},{"n":"2021","v":"118"},{"n":"2020","v":"16"},{"n":"2019","v":"7"},{"n":"2018","v":"2"},{"n":"2017","v":"3"},{"n":"2016","v":"22"}]},{"key":"sort","name":"排序","value":[{"n":"热门","v":"hot"},{"n":"评分","v":"rating"},{"n":"更新","v":"update"}]}],
  21. "1":[{"key":"cateId","name":"分类","value":[{"n":"全部","v":"1"},{"n":"首推","v":"5"},{"n":"动作","v":"6"},{"n":"喜剧","v":"7"},{"n":"战争","v":"8"},{"n":"恐怖","v":"9"},{"n":"剧情","v":"10"},{"n":"爱情","v":"11"},{"n":"科幻","v":"12"},{"n":"动画","v":"13"}]},{"key":"area","name":"地區","value":[{"n":"全部","v":"0"},{"n":"国产","v":"1"},{"n":"中国香港","v":"3"},{"n":"中国台湾","v":"6"},{"n":"美国","v":"5"},{"n":"韩国","v":"18"},{"n":"日本","v":"2"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":"0"},{"n":"2024","v":"119"},{"n":"2023","v":"153"},{"n":"2022","v":"101"},{"n":"2021","v":"118"},{"n":"2020","v":"16"},{"n":"2019","v":"7"},{"n":"2018","v":"2"},{"n":"2017","v":"3"},{"n":"2016","v":"22"}]},{"key":"sort","name":"排序","value":[{"n":"热门","v":"hot"},{"n":"评分","v":"rating"},{"n":"更新","v":"update"}]}],
  22. "2":[{"key":"cateId","name":"分类","value":[{"n":"全部","v":"2"},{"n":"首推","v":"14"},{"n":"国产","v":"15"},{"n":"港台","v":"16"},{"n":"日韩","v":"17"},{"n":"海外","v":"18"}]},{"key":"area","name":"地區","value":[{"n":"全部","v":"0"},{"n":"国产","v":"1"},{"n":"中国香港","v":"3"},{"n":"中国台湾","v":"6"},{"n":"美国","v":"5"},{"n":"韩国","v":"18"},{"n":"日本","v":"2"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":"0"},{"n":"2024","v":"119"},{"n":"2023","v":"153"},{"n":"2022","v":"101"},{"n":"2021","v":"118"},{"n":"2020","v":"16"},{"n":"2019","v":"7"},{"n":"2018","v":"2"},{"n":"2017","v":"3"},{"n":"2016","v":"22"}]},{"key":"sort","name":"排序","value":[{"n":"热门","v":"hot"},{"n":"评分","v":"rating"},{"n":"更新","v":"update"}]}],
  23. "3":[{"key":"cateId","name":"分类","value":[{"n":"全部","v":"3"},{"n":"首推","v":"19"},{"n":"海外","v":"20"},{"n":"日本","v":"21"},{"n":"国产","v":"22"}]},{"key":"area","name":"地區","value":[{"n":"全部","v":"0"},{"n":"国产","v":"1"},{"n":"中国香港","v":"3"},{"n":"中国台湾","v":"6"},{"n":"美国","v":"5"},{"n":"韩国","v":"18"},{"n":"日本","v":"2"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":"0"},{"n":"2024","v":"119"},{"n":"2023","v":"153"},{"n":"2022","v":"101"},{"n":"2021","v":"118"},{"n":"2020","v":"16"},{"n":"2019","v":"7"},{"n":"2018","v":"2"},{"n":"2017","v":"3"},{"n":"2016","v":"22"}]},{"key":"sort","name":"排序","value":[{"n":"热门","v":"hot"},{"n":"评分","v":"rating"},{"n":"更新","v":"update"}]}],
  24. "4":[{"key":"cateId","name":"分类","value":[{"n":"全部","v":"4"},{"n":"首推","v":"23"},{"n":"国产","v":"24"},{"n":"海外","v":"25"},{"n":"港台","v":"26"}]},{"key":"area","name":"地區","value":[{"n":"全部","v":"0"},{"n":"国产","v":"1"},{"n":"中国香港","v":"3"},{"n":"中国台湾","v":"6"},{"n":"美国","v":"5"},{"n":"韩国","v":"18"},{"n":"日本","v":"2"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":"0"},{"n":"2024","v":"119"},{"n":"2023","v":"153"},{"n":"2022","v":"101"},{"n":"2021","v":"118"},{"n":"2020","v":"16"},{"n":"2019","v":"7"},{"n":"2018","v":"2"},{"n":"2017","v":"3"},{"n":"2016","v":"22"}]},{"key":"sort","name":"排序","value":[{"n":"热门","v":"hot"},{"n":"评分","v":"rating"},{"n":"更新","v":"update"}]}]
  25. },
  26. filter_url: 'area={{fl.area or "0"}}&sort={{fl.sort or "update"}}&year={{fl.year or "0"}}&category_id={{fl.cateId}}',
  27. filter_def: {
  28. 0:{cateId:'0'},
  29. 1:{cateId:'1'},
  30. 2:{cateId:'2'},
  31. 3:{cateId:'3'},
  32. 4:{cateId:'4'}
  33. },
  34. headers: {
  35. 'User-Agent': 'jianpian-android/350',
  36. 'JPAUTH': 'y261ow7kF2dtzlxh1GS9EB8nbTxNmaK/QQIAjctlKiEv'
  37. },
  38. timeout: 5000,
  39. limit: 8,
  40. play_parse: true,
  41. play_json: [{
  42. re: '*',
  43. json: {
  44. parse: 0,
  45. jx: 0
  46. }
  47. }],
  48. lazy: '',
  49. 图片来源: '@Referer=www.jianpianapp.com@User-Agent=jianpian-version353',
  50. // 推荐:'json:.video;*;*;*;*',
  51. 推荐: `js:
  52. var d = [];
  53. let html = request(input);
  54. html = JSON.parse(html).data[0].video;
  55. html.forEach(it => {
  56. d.push({
  57. title: it.title,
  58. img: it.path,
  59. desc: it.playlist.title + ' ⭐' + it.score,
  60. url: it.id
  61. })
  62. });
  63. setResult(d);
  64. `,
  65. // 一级:'json:data;title;path;playlist.title;id',
  66. 一级: `js:
  67. if (cateObj.tid.endsWith('_clicklink')) {
  68. cateObj.tid = cateObj.tid.split('_')[0];
  69. input = HOST + '/api/video/search?key=' + cateObj.tid + '&page=' + + MY_PAGE;
  70. }
  71. var d = [];
  72. let html = request(input);
  73. html = JSON.parse(html).data;
  74. html.forEach(it => {
  75. d.push({
  76. title: it.title,
  77. img: it.thumbnail||it.path,
  78. desc: (it.mask || it.playlist.title) + ' ⭐' + it.score,
  79. url: it.id
  80. })
  81. });
  82. setResult(d);
  83. `,
  84. 二级: `js:
  85. function getLink(data) {
  86. let link = data.map(it => {
  87. return '[a=cr:' + JSON.stringify({'id':it.name+'_clicklink','name':it.name}) + '/]' + it.name + '[/a]'
  88. }).join(', ');
  89. return link
  90. }
  91. try {
  92. let html = request(input);
  93. html = JSON.parse(html);
  94. let node = html.data;
  95. VOD = {
  96. vod_id: node.id,
  97. vod_name: node.title,
  98. vod_pic: node.thumbnail,
  99. type_name: node.types[0].name,
  100. vod_year: node.year.title,
  101. vod_area: node.area.title,
  102. vod_remarks: node.score,
  103. vod_actor: getLink(node.actors),
  104. vod_director: getLink(node.directors),
  105. vod_content: node.description.strip()
  106. };
  107. if (typeof play_url === 'undefined') {
  108. var play_url = ''
  109. }
  110. let playMap = {};
  111. if (node.have_ftp_ur == 1) {
  112. playMap["边下边播超清版"] = node.new_ftp_list.map(it => {
  113. return it.title + "$" + (/m3u8/.test(it.url) ? play_url + it.url : "tvbox-xg:" + it.url)
  114. }).join('#');
  115. }
  116. if (node.have_m3u8_ur == 1) {
  117. playMap["在线点播普清版"] = node.new_m3u8_list.map(it => {
  118. return it.title + "$" + (/m3u8/.test(it.url) ? play_url + it.url : "tvbox-xg:" + it.url)
  119. }).join('#');
  120. }
  121. let playFrom = [];
  122. let playList = [];
  123. Object.keys(playMap).forEach(key => {
  124. playFrom.append(key);
  125. playList.append(playMap[key])
  126. });
  127. VOD.vod_play_from = playFrom.join('$$$');
  128. VOD.vod_play_url = playList.join('$$$');
  129. } catch (e) {
  130. log("获取二级详情页发生错误:" + e.message);
  131. }
  132. `,
  133. // 搜索:'json:data;*;thumbnail;mask;*',
  134. 搜索: `js:
  135. var d = [];
  136. let html = request(input);
  137. html = JSON.parse(html).data;
  138. html.forEach(it => {
  139. d.push({
  140. title: it.title,
  141. img: it.thumbnail,
  142. desc: it.mask + ' ⭐' + it.score,
  143. url: it.id
  144. })
  145. });
  146. setResult(d);
  147. `,
  148. }