|
| 1 | +// http://localhost:5757/api/星芽短剧?ac=list&t=1&pg=1 |
| 2 | +// http://localhost:5757/api/星芽短剧?ac=detail&ids=https://app.whjzjx.cn/v2/theater_parent/detail?theater_parent_id=3523 |
| 3 | +// http://localhost:5757/api/星芽短剧?wd=龙王&pg=1 |
| 4 | +// http://localhost:5757/api/星芽短剧?play=http://qcapp.xingya.com.cn/h265/wz_mp40905dingtianhou01.mp4?sign=4db245c4e9cd5bd3d3026e2e0f6147a6&t=674ee966&flag=星芽短剧 |
| 5 | +var rule = { |
| 6 | + 类型: '影视', |
| 7 | + title: '星芽短剧', |
| 8 | + desc: '星芽短剧纯js版本', |
| 9 | + homeUrl: 'https://app.whjzjx.cn', |
| 10 | + url: '', |
| 11 | + searchUrl: '/v3/search', |
| 12 | + searchable: 2, |
| 13 | + quickSearch: 0, |
| 14 | + headers: { |
| 15 | + 'User-Agent': 'okhttp/4.10.0', |
| 16 | + 'Accept-Encoding': 'gzip', |
| 17 | + 'x-app-id': '7', |
| 18 | + 'platform': '1', |
| 19 | + 'manufacturer': 'realme', |
| 20 | + 'version_name': '3.3.1', |
| 21 | + 'user_agent': 'Mozilla/5.0 (Linux; Android 9; RMX1931 Build/PQ3A.190605.05081124; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36', |
| 22 | + 'dev_token': 'BFdbZBGOEgG7QDt01ldOQNNfhO2F-rv4QcugZoFZm5_3DlPJEo_bSBeJ6dW2X3eKzxxKKWz3xJCM_u5PppGMqRuYPxcsVg9a-jriWiIoPZvHMSLbcbxTFuasqgTivTY3GabW1yP57LQSsJNQfKoX1BKYGHducrhb0bTwvigfn3gE*', |
| 23 | + 'app_version': '3.1.0.1', |
| 24 | + 'device_platform': 'android', |
| 25 | + 'personalized_recommend_status': '1', |
| 26 | + 'device_type': 'RMX1931', |
| 27 | + 'device_brand': 'realme', |
| 28 | + 'os_version': '9', |
| 29 | + 'channel': 'default', |
| 30 | + 'raw_channel': 'default', |
| 31 | + 'oaid': '', |
| 32 | + 'msa_oaid': '', |
| 33 | + 'uuid': 'randomUUID_8a0324bf-03c8-4789-8ef8-12d3bcff28f5', |
| 34 | + 'device_id': '24250683a3bdb3f118dff25ba4b1cba1a', |
| 35 | + 'ab_id': '', |
| 36 | + 'support_h265': '1' |
| 37 | + }, |
| 38 | + timeout: 5000, |
| 39 | + play_parse: true, |
| 40 | + class_parse: async () => { |
| 41 | + let classes = [{ |
| 42 | + type_id: '1', |
| 43 | + type_name: '剧场', |
| 44 | + }, { |
| 45 | + type_id: '2', |
| 46 | + type_name: '热播剧', |
| 47 | + }, { |
| 48 | + type_id: '8', |
| 49 | + type_name: '会员专享', |
| 50 | + }, { |
| 51 | + type_id: '7', |
| 52 | + type_name: '星选好剧', |
| 53 | + }, { |
| 54 | + type_id: '3', |
| 55 | + type_name: '新剧' |
| 56 | + }, { |
| 57 | + type_id: '5', |
| 58 | + type_name: '阳光剧场' |
| 59 | + }]; |
| 60 | + return { |
| 61 | + class: classes, |
| 62 | + } |
| 63 | + }, |
| 64 | + 预处理: async () => { |
| 65 | + let data = { |
| 66 | + 'device': '24250683a3bdb3f118dff25ba4b1cba1a', |
| 67 | + 'install_first_open': 'false', |
| 68 | + 'first_install_time': '1723214205125', |
| 69 | + 'last_update_time': '1723214205125', |
| 70 | + 'report_link_url': '' |
| 71 | + }; |
| 72 | + let html = JSON.parse((await req('https://u.shytkjgs.com/user/v1/account/login', { |
| 73 | + method: 'POST', |
| 74 | + headers: { |
| 75 | + 'User-Agent': 'okhttp/4.10.0', |
| 76 | + 'Accept-Encoding': 'gzip', |
| 77 | + 'Content-Type': 'application/x-www-form-urlencoded', |
| 78 | + 'x-app-id': '7', |
| 79 | + 'platform': '1', |
| 80 | + 'manufacturer': 'realme', |
| 81 | + 'version_name': '3.3.1', |
| 82 | + 'user_agent': 'Mozilla/5.0 (Linux; Android 9; RMX1931 Build/PQ3A.190605.05081124; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36', |
| 83 | + 'app_version': '3.3.1', |
| 84 | + 'device_platform': 'android', |
| 85 | + 'personalized_recommend_status': '1', |
| 86 | + 'device_type': 'RMX1931', |
| 87 | + 'device_brand': 'realme', |
| 88 | + 'os_version': '9', |
| 89 | + 'channel': 'default', |
| 90 | + 'raw_channel': 'default', |
| 91 | + 'oaid': '', |
| 92 | + 'msa_oaid': '', |
| 93 | + 'uuid': 'randomUUID_914e7a9b-deac-4f80-9247-db56669187df', |
| 94 | + 'device_id': '24250683a3bdb3f118dff25ba4b1cba1a', |
| 95 | + 'ab_id': '', |
| 96 | + 'support_h265': '1' |
| 97 | + }, |
| 98 | + data: data |
| 99 | + })).content) |
| 100 | + try { |
| 101 | + rule.headers['authorization'] = html.data.token |
| 102 | + } catch (e) { |
| 103 | + rule.headers['authorization'] = html.data.data.token |
| 104 | + } |
| 105 | + |
| 106 | + }, |
| 107 | + 推荐: async () => { |
| 108 | + return [] |
| 109 | + }, |
| 110 | + 一级: async function (tid, pg, filter, extend) { |
| 111 | + let {MY_CATE, input} = this; |
| 112 | + if (pg <= 0) pg = 1; |
| 113 | + const html = JSON.parse((await req(`${rule.homeUrl}/cloud/v2/theater/home_page?theater_class_id=${tid}&type=1&class2_ids=0&page_num=${pg}&page_size=24`, |
| 114 | + { |
| 115 | + method: 'get', |
| 116 | + headers: rule.headers |
| 117 | + })).content) |
| 118 | + let videos = []; |
| 119 | + const data = html.data.list |
| 120 | + log(data) |
| 121 | + data.forEach((it) => { |
| 122 | + videos.push({ |
| 123 | + title: it.theater.title, |
| 124 | + url: 'https://app.whjzjx.cn/v2/theater_parent/detail?theater_parent_id=' + it.theater.id, |
| 125 | + desc: it.total, |
| 126 | + pic_url: it.theater.cover_url, |
| 127 | + }) |
| 128 | + }) |
| 129 | + return setResult(videos) |
| 130 | + }, |
| 131 | + 二级: async function (ids) { |
| 132 | + let {input} = this; |
| 133 | + let html = JSON.parse((await req(input, { |
| 134 | + method: 'get', |
| 135 | + headers: rule.headers |
| 136 | + })).content); |
| 137 | + const data = html.data |
| 138 | + let vod = { |
| 139 | + vod_id: input, |
| 140 | + vod_name: data.theaters.son_title |
| 141 | + } |
| 142 | + const urls = [] |
| 143 | + let playFroms = []; |
| 144 | + let playUrls = []; |
| 145 | + data.theaters.forEach(it => { |
| 146 | + urls.push(it.num + '$' + encodeURIComponent(it.son_video_url)); |
| 147 | + }) |
| 148 | + playFroms.push('不知道倾情打造'); |
| 149 | + vod.vod_play_from = playFroms.join('$$$'); |
| 150 | + playUrls.push(urls.join('#')); |
| 151 | + vod.vod_play_url = playUrls.join('$$$'); |
| 152 | + return vod |
| 153 | + }, |
| 154 | + 搜索: async function (wd, quick, pg) { |
| 155 | + let {input} = this |
| 156 | + const text = {"text": wd} |
| 157 | + let html = JSON.parse((await req(`${rule.homeUrl}${input}`, { |
| 158 | + method: 'post', |
| 159 | + headers: rule.headers, |
| 160 | + data: text |
| 161 | + })).content); |
| 162 | + let videos = []; |
| 163 | + const data = html.data.theater.search_data |
| 164 | + data.forEach((it) => { |
| 165 | + videos.push({ |
| 166 | + title: it.title, |
| 167 | + url: 'https://app.whjzjx.cn/v2/theater_parent/detail?theater_parent_id=' + it.id, |
| 168 | + desc: it.total, |
| 169 | + pic_url: it.cover_url, |
| 170 | + }) |
| 171 | + }) |
| 172 | + return setResult(videos) |
| 173 | + }, |
| 174 | + lazy: async function (flag, id, flags) { |
| 175 | + let {input} = this; |
| 176 | + return {parse: 0, url: input, js: ''} |
| 177 | + }, |
| 178 | +}; |
0 commit comments