tengxun.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. globalThis.getHeaders= function(input){
  2. let t = Math.round(new Date().getTime()/1000).toString();
  3. let headers = {
  4. 'User-Agent': 'okhttp/4.1.0'
  5. };
  6. return headers
  7. }
  8. var rule = {
  9. title:'腾云驾雾',
  10. host:'https://v.%71%71.com',
  11. homeUrl:'/x/bu/pagesheet/list?_all=1&append=1&channel=choice&listpage=1&offset=0&pagesize=25&iarea=-1&sort=19',
  12. detailUrl:'https://node.video.%71%71.com/x/api/float_vinfo2?cid=fyid',
  13. searchUrl: 'https://v.%71%71.com/x/search/?q=**&stag=1',
  14. //searchUrl: 'https://tv.aiseet.atianqi.com/i-tvbin/qtv_video/search/get_search_baseline?request_type=homepage&req_page_size=20&req_page_num=0&key=**&Q-UA=QV%3D1%26PR%3DVIDEO%26PT%3DSNMAPP%26CHID%3D15000%26RL%3D2560*1440%26VN%3D15.7.0%26VN_CODE%3D1231008%26VN_BUILD%3D1018%26SV%3D12%26SI%3D32%26MD%3DV2199GA%26DV%3DPD2203%26BD%3DV2199GA%26DE%3D%26MF%3Dvivo%26TVKPlatform%3D670603%26HOST_VN%3D15.7.0%26HOST_VC%3D1231008%26HOST_VB%3D1018%26HOST_API%3D7',
  15. searchable: 2,
  16. quickSearch:1,
  17. filterable:1,
  18. multi:1,
  19. url:'/x/bu/pagesheet/list?_all=1&append=1&channel=fyclass&listpage=1&offset=((fypage-1)*25)&pagesize=25&iarea=-1',
  20. filter_url: 'sort={{fl.sort or 75}}&iyear={{fl.iyear}}&year={{fl.year}}&itype={{fl.type}}&ifeature={{fl.feature}}&iarea={{fl.area}}&itrailer={{fl.itrailer}}&gender={{fl.sex}}',
  21. filter:{"choice":[{"key":"sort","name":"排序","value":[{"n":"最热","v":"75"},{"n":"最新","v":"83"},{"n":"好评","v":"81"}]},{"key":"iyear","name":"年代","value":[{"n":"全部","v":"-1"},{"n":"2024","v":"2024"},{"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"}]}],"tv":[{"key":"sort","name":"排序","value":[{"n":"最热","v":"75"},{"n":"最新","v":"79"},{"n":"好评","v":"16"}]},{"key":"feature","name":"类型","value":[{"n":"全部","v":"-1"},{"n":"爱情","v":"1"},{"n":"古装","v":"2"},{"n":"悬疑","v":"3"},{"n":"都市","v":"4"},{"n":"家庭","v":"5"},{"n":"喜剧","v":"6"},{"n":"传奇","v":"7"},{"n":"武侠","v":"8"},{"n":"军旅","v":"9"},{"n":"权谋","v":"10"},{"n":"革命","v":"11"},{"n":"现实","v":"13"},{"n":"青春","v":"14"},{"n":"猎奇","v":"15"},{"n":"科幻","v":"16"},{"n":"竞技","v":"17"},{"n":"玄幻","v":"18"}]},{"key":"iyear","name":"年代","value":[{"n":"全部","v":"-1"},{"n":"2024","v":"2024"},{"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"}]}],"movie":[{"key":"sort","name":"排序","value":[{"n":"最热","v":"75"},{"n":"最新","v":"83"},{"n":"好评","v":"81"}]},{"key":"type","name":"类型","value":[{"n":"全部","v":"-1"},{"n":"犯罪","v":"4"},{"n":"励志","v":"2"},{"n":"喜剧","v":"100004"},{"n":"热血","v":"100061"},{"n":"悬疑","v":"100009"},{"n":"爱情","v":"100005"},{"n":"科幻","v":"100012"},{"n":"恐怖","v":"100010"},{"n":"动画","v":"100015"},{"n":"战争","v":"100006"},{"n":"家庭","v":"100017"},{"n":"剧情","v":"100022"},{"n":"奇幻","v":"100016"},{"n":"武侠","v":"100011"},{"n":"历史","v":"100021"},{"n":"老片","v":"100013"},{"n":"西部","v":"3"},{"n":"记录片","v":"100020"}]},{"key":"year","name":"年代","value":[{"n":"全部","v":"-1"},{"n":"2024","v":"2024"},{"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"}]}],"variety":[{"key":"sort","name":"排序","value":[{"n":"最热","v":"75"},{"n":"最新","v":"23"}]},{"key":"iyear","name":"年代","value":[{"n":"全部","v":"-1"},{"n":"2024","v":"2024"},{"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"}]}],"cartoon":[{"key":"sort","name":"排序","value":[{"n":"最热","v":"75"},{"n":"最新","v":"83"},{"n":"好评","v":"81"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"-1"},{"n":"内地","v":"1"},{"n":"日本","v":"2"},{"n":"欧美","v":"3"},{"n":"其他","v":"4"}]},{"key":"type","name":"类型","value":[{"n":"全部","v":"-1"},{"n":"玄幻","v":"9"},{"n":"科幻","v":"4"},{"n":"武侠","v":"13"},{"n":"冒险","v":"3"},{"n":"战斗","v":"5"},{"n":"搞笑","v":"1"},{"n":"恋爱","v":"7"},{"n":"魔幻","v":"6"},{"n":"竞技","v":"20"},{"n":"悬疑","v":"17"},{"n":"日常","v":"15"},{"n":"校园","v":"16"},{"n":"真人","v":"18"},{"n":"推理","v":"14"},{"n":"历史","v":"19"},{"n":"经典","v":"3"},{"n":"其他","v":"12"}]},{"key":"iyear","name":"年代","value":[{"n":"全部","v":"-1"},{"n":"2024","v":"2024"},{"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"}]}],"child":[{"key":"sort","name":"排序","value":[{"n":"最热","v":"75"},{"n":"最新","v":"76"},{"n":"好评","v":"20"}]},{"key":"sex","name":"性别","value":[{"n":"全部","v":"-1"},{"n":"女孩","v":"1"},{"n":"男孩","v":"2"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"-1"},{"n":"内地","v":"3"},{"n":"日本","v":"2"},{"n":"其他","v":"1"}]},{"key":"iyear","name":"年龄段","value":[{"n":"全部","v":"-1"},{"n":"0-3岁","v":"1"},{"n":"4-6岁","v":"2"},{"n":"7-9岁","v":"3"},{"n":"10岁以上","v":"4"},{"n":"全年龄段","v":"7"}]}],"doco":[{"key":"sort","name":"排序","value":[{"n":"最热","v":"75"},{"n":"最新","v":"74"}]},{"key":"itrailer","name":"出品方","value":[{"n":"全部","v":"-1"},{"n":"BBC","v":"1"},{"n":"国家地理","v":"4"},{"n":"HBO","v":"3175"},{"n":"NHK","v":"2"},{"n":"历史频道","v":"7"},{"n":"ITV","v":"3530"},{"n":"探索频道","v":"3174"},{"n":"ZDF","v":"3176"},{"n":"腾讯自制","v":"15"},{"n":"合作机构","v":"6"},{"n":"其他","v":"5"}]},{"key":"type","name":"类型","value":[{"n":"全部","v":"-1"},{"n":"自然","v":"4"},{"n":"美食","v":"10"},{"n":"社会","v":"3"},{"n":"人文","v":"6"},{"n":"历史","v":"1"},{"n":"军事","v":"2"},{"n":"科技","v":"8"},{"n":"财经","v":"14"},{"n":"探险","v":"15"},{"n":"罪案","v":"7"},{"n":"竞技","v":"12"},{"n":"旅游","v":"11"}]}]},
  22. headers:{
  23. 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.95 Safari/537.36'
  24. },
  25. timeout:5000,
  26. cate_exclude:'会员|游戏|全部',
  27. class_name:'精选&电视剧&电影&综艺&动漫&少儿&纪录片',
  28. class_url:'choice&tv&movie&variety&cartoon&child&doco',
  29. limit:20,
  30. play_parse:true,
  31. lazy:`js:
  32. try {
  33. function getvideo(url) {
  34. let jData = JSON.parse(request(url, {
  35. headers: getHeaders(url)
  36. }));
  37. return jData.url
  38. }
  39. let videoUrl = getvideo('http://139.224.73.238:16555/qq2.php?url=' + input);
  40. input = {
  41. jx: 0,
  42. url: videoUrl,
  43. parse: 0
  44. }
  45. } catch (e) {
  46. log(e.toString())
  47. }
  48. `,
  49. 推荐:'.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
  50. 一级:'.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
  51. 二级:`js:
  52. VOD = {};
  53. let d = [];
  54. let video_list = [];
  55. let video_lists = [];
  56. let list = [];
  57. let QZOutputJson;
  58. let html = fetch(input, fetch_params);
  59. let sourceId = /get_playsource/.test(input) ? input.match(/id=(\\d*?)&/)[1] : input.split("cid=")[1];
  60. let cid = sourceId;
  61. let detailUrl = "https://v.%71%71.com/detail/m/" + cid + ".html";
  62. log("详情页:" + detailUrl);
  63. var pdfh = jsp.pdfh;
  64. var pd = jsp.pd;
  65. try {
  66. let json = JSON.parse(html);
  67. VOD = {
  68. vod_url: input,
  69. vod_name: json.c.title,
  70. type_name: json.typ.join(","),
  71. vod_actor: json.nam.join(","),
  72. vod_year: json.c.year,
  73. vod_content: json.c.description,
  74. vod_remarks: json.rec,
  75. vod_pic: urljoin2(input, json.c.pic)
  76. }
  77. } catch(e) {
  78. log("解析片名海报等基础信息发生错误:" + e.message)
  79. }
  80. if (/get_playsource/.test(input)) {
  81. eval(html);
  82. let indexList = QZOutputJson.PlaylistItem.indexList;
  83. indexList.forEach(function(it) {
  84. let dataUrl = "https://s.video.qq.com/get_playsource?id=" + sourceId + "&plat=2&type=4&data_type=3&range=" + it + "&video_type=10&plname=qq&otype=json";
  85. eval(fetch(dataUrl, fetch_params));
  86. let vdata = QZOutputJson.PlaylistItem.videoPlayList;
  87. vdata.forEach(function(item) {
  88. d.push({
  89. title: item.title,
  90. pic_url: item.pic,
  91. desc: item.episode_number + "\\t\\t\\t播放量:" + item.thirdLine,
  92. url: item.playUrl
  93. })
  94. });
  95. video_lists = video_lists.concat(vdata)
  96. })
  97. } else {
  98. let json = JSON.parse(html);
  99. video_lists = json.c.video_ids;
  100. let url = "https://v.qq.com/x/cover/" + sourceId + ".html";
  101. if (video_lists.length === 1) {
  102. let vid = video_lists[0];
  103. url = "https://v.qq.com/x/cover/" + cid + "/" + vid + ".html";
  104. d.push({
  105. title: "在线播放",
  106. url: url
  107. })
  108. } else if (video_lists.length > 1) {
  109. for (let i = 0; i < video_lists.length; i += 30) {
  110. video_list.push(video_lists.slice(i, i + 30))
  111. }
  112. video_list.forEach(function(it, idex) {
  113. let o_url = "https://union.video.qq.com/fcgi-bin/data?otype=json&tid=682&appid=20001238&appkey=6c03bbe9658448a4&union_platform=1&idlist=" + it.join(",");
  114. let o_html = fetch(o_url, fetch_params);
  115. eval(o_html);
  116. QZOutputJson.results.forEach(function(it1) {
  117. it1 = it1.fields;
  118. let url = "https://v.qq.com/x/cover/" + cid + "/" + it1.vid + ".html";
  119. let parts = it1.series_part_title.split(" ")[1];
  120. if (!it1.title.match(/预告/)) {
  121. d.push({
  122. title: parts ? parts: it1.title,
  123. pic_url: it1.pic160x90.replace("/160", ""),
  124. desc: it1.video_checkup_time,
  125. url: url,
  126. type: it1.category_map && it1.category_map.length > 1 ? it1.category_map[1] : ""
  127. })
  128. }
  129. })
  130. })
  131. }
  132. }
  133. let zp = d.filter(function(it) {
  134. return ! (it.title === "1" && it.type && it.type !== "正片")
  135. });
  136. VOD.vod_play_from = "腾讯";
  137. VOD.vod_play_url = zp.map(function(it) {
  138. return it.title + "$" + it.url
  139. }).join("#");
  140. `,
  141. 搜索: `js:
  142. let d = [];
  143. pdfa = jsp.pdfa;
  144. pdfh = jsp.pdfh;
  145. pd = jsp.pd;
  146. let html = request(input);
  147. let baseList = pdfa(html, "body&&.result_item_v");
  148. if (baseList.length > 0) {
  149. baseList.forEach(function(it) {
  150. let longText = pdfh(it, ".result_title&&Text");
  151. let shortText = pdfh(it, ".sub&&Text");
  152. let url = pd(it, "div.result_item_v&&data-id");
  153. let img = pd(it, ".figure_pic&&src");
  154. let fromTag = pdfh(it, ".result_source&&Text");
  155. let markAlt = pd(it, ".mark_v img&&alt");
  156. if (fromTag.match(/腾讯/) && shortText && !markAlt.match(/预告/)) {
  157. d.push({
  158. title: longText.split(shortText)[0],
  159. img: img,
  160. url: 'https://node.video.qq.com/x/api/float_vinfo2?cid=' + url,
  161. desc: shortText.replace('(', "").replace(')', "")
  162. })
  163. }
  164. });
  165. } else {
  166. let baseLists = pdfa(html, "body&&.list_item");
  167. baseLists.forEach(function(it) {
  168. let longText = pdfh(it, ".figure_title&&Text");
  169. let shortText = pdfh(it, ".figure_desc&&Text");
  170. let url = pd(it, ".figure_title&&a&&href");
  171. let img = pd(it, ".figure_pic&&src");
  172. let fromTag = pd(it, ".source_icon&&alt");
  173. const parts = url.split('/');
  174. const cid = parts[parts.length - 1].replace('.html', "");
  175. if (!fromTag && longText) {
  176. d.push({
  177. title: longText,
  178. img: img,
  179. url: 'https://node.video.qq.com/x/api/float_vinfo2?cid=' + cid,
  180. desc: shortText
  181. })
  182. }
  183. });
  184. }
  185. setResult(d);
  186. `,
  187. /*搜索: `js:
  188. let d = [];
  189. let html = request(input);
  190. let json = JSON.parse(html);
  191. json.data.areas[0].base_info.contents.forEach(content => {
  192. const pageSnapshot = content.common_single_info.main.action.pageSnapshot;
  193. let data = JSON.parse(request(pageSnapshot.url));
  194. d.push({
  195. url: 'https://node.video.qq.com/x/api/float_vinfo2?cid=' + data.base_info.cover_id,
  196. title: data.base_info.title,
  197. img: data.header.img_url_hz,
  198. desc: data.header.sub_title
  199. })
  200. });
  201. setResult(d);
  202. `, */
  203. }