Update qtx.js

This commit is contained in:
smallfawn
2023-04-13 14:04:32 +08:00
committed by GitHub
parent fe2539adff
commit 521491b8b4

23
qtx.js
View File

@@ -4,7 +4,7 @@
* 2023/04/12 * 2023/04/12
* ========= 青龙--配置文件 =========== * ========= 青龙--配置文件 ===========
* # 项目名称 * # 项目名称
* export qtx_data='token' * export qtxtk='token'
* *
* 多账号用 换行 或 @ 分割 * 多账号用 换行 或 @ 分割
* 抓包 carbon.lcago.cn 这个域名 请求体 的body部分的 token 和 deviceCoding * 抓包 carbon.lcago.cn 这个域名 请求体 的body部分的 token 和 deviceCoding
@@ -51,6 +51,9 @@ async function start() {
await $.wait(user.randomTime); await $.wait(user.randomTime);
taskall.push(await user.get_cal()); taskall.push(await user.get_cal());
await $.wait(user.randomTime); await $.wait(user.randomTime);
if (user.calIdArr.length !== 0) {
console.log(`未收取精力列表${user.calIdArr}`);
}
for (let l = 0; l < user.calIdArr.length; l++) { for (let l = 0; l < user.calIdArr.length; l++) {
taskall.push(await user.do_cal(user.calIdArr[l])); taskall.push(await user.do_cal(user.calIdArr[l]));
await $.wait(user.randomTime); await $.wait(user.randomTime);
@@ -78,13 +81,11 @@ class UserInfo {
this.answer = '' this.answer = ''
this.calIdArr = [] this.calIdArr = []
this.headers = { this.headers = {
'Content-Type': 'application/json; charset=utf-8', 'Content-Type': 'application/json; charset=utf-8',
'Host': 'carbon.lcago.cn', 'Host': 'carbon.lcago.cn',
'Connection': 'Keep-Alive', 'Connection': 'Keep-Alive',
//'Accept-Encoding': 'gzip', //'Accept-Encoding': 'gzip',
'User-Agent': 'okhttp/3.12.' 'User-Agent': 'okhttp/3.12.'
} }
this.randomTime = this.getRandomTime() this.randomTime = this.getRandomTime()
@@ -203,10 +204,10 @@ class UserInfo {
if (result.data.dataList.length != 0) { if (result.data.dataList.length != 0) {
for (let i = 0; i < result.data.dataList.length; i++) { for (let i = 0; i < result.data.dataList.length; i++) {
this.calIdArr[i] = result.data.dataList[i].id; this.calIdArr[i] = result.data.dataList[i].id;
console.log(`未收取精力ID为${this.calIdArr[i]}`); //console.log(`未收取精力ID为${this.calIdArr[i]}`);
} }
} }
else console.log("获取未收取精力失败"); else { console.log("未收取精力") }
} else { } else {
DoubleLog(`账号[${this.index}] 获取精力失效,原因未知!`); DoubleLog(`账号[${this.index}] 获取精力失效,原因未知!`);
console.log(result); console.log(result);
@@ -304,13 +305,23 @@ async function notice() {
try { try {
let options = { let options = {
url: `https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/api/main/notice.json`, url: `https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/api/main/notice.json`,
headers: {}, headers: {
'User-Agent': ''
},
} }
//console.log(options); //console.log(options);
let result = await httpRequest(options); let result = await httpRequest(options);
//console.log(result); //console.log(result);
if (result) { if (result) {
if ('notice' in result) {
DoubleLog(`${result.notice}`); DoubleLog(`${result.notice}`);
} else {
options.url = `https://gitee.com/smallfawn/api/raw/master/notice.json`
result = await httpRequest(options);
if ('notice' in result) {
DoubleLog(`${result.notice}`);
}
}
} else { } else {
} }
} catch (e) { } catch (e) {