企鹅.js 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. var rule = {
  2. title: '腾云驾雾',
  3. host: 'https://v.%71%71.com',
  4. homeUrl: '/x/bu/pagesheet/list?_all=1&append=1&channel=cartoon&listpage=1&offset=0&pagesize=21&iarea=-1&sort=18',
  5. detailUrl: 'https://node.video.%71%71.com/x/api/float_vinfo2?cid=fyid',
  6. searchUrl: '/x/search/?q=**&stag=fypage',
  7. searchable: 2,
  8. filterable: 1,
  9. multi: 1,
  10. url: '/x/bu/pagesheet/list?_all=1&append=1&channel=fyclass&listpage=1&offset=((fypage-1)*21)&pagesize=21&iarea=-1',
  11. 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}}',
  12. filter: 'H4sIAAAAAAAAA+1Y3U8aWRT/X+ZZEwYEtI9207Rp0r40+9CNDxM7G8laaZCamsYEinyoDYp1sa1I/aJSK4ita3Eo9J+Ze2fmv9g7yOWc22u3xJX0RZ7gd+ee7/M7h3mujE+EQ+O6cuOP58pf+qxyQ5kOR6LKgDKlPWaoQrOrxFhmv2e0yafnj025cCFmJSouzH4E/crcQBen+VoHH/Z1cVJq2kfzHFeVuTH35FxhaFbXIqCRnJ2YjV1JI0mWnUS5I2FQ7Ur2erxDHbT9FeE+wH0Y9wLuxbgKuCDfA7gH4epIF2dfET4M+DDGg4AHMR4APIBxP+B+N2JjA0p0pi+ZCo5cnCnXHpSpP3Ut+jSig07ruEGKSz3nysoc00SSywaVy3v2LochI/TFoZXPdWBIoJNokvqLDgz5JtVTYnA/wU2SL5CF/Q4M0TW/bpFSmnsPKivvzdYWL1MQktqg69xACBXdTNi1Je4OlIaz+YHkmhxH7mdrpFrkOPJoc5W+LnEcXLJeZsFIFXyy9nPkrIFSxPGPRboY43gQ6Z1Hzw9fN98lm+9xeCb0S5kyOvvkfzTf4pHVPJD7ZvGYfFuXmk/oG9XDPqguExV7O4bOAurFTdu+B9kR2989+1FNsyMVEUF8hcby+MyDzC9ba8I9FOLMa9NYwPogwwJdtO9BVTDHRTtRpbKG/M5OkCmwR/sMcVw2RZY/YZlwZsfi1kIa34NysEvfIJsIrtZI82/xltsfqFiuG7vnxp7RIiE9OtuX1naDdM23l0rLuBaJhsNTv5JxtYiuoWwVauSl0XO2SCrJbkjrDl0v0cKhvO4c7lutrNTpJHlqNjj5DV3hOMBLAeJozMNQYCK1IetSq86bD5LRjHlpng8VlIGVonWYkwMSX2KjQVrGnMoamPKDLQfVqDh5gjjcpF6Xtyi6tU02uhMAyS+8Mw0DbUv8+WzZWknJW5rI7CiSjWWSrP93Pt0hd00OlyOHidDko/78GUJbAqaG7+brtP4M6Yvtk8zH3pmh9JlUeNugnlz7ArC3T0Tkw51xERGJFfqTAnVa87T6T8+WeAZ95FNccnxoMAAwWBIcHAEY7FY9DDUbJbO+KK+zybJg1TmjtCvmUXg83J+CEWk5FI1ooUkdxyltkFdxmj/rOU6jozelIJGNpru1FmpAQ+D37dH7PE4qsvPe7btyftuE5ezknPgriXTvPPidy/H7ELlmd6yTHeEO0wPqH/52C2DoHzvZsqtHdvqAZE5lBiYrGbNZoAWDFnmPBS6uQv/VzT1mjDV/KsWPjV5n9113mwZ8r2V+fSuVIJsQNJ+WjRZmAX5/YBpLUiLYrIVJBvxon+yw2SEPGpYDmLX4dUDzgG5npEyKbwPQnrGepDAP2/09NvcvaIIuCAgUAAA=',
  13. headers: {
  14. 'User-Agent': 'okhttp/4.12.0'
  15. },
  16. timeout: 5000,
  17. cate_exclude: '会员|游戏|全部',
  18. class_name: '精选&电视剧&电影&综艺&动漫&少儿&纪录片',
  19. class_url: 'choice&tv&movie&variety&cartoon&child&doco',
  20. limit: 20,
  21. play_parse:true,
  22. // play_parse:true,
  23. lazy: $js.toString(() => {
  24. let d = [];
  25. // 发起请求并解析返回的 JSON 数据
  26. let response = JSON.parse(request("http://39.104.230.177:1122/lxjx/myyk.php?url=" + input));
  27. // 获取所有字段名
  28. let keys = Object.keys(response);
  29. // 查找以 'url' 开头的字段名
  30. let urlKey = keys.find(key => key.startsWith('url'));
  31. // 提取对应的值
  32. let url = urlKey ? response[urlKey] : null;
  33. if (url) {
  34. // 处理 url,或将其用于 input
  35. input = {
  36. url: url,
  37. parse: 0,
  38. header: rule.headers
  39. };
  40. } else {
  41. // 处理没有找到 url 字段的情况
  42. console.error("没有找到以 'url' 开头的字段");
  43. }
  44. setResult(d);
  45. }),
  46. 推荐: '.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
  47. 一级: '.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
  48. 二级: $js.toString(() => {
  49. VOD = {};
  50. let d = [];
  51. let video_list = [];
  52. let video_lists = [];
  53. let list = [];
  54. let QZOutputJson;
  55. let html = fetch(input, fetch_params);
  56. let sourceId = /get_playsource/.test(input) ? input.match(/id=(\d*?)&/)[1] : input.split("cid=")[1];
  57. let cid = sourceId;
  58. let detailUrl = "https://v.%71%71.com/detail/m/" + cid + ".html";
  59. log("详情页:" + detailUrl);
  60. pdfh = jsp.pdfh;
  61. pd = jsp.pd;
  62. try {
  63. let json = JSON.parse(html);
  64. VOD = {
  65. vod_url: input,
  66. vod_name: json.c.title,
  67. type_name: json.typ.join(","),
  68. vod_actor: json.nam.join(","),
  69. vod_year: json.c.year,
  70. vod_content: json.c.description,
  71. vod_remarks: json.rec,
  72. vod_pic: urljoin2(input, json.c.pic)
  73. }
  74. } catch (e) {
  75. log("解析片名海报等基础信息发生错误:" + e.message)
  76. }
  77. if (/get_playsource/.test(input)) {
  78. eval(html);
  79. let indexList = QZOutputJson.PlaylistItem.indexList;
  80. indexList.forEach(function (it) {
  81. 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";
  82. eval(fetch(dataUrl, fetch_params));
  83. let vdata = QZOutputJson.PlaylistItem.videoPlayList;
  84. vdata.forEach(function (item) {
  85. d.push({
  86. title: item.title,
  87. pic_url: item.pic,
  88. desc: item.episode_number + "\t\t\t播放量:" + item.thirdLine,
  89. url: item.playUrl
  90. })
  91. });
  92. video_lists = video_lists.concat(vdata)
  93. })
  94. } else {
  95. let json = JSON.parse(html);
  96. video_lists = json.c.video_ids;
  97. let url = "https://v.qq.com/x/cover/" + sourceId + ".html";
  98. if (video_lists.length === 1) {
  99. let vid = video_lists[0];
  100. url = "https://v.qq.com/x/cover/" + cid + "/" + vid + ".html";
  101. d.push({
  102. title: "在线播放",
  103. url: url
  104. })
  105. } else if (video_lists.length > 1) {
  106. for (let i = 0; i < video_lists.length; i += 30) {
  107. video_list.push(video_lists.slice(i, i + 30))
  108. }
  109. video_list.forEach(function (it, idex) {
  110. 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(",");
  111. let o_html = fetch(o_url, fetch_params);
  112. eval(o_html);
  113. QZOutputJson.results.forEach(function (it1) {
  114. it1 = it1.fields;
  115. let url = "https://v.qq.com/x/cover/" + cid + "/" + it1.vid + ".html";
  116. d.push({
  117. title: it1.title,
  118. pic_url: it1.pic160x90.replace("/160", ""),
  119. desc: it1.video_checkup_time,
  120. url: url,
  121. type: it1.category_map && it1.category_map.length > 1 ? it1.category_map[1] : ""
  122. })
  123. })
  124. })
  125. }
  126. }
  127. let yg = d.filter(function (it) {
  128. return it.type && it.type !== "正片"
  129. });
  130. let zp = d.filter(function (it) {
  131. return !(it.type && it.type !== "正片")
  132. });
  133. VOD.vod_play_from = yg.length < 1 ? "腾讯视频" : "腾讯视频$$$腾讯视频 预告及花絮";
  134. VOD.vod_play_url = yg.length < 1 ? d.map(function (it) {
  135. return it.title + "$" + it.url
  136. }).join("#") : [zp, yg].map(function (it) {
  137. return it.map(function (its) {
  138. return its.title + "$" + its.url
  139. }).join("#")
  140. }).join("$$$");
  141. }),
  142. 搜索: $js.toString(() => {
  143. let d = [];
  144. pdfa = jsp.pdfa;
  145. pdfh = jsp.pdfh;
  146. pd = jsp.pd;
  147. let html = request(input);
  148. let baseList = pdfa(html, "body&&.result_item_v");
  149. log(baseList.length);
  150. baseList.forEach(function (it) {
  151. let longText = pdfh(it, ".result_title&&a&&Text");
  152. let shortText = pdfh(it, ".type&&Text");
  153. let fromTag = pdfh(it, ".result_source&&Text");
  154. let score = pdfh(it, ".figure_info&&Text");
  155. let content = pdfh(it, ".desc_text&&Text");
  156. // let url = pdfh(it, ".result_title&&a&&href");
  157. let url = pdfh(it, "div&&r-data");
  158. // log(longText);
  159. // log(shortText);
  160. // log('url:'+url);
  161. let img = pd(it, ".figure_pic&&src");
  162. url = "https://node.video.qq.com/x/api/float_vinfo2?cid=" + url.match(/.*\/(.*?)\.html/)[1];
  163. log(shortText + "|" + url);
  164. if (fromTag.match(/腾讯/)) {
  165. d.push({
  166. title: longText.split(shortText)[0],
  167. img: img,
  168. url: url,
  169. content: content,
  170. desc: shortText + " " + score
  171. })
  172. }
  173. });
  174. setResult(d);
  175. }),
  176. }