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