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