This commit is contained in:
smallfawn
2023-06-30 13:56:29 +08:00
parent 48d3ad9346
commit 628c328ed4
4 changed files with 1090 additions and 1090 deletions

82
alyp.js
View File

@@ -37,33 +37,33 @@ class UserInfo {
if (tgLogFlag) { if (tgLogFlag) {
try { try {
this.mopenid = str.split("##")[0] this.mopenid = str.split("##")[0]
this.chatId = str.split("##")[1] this.chatId = str.split("##")[1]
this.ck = str this.ck = str
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
} }
} }
async refresh() { async refresh() {
let name = "更新token"; let name = "更新token";
let options = { let options = {
method: "post", method: "post",
url: `https://auth.aliyundrive.com/v2/account/token`, url: `https://auth.aliyundrive.com/v2/account/token`,
headers: { headers: {
"Host": "auth.aliyundrive.com", "Host": "auth.aliyundrive.com",
"accept": "application/json", "accept": "application/json",
"content-type": "application/json; charset\u003dUTF-8", "content-type": "application/json; charset\u003dUTF-8",
}, },
body: `{"grant_type":"refresh_token","refresh_token":"${this.ck}"}` body: `{"grant_type":"refresh_token","refresh_token":"${this.ck}"}`
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.status == 'enabled') { if (res.status == 'enabled') {
this.token = res.access_token this.token = res.access_token
this.nick_name= res.nick_name this.nick_name = res.nick_name
// this.cusLog(`账号 ${this.index} ${name}: 更新token `) // this.cusLog(`账号 ${this.index} ${name}: 更新token `)
await this.sign() await this.sign()
} else this.cusLog(`账号[${this.nick_name}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.nick_name}] ${name} 失败 ❌ 了呢`), console.log(res);
} }
async sign() { async sign() {
@@ -72,48 +72,48 @@ class UserInfo {
method: "post", method: "post",
url: `https://member.aliyundrive.com/v1/activity/sign_in_list`, url: `https://member.aliyundrive.com/v1/activity/sign_in_list`,
headers: { headers: {
"Host": "member.aliyundrive.com", "Host": "member.aliyundrive.com",
"authorization": `Bearer ${this.token}`, "authorization": `Bearer ${this.token}`,
"accept": "application/json", "accept": "application/json",
"Content-Type": "application/json; charset\u003dUTF-8", "Content-Type": "application/json; charset\u003dUTF-8",
}, },
body: `{"isReward":false}` body: `{"isReward":false}`
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.success == true) { if (res.success == true) {
this.id = res.result.signInCount this.id = res.result.signInCount
var o = this.id - 1 var o = this.id - 1
this.cusLog(`账号 [${this.nick_name} ] \n ${name}: 成功 \n ${res.result.signInLogs[o].calendarChinese} \n ${res.result.signInLogs[o].reward.notice} `) this.cusLog(`账号 [${this.nick_name} ] \n ${name}: 成功 \n ${res.result.signInLogs[o].calendarChinese} \n ${res.result.signInLogs[o].reward.notice} `)
await this.reward() await this.reward()
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
} }
async reward() { async reward() {
let name = "领取"; let name = "领取";
let options = { let options = {
method: "post", method: "post",
url: `https://member.aliyundrive.com/v1/activity/sign_in_reward`, url: `https://member.aliyundrive.com/v1/activity/sign_in_reward`,
headers: { headers: {
"Host": "member.aliyundrive.com", "Host": "member.aliyundrive.com",
"authorization": `Bearer ${this.token}`, "authorization": `Bearer ${this.token}`,
"accept": "application/json", "accept": "application/json",
"Content-Type": "application/json; charset\u003dUTF-8", "Content-Type": "application/json; charset\u003dUTF-8",
}, },
body: `{"signInDay":${this.id}}` body: `{"signInDay":${this.id}}`
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.success == true) { if (res.success == true) {
this.cusLog(` ${res.result.description} `) this.cusLog(` ${res.result.description} `)
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
} }
@@ -157,7 +157,7 @@ class UserInfo {
// 入口 // 入口
!(async () => { !(async () => {
const notify = require("./sendNotify"); const notify = require("./sendNotify");
// $.doubleLog(await $.yiyan()); // $.doubleLog(await $.yiyan());
let users = await getUsers(CK_NAME, async (index, element) => { let users = await getUsers(CK_NAME, async (index, element) => {
let userInfo = new UserInfo(index, element); let userInfo = new UserInfo(index, element);
return userInfo; return userInfo;

1730
htx.js

File diff suppressed because it is too large Load Diff

326
jetta.js

File diff suppressed because one or more lines are too long

42
ylnn.js
View File

@@ -22,7 +22,7 @@ const $ = new Env("伊利牛奶")
const CK_NAME = "ylnn" const CK_NAME = "ylnn"
const Notify = 1 // 通知控制 const Notify = 1 // 通知控制
const tgLogFlag = 1 // 是否tg发送通知, 偷撸车使用, 默认0--不发送 const tgLogFlag = 1 // 是否tg发送通知, 偷撸车使用, 默认0--不发送
let msg = '' let msg = ''
//=========================================================================== //===========================================================================
//=========================================================================== //===========================================================================
@@ -30,7 +30,7 @@ let msg = ''
async function main(userInfo) { async function main(userInfo) {
await userInfo.sign() await userInfo.sign()
await userInfo.point() await userInfo.point()
@@ -55,48 +55,48 @@ class UserInfo {
async sign() { async sign() {
let name = "签到"; let name = "签到";
let options = { let options = {
method: "post", method: "post",
url: `https://msmarket.msx.digitalyili.com/gateway/api/member/daily/sign`, url: `https://msmarket.msx.digitalyili.com/gateway/api/member/daily/sign`,
headers: { headers: {
"Host": "msmarket.msx.digitalyili.com", "Host": "msmarket.msx.digitalyili.com",
"charset": "utf-8", "charset": "utf-8",
"content-type": "application/json", "content-type": "application/json",
"access-token": `${this.ck}` "access-token": `${this.ck}`
}, },
body: `{}` body: `{}`
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.status == true) { if (res.status == true) {
this.cusLog(`账号 ${this.index} : 签到成功`) this.cusLog(`账号 ${this.index} : 签到成功`)
} else if (res.status == false) { } else if (res.status == false) {
this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`) this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`)
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
} }
async point() { async point() {
let name = "个人信息"; let name = "个人信息";
let options = { let options = {
method: "get", method: "get",
url: `https://msmarket.msx.digitalyili.com/gateway/api/member/point`, url: `https://msmarket.msx.digitalyili.com/gateway/api/member/point`,
headers: { headers: {
"Host": "msmarket.msx.digitalyili.com", "Host": "msmarket.msx.digitalyili.com",
"charset": "utf-8", "charset": "utf-8",
"content-type": "application/json", "content-type": "application/json",
"access-token": `${this.ck}` "access-token": `${this.ck}`
} }
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.status == true) { if (res.status == true) {
this.cusLog(`账号 ${this.index} 总积分 : ${res.data} `) this.cusLog(`账号 ${this.index} 总积分 : ${res.data} `)
} else if (res.status == false) { } else if (res.status == false) {
this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`) this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`)
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);