荐片.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. //host: 'https://oiuzy.haitu33.com',
  10. host: 'https://dns.alidns.com/resolve?name=jpmobile.jianpiandns.com&type=TXT',
  11. hostJs:`
  12. print(HOST);
  13. let html=request(HOST,{headers:{"User-Agent":MOBILE_UA}});
  14. let json = dealJson(html);
  15. let data = json.Answer[0].data.replace(/'|"/g,'').split(',');
  16. HOST = data[0];
  17. if(!HOST.startsWith('http')){
  18. HOST = 'https://'+HOST;
  19. }
  20. // log(HOST);
  21. `,
  22. homeUrl: '/api/tag/hand?code=unknown601193cf375db73d&channel=wandoujia',//网站的首页链接,用于分类获取和推荐获取
  23. // url:'/api/crumb/list?area=0&category_id=fyclass&page=fypage&type=0&limit=24&fyfilter',
  24. url: '/api/crumb/list?page=fypage&type=0&limit=24&fyfilter',
  25. class_name: '全部&电影&电视剧&动漫&综艺', // 筛选 /api/term/ad_fenlei?limit=10&page=1
  26. class_url: '0&1&2&3&4',
  27. detailUrl: '/api/node/detail?channel=wandoujia&token=&id=fyid',//二级详情拼接链接(json格式用)
  28. searchUrl: '/api/video/search?key=**&page=fypage',
  29. searchable: 2,
  30. quickSearch: 0,
  31. filterable: 1,
  32. filter: 'H4sIAAAAAAAAA+2V3UrDMBiG7yXHO2jTrtu8A69BPCiuqKhT6hTGGEzmxiY4f5CqWPBA3So4tsHE/aBX06T2Lsxc2mR2FWHzrId5vpA03/e8NA8EsLSSB1taDiwBVddUEAMZdUcjK2R20GmRrA/V7QPte1tmjMuWW7LGmCwEUIhRfPduD5sUiz62+y1ScRu3uN+mRelHEZ118OCDFhW/6HzUSZHiuI/d+2eGxaTP8fUTNl8oh6CwOi5MnpXTVJ171qBnjx7++iwoQNm7TEzxWPJwXOIx9LAg8lj0D0nyWPCwwlFyz4QmeJhkb2MwEegpgYq3c7oN+7t6lrUB1y/R8CzQBqfUcq+9NmzsZv1zP9vHqFqhBV3NbmbWWe/vetjo0NrBXlrNauObV2NEBGbXGsHLaW4Q1YrTHf0+CNZDt2HguhXQAZ1Y9rsZkAcZJqo1A23E1Rt7WKOYc+foHBcNitmQyQm4VPbnycysdjnOPtFpXqDByOOQ/0bnyufS1FCiyEWRW2zk4JyRg7MjJ8oh3jFPiG9ErGB7iSdEIY9zaXx9Q48G51WUiygX/5YLac5cSCG5SM32GQohPoizPf3Rocj/yP/F+i/P6b88238ohfgsh+Qi5H8Blcj/yP9/87/wBY9Rx63qDgAA',
  33. filter_url: 'area={{fl.area or "0"}}&sort={{fl.sort or "update"}}&year={{fl.year or "0"}}&category_id={{fl.cateId}}',
  34. filter_def: {
  35. 0:{cateId:'0'},
  36. 1:{cateId:'1'},
  37. 2:{cateId:'2'},
  38. 3:{cateId:'3'},
  39. 4:{cateId:'4'}
  40. },
  41. headers: {
  42. 'User-Agent': 'jianpian-android/350',
  43. 'JPAUTH': 'y261ow7kF2dtzlxh1GS9EB8nbTxNmaK/QQIAjctlKiEv'
  44. },
  45. timeout: 5000,
  46. limit: 8,
  47. play_parse: true,
  48. play_json: [{
  49. re: '*',
  50. json: {
  51. parse: 0,
  52. jx: 0
  53. }
  54. }],
  55. lazy: '',
  56. 图片来源: '@Referer=www.jianpianapp.com@User-Agent=jianpian-version361',
  57. // 推荐:'json:.video;*;*;*;*',
  58. 推荐: `js:
  59. var d = [];
  60. let html = request(input);
  61. html = JSON.parse(html).data[0].video;
  62. html.forEach(it => {
  63. d.push({
  64. title: it.title,
  65. img: it.path,
  66. desc: it.playlist.title + ' ⭐' + it.score,
  67. url: it.id
  68. })
  69. });
  70. setResult(d);
  71. `,
  72. // 一级:'json:data;title;path;playlist.title;id',
  73. 一级: `js:
  74. cateObj.tid = cateObj.tid+'';
  75. if (cateObj.tid.endsWith('_clicklink')) {
  76. cateObj.tid = cateObj.tid.split('_')[0];
  77. input = HOST + '/api/video/search?key=' + cateObj.tid + '&page=' + + MY_PAGE;
  78. }
  79. var d = [];
  80. let html = request(input);
  81. html = JSON.parse(html).data;
  82. html.forEach(it => {
  83. d.push({
  84. title: it.title,
  85. img: it.thumbnail||it.path,
  86. desc: (it.mask || it.playlist.title) + ' ⭐' + it.score,
  87. url: it.id
  88. })
  89. });
  90. setResult(d);
  91. `,
  92. 二级: `js:
  93. function getLink(data) {
  94. let link = data.map(it => {
  95. return '[a=cr:' + JSON.stringify({'id':it.name+'_clicklink','name':it.name}) + '/]' + it.name + '[/a]'
  96. }).join(', ');
  97. return link
  98. }
  99. try {
  100. let html = request(input);
  101. html = JSON.parse(html);
  102. let node = html.data;
  103. VOD = {
  104. vod_id: node.id,
  105. vod_name: node.title,
  106. vod_pic: node.thumbnail,
  107. type_name: node.types[0].name,
  108. vod_year: node.year.title,
  109. vod_area: node.area.title,
  110. vod_remarks: node.score,
  111. vod_actor: getLink(node.actors),
  112. vod_director: getLink(node.directors),
  113. vod_content: node.description.strip()
  114. };
  115. if (typeof play_url === 'undefined') {
  116. var play_url = ''
  117. }
  118. let playMap = {};
  119. if (node.have_ftp_ur == 1) {
  120. playMap["边下边播超清版"] = node.new_ftp_list.map(it => {
  121. return it.title + "$" + (/m3u8/.test(it.url) ? play_url + it.url : "tvbox-xg:" + it.url)
  122. }).join('#');
  123. }
  124. if (node.have_m3u8_ur == 1) {
  125. playMap["在线点播普清版"] = node.new_m3u8_list.map(it => {
  126. return it.title + "$" + (/m3u8/.test(it.url) ? play_url + it.url : "tvbox-xg:" + it.url)
  127. }).join('#');
  128. }
  129. let playFrom = [];
  130. let playList = [];
  131. Object.keys(playMap).forEach(key => {
  132. playFrom.append(key);
  133. playList.append(playMap[key])
  134. });
  135. VOD.vod_play_from = playFrom.join('$$$');
  136. VOD.vod_play_url = playList.join('$$$');
  137. } catch (e) {
  138. log("获取二级详情页发生错误:" + e.message);
  139. }
  140. `,
  141. // 搜索:'json:data;*;thumbnail;mask;*',
  142. 搜索: `js:
  143. var d = [];
  144. let html = request(input);
  145. html = JSON.parse(html).data;
  146. html.forEach(it => {
  147. d.push({
  148. title: it.title,
  149. img: it.thumbnail,
  150. desc: it.mask + ' ⭐' + it.score,
  151. url: it.id
  152. })
  153. });
  154. setResult(d);
  155. `,
  156. }