蓝莓短剧.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1.  
  2. var rule = {
  3. title: '蓝莓短剧',
  4. host: 'https://app.whjzjx.cn',
  5. url: '/v1/theater/home_page?theater_class_id=1&class2_id=fyclass&page_num=fypage&page_size=24',
  6. searchUrl: '/?**',
  7. searchable: 2,
  8. quickSearch: 1,
  9. // filterable: 1,
  10. class_name: '古装&穿越&逆袭&重生',
  11. class_url: '5&17&7&6',
  12. 一级: $js.toString(() => {
  13. let d = [];
  14. let urlk = `https://app.whjzjx.cn/v1/theater/home_page?theater_class_id=${MY_CATE}&page_num=${MY_PAGE - 1}&page_size=24`;
  15. let tkurl = 'https://app.whjzjx.cn/v1/account/login';
  16. let head = JSON.parse(post(tkurl, {
  17. headers: {
  18. "Connection": "keep-alive",
  19. "Content-Type": "application/x-www-form-urlencoded",
  20. "Content-Length": "40",
  21. "user-agent": "okhttp/4.10.0",
  22. "user_agent": "Mozilla/5.0 (Linux; Android 9; ASUS_I003DD Build/PI; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.70 Mobile Safari/537.36",
  23. "Host": "app.whjzjx.cn",
  24. "Accept-Encoding": "gzip"
  25. },
  26. body: "device=20caaae96b3443174bf4ebdbdcc253776"
  27. })).data.token;
  28. let header={"authorization":head};
  29. let html = JSON.parse(request(urlk, {
  30. headers: header
  31. }));
  32. let bata = html.data.list;
  33. bata.forEach(it => {
  34. let id = 'https://app.whjzjx.cn/v2/theater_parent/detail?theater_parent_id=' + it.theater.id;
  35. d.push({
  36. url: id,
  37. title: it.theater.title,
  38. img: it.theater.cover_url,
  39. desc: it.theater.total + "集",
  40. content: "播放量:" + it.theater.play_amount_str,
  41. });
  42. });
  43. setResult(d);
  44. }),
  45. 二级: $js.toString(() => {
  46. let urls = [];
  47. let tkurl = 'https://app.whjzjx.cn/v1/account/login';
  48. let head = JSON.parse(post(tkurl, {
  49. headers: {
  50. "Connection": "keep-alive",
  51. "Content-Type": "application/x-www-form-urlencoded",
  52. "Content-Length": "40",
  53. "user-agent": "okhttp/4.10.0",
  54. "user_agent": "Mozilla/5.0 (Linux; Android 9; ASUS_I003DD Build/PI; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.70 Mobile Safari/537.36",
  55. "Host": "app.whjzjx.cn",
  56. "Accept-Encoding": "gzip"
  57. },
  58. body: "device=20caaae96b3443174bf4ebdbdcc253776"
  59. })).data.token;
  60. let header={"authorization":head};
  61. let data = JSON.parse(request(input, {
  62. headers: header
  63. })).data;
  64. //console.log(data);
  65. data.theaters.forEach(it => {
  66. urls.push("第" + it.num + "集" + '$' + it.son_video_url);
  67. });
  68. VOD = {
  69. vod_name: data.title,
  70. vod_pic: data.cover_url,
  71. vod_remarks: data.total + "集",
  72. vod_play_from: 'XT短剧',
  73. vod_play_url: urls.join('#')
  74. };
  75. }),
  76. 搜索: $js.toString(() => {
  77. let d = [];
  78. let ht = input.match(/\?(.*)/)[1];
  79. let ser = "https://app.whjzjx.cn/v2/search";
  80. let tkurl = 'https://app.whjzjx.cn/v1/account/login';
  81. let head = JSON.parse(post(tkurl, {
  82. headers: {
  83. "Connection": "keep-alive",
  84. "Content-Type": "application/x-www-form-urlencoded",
  85. "Content-Length": "40",
  86. "user-agent": "okhttp/4.10.0",
  87. "user_agent": "Mozilla/5.0 (Linux; Android 9; ASUS_I003DD Build/PI; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.70 Mobile Safari/537.36",
  88. "Host": "app.whjzjx.cn",
  89. "Accept-Encoding": "gzip"
  90. },
  91. body: "device=20caaae96b3443174bf4ebdbdcc253776"
  92. })).data.token;
  93. let header={"authorization":head};
  94. let html = JSON.parse(post(ser, {
  95. headers: header,
  96. body: "text=" + ht
  97. }));
  98. let bata = html.data.search_data;
  99. bata.forEach(it => {
  100. let id = 'https://app.whjzjx.cn/v2/theater_parent/detail?theater_parent_id=' + it.id;
  101. d.push({
  102. url: id,
  103. title: it.title,
  104. img: it.cover_url,
  105. desc: it.score_str + "|" + it.total + "集",
  106. });
  107. });
  108. setResult(d);
  109. }),
  110. };
  111.