mirror of
https://github.com/smallfawn/QLScriptPublic.git
synced 2025-12-17 15:25:10 +08:00
change
This commit is contained in:
82
alyp.js
82
alyp.js
@@ -37,33 +37,33 @@ class UserInfo {
|
||||
if (tgLogFlag) {
|
||||
try {
|
||||
this.mopenid = str.split("##")[0]
|
||||
this.chatId = str.split("##")[1]
|
||||
this.ck = str
|
||||
this.chatId = str.split("##")[1]
|
||||
this.ck = str
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
async refresh() {
|
||||
}
|
||||
async refresh() {
|
||||
let name = "更新token";
|
||||
let options = {
|
||||
method: "post",
|
||||
url: `https://auth.aliyundrive.com/v2/account/token`,
|
||||
headers: {
|
||||
"Host": "auth.aliyundrive.com",
|
||||
"accept": "application/json",
|
||||
"content-type": "application/json; charset\u003dUTF-8",
|
||||
},
|
||||
"Host": "auth.aliyundrive.com",
|
||||
"accept": "application/json",
|
||||
"content-type": "application/json; charset\u003dUTF-8",
|
||||
},
|
||||
body: `{"grant_type":"refresh_token","refresh_token":"${this.ck}"}`
|
||||
};
|
||||
// console.log(options);
|
||||
// console.log(options);
|
||||
let res = await httpRequest(options);
|
||||
// console.log(res);
|
||||
// console.log(res);
|
||||
if (res.status == 'enabled') {
|
||||
this.token = res.access_token
|
||||
this.nick_name= res.nick_name
|
||||
// this.cusLog(`账号 ${this.index} ${name}: 更新token `)
|
||||
await this.sign()
|
||||
this.token = res.access_token
|
||||
this.nick_name = res.nick_name
|
||||
// this.cusLog(`账号 ${this.index} ${name}: 更新token `)
|
||||
await this.sign()
|
||||
} else this.cusLog(`账号[${this.nick_name}] ${name} 失败 ❌ 了呢`), console.log(res);
|
||||
}
|
||||
async sign() {
|
||||
@@ -72,48 +72,48 @@ class UserInfo {
|
||||
method: "post",
|
||||
url: `https://member.aliyundrive.com/v1/activity/sign_in_list`,
|
||||
headers: {
|
||||
"Host": "member.aliyundrive.com",
|
||||
"authorization": `Bearer ${this.token}`,
|
||||
"accept": "application/json",
|
||||
"Content-Type": "application/json; charset\u003dUTF-8",
|
||||
},
|
||||
"Host": "member.aliyundrive.com",
|
||||
"authorization": `Bearer ${this.token}`,
|
||||
"accept": "application/json",
|
||||
"Content-Type": "application/json; charset\u003dUTF-8",
|
||||
},
|
||||
body: `{"isReward":false}`
|
||||
};
|
||||
// console.log(options);
|
||||
// console.log(options);
|
||||
let res = await httpRequest(options);
|
||||
// console.log(res);
|
||||
// console.log(res);
|
||||
if (res.success == true) {
|
||||
this.id = res.result.signInCount
|
||||
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} `)
|
||||
await this.reward()
|
||||
this.id = res.result.signInCount
|
||||
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} `)
|
||||
await this.reward()
|
||||
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
|
||||
}
|
||||
async reward() {
|
||||
}
|
||||
async reward() {
|
||||
let name = "领取";
|
||||
let options = {
|
||||
method: "post",
|
||||
url: `https://member.aliyundrive.com/v1/activity/sign_in_reward`,
|
||||
headers: {
|
||||
"Host": "member.aliyundrive.com",
|
||||
"authorization": `Bearer ${this.token}`,
|
||||
"accept": "application/json",
|
||||
"Content-Type": "application/json; charset\u003dUTF-8",
|
||||
},
|
||||
"Host": "member.aliyundrive.com",
|
||||
"authorization": `Bearer ${this.token}`,
|
||||
"accept": "application/json",
|
||||
"Content-Type": "application/json; charset\u003dUTF-8",
|
||||
},
|
||||
body: `{"signInDay":${this.id}}`
|
||||
};
|
||||
// console.log(options);
|
||||
// console.log(options);
|
||||
let res = await httpRequest(options);
|
||||
// console.log(res);
|
||||
// console.log(res);
|
||||
if (res.success == true) {
|
||||
|
||||
this.cusLog(` ${res.result.description} `)
|
||||
|
||||
|
||||
this.cusLog(` ${res.result.description} `)
|
||||
|
||||
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ class UserInfo {
|
||||
// 入口
|
||||
!(async () => {
|
||||
const notify = require("./sendNotify");
|
||||
// $.doubleLog(await $.yiyan());
|
||||
// $.doubleLog(await $.yiyan());
|
||||
let users = await getUsers(CK_NAME, async (index, element) => {
|
||||
let userInfo = new UserInfo(index, element);
|
||||
return userInfo;
|
||||
|
||||
42
ylnn.js
42
ylnn.js
@@ -22,7 +22,7 @@ const $ = new Env("伊利牛奶")
|
||||
const CK_NAME = "ylnn"
|
||||
const Notify = 1 // 通知控制
|
||||
const tgLogFlag = 1 // 是否tg发送通知, 偷撸车使用, 默认0--不发送
|
||||
let msg = ''
|
||||
let msg = ''
|
||||
//===========================================================================
|
||||
|
||||
//===========================================================================
|
||||
@@ -30,7 +30,7 @@ let msg = ''
|
||||
async function main(userInfo) {
|
||||
|
||||
await userInfo.sign()
|
||||
await userInfo.point()
|
||||
await userInfo.point()
|
||||
|
||||
|
||||
|
||||
@@ -55,48 +55,48 @@ class UserInfo {
|
||||
|
||||
|
||||
|
||||
async sign() {
|
||||
async sign() {
|
||||
let name = "签到";
|
||||
let options = {
|
||||
method: "post",
|
||||
url: `https://msmarket.msx.digitalyili.com/gateway/api/member/daily/sign`,
|
||||
headers: {
|
||||
"Host": "msmarket.msx.digitalyili.com",
|
||||
"charset": "utf-8",
|
||||
"content-type": "application/json",
|
||||
"access-token": `${this.ck}`
|
||||
},
|
||||
headers: {
|
||||
"Host": "msmarket.msx.digitalyili.com",
|
||||
"charset": "utf-8",
|
||||
"content-type": "application/json",
|
||||
"access-token": `${this.ck}`
|
||||
},
|
||||
body: `{}`
|
||||
};
|
||||
// console.log(options);
|
||||
// console.log(options);
|
||||
|
||||
let res = await httpRequest(options);
|
||||
// console.log(res);
|
||||
if (res.status == true) {
|
||||
this.cusLog(`账号 ${this.index} : 签到成功`)
|
||||
this.cusLog(`账号 ${this.index} : 签到成功`)
|
||||
} else if (res.status == false) {
|
||||
this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`)
|
||||
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
|
||||
}
|
||||
async point() {
|
||||
async point() {
|
||||
let name = "个人信息";
|
||||
let options = {
|
||||
method: "get",
|
||||
url: `https://msmarket.msx.digitalyili.com/gateway/api/member/point`,
|
||||
headers: {
|
||||
"Host": "msmarket.msx.digitalyili.com",
|
||||
"charset": "utf-8",
|
||||
"content-type": "application/json",
|
||||
"access-token": `${this.ck}`
|
||||
}
|
||||
|
||||
headers: {
|
||||
"Host": "msmarket.msx.digitalyili.com",
|
||||
"charset": "utf-8",
|
||||
"content-type": "application/json",
|
||||
"access-token": `${this.ck}`
|
||||
}
|
||||
|
||||
};
|
||||
// console.log(options);
|
||||
// console.log(options);
|
||||
|
||||
let res = await httpRequest(options);
|
||||
// console.log(res);
|
||||
if (res.status == true) {
|
||||
this.cusLog(`账号 ${this.index} 总积分 : ${res.data} `)
|
||||
this.cusLog(`账号 ${this.index} 总积分 : ${res.data} `)
|
||||
} else if (res.status == false) {
|
||||
this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`)
|
||||
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
|
||||
|
||||
Reference in New Issue
Block a user