-
Notifications
You must be signed in to change notification settings - Fork 159
/
Copy path_fq3.js
43 lines (42 loc) · 1.42 KB
/
_fq3.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
const {getIp} = await $.import('http://127.0.0.1:5757/public/ip.js');
const rule = {
类型: '小说',
title: '番茄小说[书]',
desc: '番茄小说纯js版本',
host: 'https://fanqienovel.com/',
homeUrl: 'https://fanqienovel.com/api/author/book/category_list/v0/',
url: '/api/author/library/book_list/v0/?page_count=18&page_index=(fypage-1)&gender=-1&category_id=fyclass&creation_status=-1&word_count=-1&sort=0#fyfilter',
class_parse: async () => {
log('Buffer:', typeof Buffer)
log('URLSearchParams:', typeof URLSearchParams)
log('axiosX', typeof axiosX);
// log('ip:', await getIp());
log(qs.stringify({a: 1, b: 2}))
let ck = (await axios({url: 'http://www.baidu.com'})).headers['set-cookie']
log(ck);
// log(cookieToJson(ck));
let ck_obj = COOKIE.parse(ck[0]);
log(ck_obj);
log(ck_obj.BAIDUID);
log(COOKIE.stringify("name", 'echo', {
httpOnly: true,
maxAge: 60 * 60 * 24 * 7, // 1 week
}));
},
headers: {
'User-Agent': 'PC_UA',
},
预处理: async () => {
},
一级: async function (tid, pg, filter, extend) {
},
二级: async function () {
return '这是二级:' + rule.title
},
搜索: async function () {
return '这是搜索:' + rule.title
},
lazy: async function () {
return template.getMubans()
},
};