1 Star 1 Fork 109

gitpublic/GLaDOS-CheckIn-multi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
checkin.js 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
const axios = require("axios");
const checkIn = async (cookie) => {
return axios({
method: 'post',
url: 'https://glados.rocks/api/user/checkin',
data: {
token: "glados_network"
},
headers: {
cookie
}
})
}
const status = async (cookie) => {
return axios({
method: 'get',
url: 'https://glados.rocks/api/user/status',
headers: {
cookie
}
})
}
const server = (checkInMessage, leftDays) => {
return axios({
method: 'get',
url: `https://sc.ftqq.com/${SCKEY}.send`,
params: {
text: `${leftDays}天后到期,${checkInMessage}`
}
})
}
const GLaDOSCheckIn = async (cookie) => {
const checkInMessage = (await checkIn(cookie))?.data?.message;
const statusData = (await status(cookie))?.data?.data
const leftDays = parseInt(statusData?.leftDays);
console.log(statusData, leftDays, checkInMessage);
if (SCKEY) {
server(checkInMessage, leftDays);
}
}
const SCKEY = process.env.SCKEY;
const COOKIES = process.env.COOKIES;
const cookiesList = COOKIES.split('--分隔符--')
cookiesList.forEach(cookie=>{
GLaDOSCheckIn(cookie);
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/gitpublic/GLaDOS-CheckIn-multi.git
git@gitee.com:gitpublic/GLaDOS-CheckIn-multi.git
gitpublic
GLaDOS-CheckIn-multi
GLaDOS-CheckIn-multi
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385