lanmei.js 4.4 KB

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