-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
99 lines (95 loc) · 2.99 KB
/
index.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
const fetch = require('node-fetch')
const wanxiang = async () => {
const token = process.env.WANXIANG_TOKEN
const cookie = process.env.WANXIANG_COOKIE
if (!token || !cookie) return
console.log('通义万相 开始签到')
return fetch('https://wanxiang.aliyun.com/wanx/api/common/inspiration/dailySignReward', {
'headers': {
'accept': 'application/json, text/plain, */*',
'accept-language': 'zh-CN,zh;q=0.9',
'content-type': 'application/json',
'priority': 'u=1, i',
'sec-ch-ua': '"Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-site',
'x-platform': 'web',
'x-xsrf-token': token,
cookie
},
'referrer': 'https://tongyi.aliyun.com/wanxiang/',
'referrerPolicy': 'no-referrer-when-downgrade',
'body': '{}',
'method': 'POST',
'mode': 'cors',
'credentials': 'include'
})
.then(res => res.json())
.then(console.log)
.catch(console.log)
}
const yige = async () => {
const token = process.env.YIGE_TOKEN
const cookie = process.env.YIGE_COOKIE
if (!token || !cookie) return
console.log('文心一格 开始签到')
return fetch(`https://yige.baidu.com/api/t2p/points/task_complete?t=${+new Date}&appname=pc&ptask_type=6`, {
'headers': {
'accept': 'application/json, text/plain, */*',
'accept-language': 'zh-CN,zh;q=0.9',
'acs-token': token,
'content-type': '*/*',
'sec-ch-ua': '"Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin',
cookie
},
'referrer': 'https://yige.baidu.com/personal/center',
'referrerPolicy': 'strict-origin-when-cross-origin',
'body': null,
'method': 'GET',
'mode': 'cors',
'credentials': 'include'
})
.then(res => res.json())
.then(console.log)
.catch(console.log)
}
const keling = async () => {
const cookie = process.env.KELING_COOKIE
if (!cookie) return
console.log('可灵 开始签到')
return fetch(`https://klingai.kuaishou.com/api/user/profile`, {
"headers": {
"accept": "application/json, text/plain, */*",
"accept-language": "zh",
"sec-ch-ua": "\"Chromium\";v=\"130\", \"Google Chrome\";v=\"130\", \"Not?A_Brand\";v=\"99\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
cookie
},
"referrer": "https://klingai.kuaishou.com/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "include"
})
}
const main = async (sign) => {
return Object.keys(sign).map(key => sign[key]())
}
main({
wanxiang,
yige,
keling
})