tx.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. var rule = {
  2. title: '腾云驾雾[官]',
  3. host: 'https://v.%71%71.com',
  4. // homeUrl: '/x/bu/pagesheet/list?_all=1&append=1&channel=choice&listpage=1&offset=0&pagesize=21&iarea=-1&sort=18',
  5. homeUrl: '/x/bu/pagesheet/list?_all=1&append=1&channel=cartoon&listpage=1&offset=0&pagesize=21&iarea=-1&sort=18',
  6. detailUrl: 'https://node.video.%71%71.com/x/api/float_vinfo2?cid=fyid',
  7. searchUrl: '/x/search/?q=**&stag=fypage',
  8. searchable: 2,
  9. filterable: 1,
  10. multi: 1,
  11. // url:'/channel/fyclass?listpage=fypage&channel=fyclass&sort=18&_all=1',
  12. url: '/x/bu/pagesheet/list?_all=1&append=1&channel=fyclass&listpage=1&offset=((fypage-1)*21)&pagesize=21&iarea=-1',
  13. // filter_url: 'sort={{fl.sort or 18}}&year={{fl.year}}&pay={{fl.pay}}',
  14. // filter_url: 'sort={{fl.sort or 75}}&year={{fl.year}}&pay={{fl.pay}}',
  15. 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}}',
  16. // filter: 'H4sIAAAAAAAAA+2UzUrDQBCA32XOEZLUJrGvIj0saaDBNisxBkIJCG3Fi4oepIg3EQoieqiH+vM23Zq+hRuaZLZ4ce9z2/lmd2d2+NgR+H0e+gF0DkdwFGTQgRMeJ2BAxIaSwvrqVnxcyzhlg9PttqjED2c/45cSy8DyIDcavr57q/lBw8XTd/E6qbnT8M3zTFyc72RtC/Jumd+2c8wy7KZ4nxSL5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MBLAeJozMNQYCK1IetSq86bD5LRjHlpng8VlIGVonWYkwMSX2KjQVrGnMoamPKDLQfVqDh5gjjcpF6Xtyi6tU02uhMAyS+8Mw0DbUv8+WzZWknJW5rI7CiSjWWSrP93Pt0hd00OlyOHidDko/78GUJbAqaG7+brtP4M6Yvtk8zH3pmh9JlUeNugnlz7ArC3T0Tkw51xERGJFfqTAnVa87T6T8+WeAZ95FNccnxoMAAwWBIcHAEY7FY9DDUbJbO+KK+zybJg1TmjtCvmUXg83J+CEWk5FI1ooUkdxyltkFdxmj/rOU6jozelIJGNpru1FmpAQ+D37dH7PE4qsvPe7btyftuE5ezknPgriXTvPPidy/H7ELlmd6yTHeEO0wPqH/52C2DoHzvZsqtHdvqAZE5lBiYrGbNZoAWDFnmPBS6uQv/VzT1mjDV/KsWPjV5n9113mwZ8r2V+fSuVIJsQNJ+WjRZmAX5/YBpLUiLYrIVJBvxon+yw2SEPGpYDmLX4dUDzgG5npEyKbwPQnrGepDAP2/09NvcvaIIuCAgUAAA=',
  18. headers: {
  19. 'User-Agent': 'PC_UA'
  20. },
  21. timeout: 5000,
  22. // class_parse:'.site_channel a;a&&Text;a&&href;channel/(.*)',
  23. cate_exclude: '会员|游戏|全部',
  24. // class_name: '精选&电视剧&电影&综艺&动漫&少儿&纪录片',
  25. // class_url: 'choice&tv&movie&variety&cartoon&child&doco',
  26. class_name: '电影&电视剧&综艺&动漫&少儿&纪录片',
  27. class_url: 'movie&tv&variety&cartoon&child&doco',
  28. limit: 20,
  29. play_parse: true,
  30. lazy: $js.toString(() => {
  31. let d = [];
  32. const blockedField = 'https://123.yp22.cn/d/le/53SqFaimyxG6LrduZ';
  33. try {
  34. // 发起请求并获取响应,添加请求头
  35. let headers = {
  36. 'User-Agent': 'okhttp/4.12.0'
  37. };
  38. let responseText = request("http://150.158.112.123/%E5%85%AC%E4%BC%97%E5%8F%B7~%E7%8E%89%E7%8E%89%E5%BA%94%E7%94%A8%E7%AC%94%E8%AE%B0/jiexi.php?url=" + input, { headers: headers });
  39. console.log("响应文本:", responseText); // 查看原始响应内容
  40. //备用http://llyh.xn--yi7aa.top/api/?key=5b317c16d457b31a3150d87c0a362a9e&url=
  41. // 解析 JSON 数据
  42. let response = JSON.parse(responseText);
  43. // 查找以 'url' 开头的字段
  44. let urlField = Object.keys(response).find(key => key.startsWith('url'));
  45. // 提取找到的字段值
  46. let urlValue = urlField ? response[urlField] : null;
  47. console.log("提取的随机字段值:", urlValue); // 查看提取的值
  48. if (response.url.includes(blockedField)) {
  49. throw new Error('该链接已被屏蔽');
  50. };
  51. if (urlValue) {
  52. // 处理 urlValue,或将其用于 input
  53. input = {
  54. url: urlValue,
  55. parse: 0,
  56. header: rule.headers
  57. };
  58. } else {
  59. // 处理没有找到字段的情况
  60. console.error("没有找到以 'url' 开头的字段");
  61. }
  62. } catch (error) {
  63. console.error("处理请求或数据时发生错误:", error);
  64. }
  65. setResult(d);
  66. }),
  67. //lazy:'js:input="http:\\/\\/43.248.100.147:6068\\/KEY\\/XGJ\\/root\\/key\\/60.php?url="+input.split("?")[0];log(input);let html=JSON.parse(request(input));log(html);input=html.url||input',
  68. 推荐: '.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
  69. 一级: '.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
  70. 二级: $js.toString(() => {
  71. VOD = {};
  72. let d = [];
  73. let video_list = [];
  74. let video_lists = [];
  75. let list = [];
  76. let QZOutputJson;
  77. let html = fetch(input, fetch_params);
  78. let sourceId = /get_playsource/.test(input) ? input.match(/id=(\d*?)&/)[1] : input.split("cid=")[1];
  79. let cid = sourceId;
  80. let detailUrl = "https://v.%71%71.com/detail/m/" + cid + ".html";
  81. log("详情页:" + detailUrl);
  82. pdfh = jsp.pdfh;
  83. pd = jsp.pd;
  84. try {
  85. let json = JSON.parse(html);
  86. VOD = {
  87. vod_url: input,
  88. vod_name: json.c.title,
  89. type_name: json.typ.join(","),
  90. vod_actor: json.nam.join(","),
  91. vod_year: json.c.year,
  92. vod_content: json.c.description,
  93. vod_remarks: json.rec,
  94. vod_pic: urljoin2(input, json.c.pic)
  95. }
  96. } catch (e) {
  97. log("解析片名海报等基础信息发生错误:" + e.message)
  98. }
  99. if (/get_playsource/.test(input)) {
  100. eval(html);
  101. let indexList = QZOutputJson.PlaylistItem.indexList;
  102. indexList.forEach(function(it) {
  103. 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";
  104. eval(fetch(dataUrl, fetch_params));
  105. let vdata = QZOutputJson.PlaylistItem.videoPlayList;
  106. vdata.forEach(function(item) {
  107. d.push({
  108. title: item.title,
  109. pic_url: item.pic,
  110. desc: item.episode_number + "\t\t\t播放量:" + item.thirdLine,
  111. url: item.playUrl
  112. })
  113. });
  114. video_lists = video_lists.concat(vdata)
  115. })
  116. } else {
  117. let json = JSON.parse(html);
  118. video_lists = json.c.video_ids;
  119. let url = "https://v.qq.com/x/cover/" + sourceId + ".html";
  120. if (video_lists.length === 1) {
  121. let vid = video_lists[0];
  122. url = "https://v.qq.com/x/cover/" + cid + "/" + vid + ".html";
  123. d.push({
  124. title: "在线播放",
  125. url: url
  126. })
  127. } else if (video_lists.length > 1) {
  128. for (let i = 0; i < video_lists.length; i += 30) {
  129. video_list.push(video_lists.slice(i, i + 30))
  130. }
  131. video_list.forEach(function(it, idex) {
  132. let o_url = "https://union.video.qq.com/fcgi-bin/data?otype=json&tid=1804&appid=20001238&appkey=6c03bbe9658448a4&union_platform=1&idlist=" + it.join(",");
  133. let o_html = fetch(o_url, fetch_params);
  134. eval(o_html);
  135. QZOutputJson.results.forEach(function(it1) {
  136. it1 = it1.fields;
  137. let url = "https://v.qq.com/x/cover/" + cid + "/" + it1.vid + ".html";
  138. d.push({
  139. title: it1.title,
  140. pic_url: it1.pic160x90.replace("/160", ""),
  141. desc: it1.video_checkup_time,
  142. url: url,
  143. type: it1.category_map && it1.category_map.length > 1 ? it1.category_map[1] : ""
  144. })
  145. })
  146. })
  147. }
  148. }
  149. let yg = d.filter(function(it) {
  150. return it.type && it.type !== "正片"
  151. });
  152. let zp = d.filter(function(it) {
  153. return !(it.type && it.type !== "正片")
  154. });
  155. VOD.vod_play_from = yg.length < 1 ? "四季快云" : "四季快云$$$预告及花絮";
  156. VOD.vod_play_url = yg.length < 1 ? d.map(function(it) {
  157. return it.title + "$" + it.url
  158. }).join("#") : [zp, yg].map(function(it) {
  159. return it.map(function(its) {
  160. return its.title + "$" + its.url
  161. }).join("#")
  162. }).join("$$$");
  163. }),
  164. 搜索: $js.toString(() => {
  165. let d = [];
  166. pdfa = jsp.pdfa;
  167. pdfh = jsp.pdfh;
  168. pd = jsp.pd;
  169. let html = request(input);
  170. let baseList = pdfa(html, "body&&.result_item_v");
  171. log(baseList.length);
  172. baseList.forEach(function(it) {
  173. let longText = pdfh(it, ".result_title&&a&&Text");
  174. let shortText = pdfh(it, ".type&&Text");
  175. let fromTag = pdfh(it, ".result_source&&Text");
  176. let score = pdfh(it, ".figure_info&&Text");
  177. let content = pdfh(it, ".desc_text&&Text");
  178. // let url = pdfh(it, ".result_title&&a&&href");
  179. let url = pdfh(it, "div&&r-data");
  180. // log(longText);
  181. // log(shortText);
  182. // log('url:'+url);
  183. let img = pd(it, ".figure_pic&&src");
  184. url = "https://node.video.qq.com/x/api/float_vinfo2?cid=" + url.match(/.*\/(.*?)\.html/)[1];
  185. log(shortText + "|" + url);
  186. if (fromTag.match(/腾讯/)) {
  187. d.push({
  188. title: longText.split(shortText)[0],
  189. img: img,
  190. url: url,
  191. content: content,
  192. desc: shortText + " " + score
  193. })
  194. }
  195. });
  196. setResult(d);
  197. }),
  198. }