Update gqcq.js

This commit is contained in:
smallfawn
2023-03-20 10:33:27 +08:00
committed by GitHub
parent 3226826a6f
commit 569ceac80f

15
gqcq.js
View File

@@ -97,6 +97,10 @@ class UserInfo {
"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
"Content-Type": "application/x-www-form-urlencoded", "Content-Type": "application/x-www-form-urlencoded",
} }
this.randomTime1 = randomInt(2000,9000)
this.randomTime2 = randomInt(11000,19000)
} }
getSign(ts, reqNonc) { getSign(ts, reqNonc) {
let salt = '17aaf8118ffb270b766c6d6774317a133.8.0' let salt = '17aaf8118ffb270b766c6d6774317a133.8.0'
@@ -214,6 +218,8 @@ class UserInfo {
if (result.data[0].finishedNum == 0) { if (result.data[0].finishedNum == 0) {
DoubleLog(`账号[${this.index}] 签到状态: 未签到,去执行签到 ,顺便抽个奖`); DoubleLog(`账号[${this.index}] 签到状态: 未签到,去执行签到 ,顺便抽个奖`);
await this.task_signin(); await this.task_signin();
await $.wait(this.randomTime1)
DoubleLog(`随机延迟${this.randomTime1}ms`)
await this.task_lottery(); await this.task_lottery();
} else if (result.data[0].finishedNum == 1) { } else if (result.data[0].finishedNum == 1) {
DoubleLog(`账号[${this.index}] 签到状态:今天已经签到过了鸭,明天再来吧!`); DoubleLog(`账号[${this.index}] 签到状态:今天已经签到过了鸭,明天再来吧!`);
@@ -224,6 +230,8 @@ class UserInfo {
DoubleLog(`账号[${this.index}] 发帖:${result.data[1].finishedNum} / ${result.data[1].total}`); DoubleLog(`账号[${this.index}] 发帖:${result.data[1].finishedNum} / ${result.data[1].total}`);
DoubleLog(`账号[${this.index}] 发帖:执行第一次发帖,评论,删除评论`); DoubleLog(`账号[${this.index}] 发帖:执行第一次发帖,评论,删除评论`);
await this.post_topic(); await this.post_topic();
await $.wait(this.randomTime2)
DoubleLog(`随机延迟${this.randomTime2}ms`)
DoubleLog(`账号[${this.index}] 发帖:执行第二次发帖,评论,删除评论`); DoubleLog(`账号[${this.index}] 发帖:执行第二次发帖,评论,删除评论`);
await this.post_topic(); await this.post_topic();
} else if (result.data[1].finishedNum == 2) { } else if (result.data[1].finishedNum == 2) {
@@ -234,6 +242,8 @@ class UserInfo {
if (result.data[3].finishedNum < 2) { if (result.data[3].finishedNum < 2) {
DoubleLog(`账号[${this.index}] 分享状态:${result.data[3].finishedNum} / ${result.data[3].total}`); DoubleLog(`账号[${this.index}] 分享状态:${result.data[3].finishedNum} / ${result.data[3].total}`);
await this.task_share(); await this.task_share();
await $.wait(this.randomTime2)
DoubleLog(`随机延迟${this.randomTime2}ms`)
await this.task_share(); await this.task_share();
} else if (result.data[3].finishedNum == 2) { } else if (result.data[3].finishedNum == 2) {
DoubleLog(`账号[${this.index}] 今天已经分享过了鸭,明天再来吧!`); DoubleLog(`账号[${this.index}] 今天已经分享过了鸭,明天再来吧!`);
@@ -303,7 +313,8 @@ class UserInfo {
if (result.errorCode == 20000) { if (result.errorCode == 20000) {
DoubleLog(`账号[${this.index}] 发布帖子:${result.errorMessage} ,帖子ID: ${result.data.postId}`); DoubleLog(`账号[${this.index}] 发布帖子:${result.errorMessage} ,帖子ID: ${result.data.postId}`);
let topic_id = result.data.postId; let topic_id = result.data.postId;
$.wait(10000) await $.wait(this.randomTime2)
DoubleLog(`随机延迟${this.randomTime2}ms`)
await this.add_comment(topic_id); await this.add_comment(topic_id);
} else { } else {
@@ -326,6 +337,8 @@ class UserInfo {
//console.log(result); //console.log(result);
if (result.errorCode == 20000) { if (result.errorCode == 20000) {
DoubleLog(`账号[${this.index}] 评论帖子: 评论 ${topic_id} 帖子 ${result.errorMessage}`); DoubleLog(`账号[${this.index}] 评论帖子: 评论 ${topic_id} 帖子 ${result.errorMessage}`);
await $.wait(this.randomTime2)
DoubleLog(`随机延迟${this.randomTime2}ms`)
await this.delete_topic(topic_id); await this.delete_topic(topic_id);
} else { } else {
DoubleLog(`账号[${this.index}] 评论帖子失效,原因未知!`); DoubleLog(`账号[${this.index}] 评论帖子失效,原因未知!`);