|
| 1 | +// http://localhost:5757/api/金牌影院?ac=list&t=1&pg=1 |
| 2 | +// http://localhost:5757/api/金牌影院?ac=detail&ids=/detail/131374 |
| 3 | +// http://localhost:5757/api/金牌影院?wd=我的&pg=1 |
| 4 | +// http://localhost:5757/api/金牌影院?play=&flag=金牌影院 |
| 5 | +var rule = { |
| 6 | + 类型: '影视', |
| 7 | + title: '金牌影院', |
| 8 | + desc: '金牌影院纯js版本', |
| 9 | + host: 'https://m.cfkj86.com/', |
| 10 | + homeUrl:'https://www.cfkj86.com', |
| 11 | + url: 'https://m.cfkj86.com/api/mw-movie/anonymous/video/list?pageNum=fypage&pageSize=30&sort=1&sortBy=1&type1=fyclass', |
| 12 | + searchUrl: '/api/mw-movie/anonymous/video/searchByWordPageable?keyword=**&pageNum=fypage&pageSize=12&type=false', |
| 13 | + searchable: 2, |
| 14 | + quickSearch: 0, |
| 15 | + timeout: 5000, |
| 16 | + play_parse: true, |
| 17 | + class_parse: async () => { |
| 18 | + let classes = [{ |
| 19 | + type_id: '1', |
| 20 | + type_name: '电影', |
| 21 | + },{ |
| 22 | + type_id: '2', |
| 23 | + type_name: '剧集', |
| 24 | + },{ |
| 25 | + type_id: '3', |
| 26 | + type_name: '综艺', |
| 27 | + },{ |
| 28 | + type_id: '4', |
| 29 | + type_name: '动漫', |
| 30 | + }]; |
| 31 | + return { |
| 32 | + class: classes, |
| 33 | + } |
| 34 | + }, |
| 35 | + 预处理: async () => { |
| 36 | + return [] |
| 37 | + }, |
| 38 | + 推荐: async () => { |
| 39 | + return [] |
| 40 | + }, |
| 41 | + 一级: async function (tid, pg, filter, extend) { |
| 42 | + let {MY_CATE, input} = this; |
| 43 | + if (pg <= 0) pg = 1; |
| 44 | + const t = new Date().getTime() |
| 45 | + const signkey = `pageNum=${pg}&pageSize=30&sort=1&sortBy=1&type1=${tid}&key=cb808529bae6b6be45ecfab29a4889bc&t=`+t |
| 46 | + const key = CryptoJS.SHA1(CryptoJS.MD5(signkey).toString()).toString() |
| 47 | + const html = JSON.parse((await req(`https://m.cfkj86.com/api/mw-movie/anonymous/video/list?pageNum=${pg}&pageSize=30&sort=1&sortBy=1&type1=${tid}`, |
| 48 | + { |
| 49 | + headers:{ |
| 50 | + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36', |
| 51 | + 'Accept': 'application/json, text/plain, */*', |
| 52 | + 'deviceId': misc.randUUID(), |
| 53 | + 'sign': key, |
| 54 | + 't': t |
| 55 | + } |
| 56 | + })).content); |
| 57 | + let d = []; |
| 58 | + const list = html.data.list |
| 59 | + list.forEach((it)=>{ |
| 60 | + d.push({ |
| 61 | + title: it.vodName, |
| 62 | + url: '/detail/'+it.vodId, |
| 63 | + desc: it.vodRemarks || '暂无更新', |
| 64 | + pic_url: it.vodPic, |
| 65 | + }) |
| 66 | + }) |
| 67 | + return setResult(d) |
| 68 | + }, |
| 69 | + 二级: async function (ids) { |
| 70 | + log(this) |
| 71 | + let {input} = this; |
| 72 | + const html = (await req(`${input}`)).content; |
| 73 | + const $ = pq(html) |
| 74 | + const vod = { |
| 75 | + vod_id: input, |
| 76 | + vod_name: $('h1').text().trim(), |
| 77 | + }; |
| 78 | + let playFroms = []; |
| 79 | + let playUrls = []; |
| 80 | + const temp = []; |
| 81 | + let playlist=$('div.main-list-sections__BodyArea-sc-8bb7334b-2 .listitem') |
| 82 | + for (const it of playlist) { |
| 83 | + const a = $(it).find('a')[0] |
| 84 | + temp.push(a.children[0].data+'$'+a.attribs.href) |
| 85 | + } |
| 86 | + playFroms.push('不知道倾情打造'); |
| 87 | + playUrls.push(temp.join('#')); |
| 88 | + vod.vod_play_from = playFroms.join('$$$'); |
| 89 | + vod.vod_play_url = playUrls.join('$$$'); |
| 90 | + |
| 91 | + return vod |
| 92 | + }, |
| 93 | + 搜索: async function (wd, quick, pg) { |
| 94 | + let {input} = this |
| 95 | + const t = new Date().getTime() |
| 96 | + //keyword=你&pageNum=1&pageSize=12&type=false&key=cb808529bae6b6be45ecfab29a4889bc&t=1722904806016 |
| 97 | + const signkey = 'keyword='+wd+'&pageNum='+pg+'&pageSize=12&type=false&key=cb808529bae6b6be45ecfab29a4889bc&t='+t |
| 98 | + const key = CryptoJS.SHA1(CryptoJS.MD5(signkey).toString()).toString() |
| 99 | + let html = JSON.parse((await req(`${rule.homeUrl}${input}`, |
| 100 | + { |
| 101 | + headers:{ |
| 102 | + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36', |
| 103 | + 'Accept': 'application/json, text/plain, */*', |
| 104 | + 'deviceId': misc.randUUID(), |
| 105 | + 'sign': key, |
| 106 | + 't': t |
| 107 | + } |
| 108 | + })).content); |
| 109 | + let d = []; |
| 110 | + const list = html.data.list |
| 111 | + list.forEach((it)=>{ |
| 112 | + d.push({ |
| 113 | + title: it.vodName, |
| 114 | + url: '/detail/'+it.vodId, |
| 115 | + desc: it.vodRemarks || '暂无更新', |
| 116 | + pic_url: it.vodPic, |
| 117 | + }) |
| 118 | + }) |
| 119 | + return setResult(d) |
| 120 | + }, |
| 121 | + lazy: async function (flag, id, flags) { |
| 122 | + let {input} = this; |
| 123 | + const pid = input.split('/')[3] |
| 124 | + const nid = input.split('/')[5] |
| 125 | + const t = new Date().getTime() |
| 126 | + const signkey = 'id='+pid+'&nid='+nid+'&key=cb808529bae6b6be45ecfab29a4889bc&t='+t |
| 127 | + const key = CryptoJS.SHA1(CryptoJS.MD5(signkey).toString()).toString() |
| 128 | + const relurl = rule.homeUrl+'/api/mw-movie/anonymous/v1/video/episode/url?id='+pid+'&nid='+nid |
| 129 | + const html = JSON.parse((await req(relurl, |
| 130 | + { |
| 131 | + headers:{ |
| 132 | + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36', |
| 133 | + 'Accept': 'application/json, text/plain, */*', |
| 134 | + 'deviceId': misc.randUUID(), |
| 135 | + 'sign': key, |
| 136 | + 't': t |
| 137 | + } |
| 138 | + })).content) |
| 139 | + return {parse: 0, url: html.data.playUrl, js: ''} |
| 140 | + }, |
| 141 | +}; |
| 142 | + |
0 commit comments