-
Notifications
You must be signed in to change notification settings - Fork 284
Expand file tree
/
Copy pathphp.js
More file actions
76 lines (76 loc) · 1.93 KB
/
php.js
File metadata and controls
76 lines (76 loc) · 1.93 KB
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
/*
@header({
searchable: 1,
filterable: 0,
quickSearch: 0,
title: '',
'类型': '影视',
lang: 'ds'
})
*/
// php@@{"host":"https://jingyu4k-1312635929.cos.ap-nanjing.myqcloud.com/1.json"}@@php测试
var rule = {
类型: '影视',
title: '',
host: '',
url: '',
searchUrl: '',
headers: {'User-Agent': 'UC_UA'},
searchable: 1,
quickSearch: 0,
filterable: 0,
double: true,
play_parse: true,
limit: 6,
class_name: '电影&电视剧&动漫&短剧&综艺',
class_url: '1&2&3&4&5',
hostJs: async function () {
let {HOST} = this;
return await request(HOST);
},
预处理: async function () {
log('rule.params:', rule.params);
try {
let extObject = JSON5.parse(rule.params);
log('extObject:', extObject);
} catch (err) {
// log('[ERR] extObject:', err);
log(`[ERR] extObject: ${err.message}`);
}
},
class_parse: async function () {
let {input, pdfa, pdfh, pd} = this;
return {}
},
lazy: async function () {
let {input} = this;
return input
},
推荐: async function () {
let {input, pdfa, pdfh, pd, getProxyUrl} = this;
let d = [];
let url = getProxyUrl();
log('url:', getProxyUrl());
let html = await request(url, {withHeaders: true, redirect: 0});
log('html:', html);
return setResult(d)
},
一级: async function () {
let {input, pdfa, pdfh, pd} = this;
let d = [];
return setResult(d)
},
二级: async function () {
let {input, pdfa, pdfh, pd} = this;
let VOD = {};
return VOD
},
搜索: async function () {
let {input, pdfa, pdfh, pd} = this;
let d = [];
return setResult(d)
},
proxy_rule: async function () {
return [302, 'text/html', '', {Location: 'https://www.baidu.com'}]
}
}