修复企鹅阅读的bug
This commit is contained in:
@@ -60,7 +60,7 @@ http-request https:\/\/mqqapi\.reader\.qq\.com\/mqq\/addReadTimeWithBid? script-
|
|||||||
|
|
||||||
const jsname = '企鹅读书'
|
const jsname = '企鹅读书'
|
||||||
const $ = Env(jsname)
|
const $ = Env(jsname)
|
||||||
let task = '', config, ssr2 = '', wktime;
|
let task = '', config, ssr2 = '', wktime, day = 0;
|
||||||
console.log(`\n========= 脚本执行时间(TM):${new Date(new Date().getTime() + 0 * 60 * 60 * 1000).toLocaleString('zh', {hour12: false})} =========\n`)
|
console.log(`\n========= 脚本执行时间(TM):${new Date(new Date().getTime() + 0 * 60 * 60 * 1000).toLocaleString('zh', {hour12: false})} =========\n`)
|
||||||
|
|
||||||
const logs = 1; //0为关闭日志,1为开启
|
const logs = 1; //0为关闭日志,1为开启
|
||||||
@@ -186,58 +186,73 @@ async function QQ_READ() {
|
|||||||
qqreadtimeurlVal = QQ_READ_COOKIES[i]['qqreadtimeurlVal'];
|
qqreadtimeurlVal = QQ_READ_COOKIES[i]['qqreadtimeurlVal'];
|
||||||
qqreadtimeheaderVal = QQ_READ_COOKIES[i]['qqreadtimeheaderVal'];
|
qqreadtimeheaderVal = QQ_READ_COOKIES[i]['qqreadtimeheaderVal'];
|
||||||
await qqreadinfo();//用户名
|
await qqreadinfo();//用户名
|
||||||
|
await qqreadwktime();//周时长查询
|
||||||
await qqreadtrack();
|
await qqreadtrack();
|
||||||
// await $.wait(2000)
|
|
||||||
await qqreadconfig();//时长查询
|
await qqreadconfig();//时长查询
|
||||||
// await $.wait(2000)
|
|
||||||
await qqreadtask();//任务列表
|
await qqreadtask();//任务列表
|
||||||
|
if (config.data.pageParams.todayReadSeconds / 3600 <= maxtime) {
|
||||||
|
await qqreadtime();// 上传时长
|
||||||
|
}
|
||||||
|
await qqreadpick();//领周时长奖励
|
||||||
if (task.data.taskList[0].doneFlag == 0) {
|
if (task.data.taskList[0].doneFlag == 0) {
|
||||||
// await $.wait(2000)
|
|
||||||
await qqreaddayread();//阅读任务
|
await qqreaddayread();//阅读任务
|
||||||
}
|
}
|
||||||
if (task.data.taskList[2].doneFlag == 0) {
|
if (task.data.taskList[1].doneFlag == 0) {
|
||||||
// await $.wait(2000)
|
await $.wait(5000)
|
||||||
await qqreadsign();//金币签到
|
await qqreadssr1();//阅读金币1
|
||||||
// await $.wait(2000)
|
}
|
||||||
await qqreadtake();//阅豆签到
|
if (task.data.taskList[2].doneFlag == 0) {
|
||||||
// await $.wait(2000)
|
await qqreadsign();//金币签到
|
||||||
await qqreadsign2();//签到翻倍
|
await qqreadtake();//阅豆签到
|
||||||
|
}
|
||||||
|
if (task.data.taskList[3].doneFlag == 0) {
|
||||||
|
await qqreadvideo();//视频奖励
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.data.treasureBox.doneFlag == 0) {
|
if (task.data.treasureBox.doneFlag == 0) {
|
||||||
// await $.wait(2000)
|
|
||||||
await qqreadbox();//宝箱
|
await qqreadbox();//宝箱
|
||||||
}
|
}
|
||||||
if (task.data.taskList[1].doneFlag == 0) {
|
if (task.data.taskList[1].doneFlag == 0) {
|
||||||
// await $.wait(2000)
|
await $.wait(5000)
|
||||||
await qqreadssr1();//阅读金币1
|
|
||||||
await $.wait(3000)
|
|
||||||
await qqreadssr2();//阅读金币2
|
await qqreadssr2();//阅读金币2
|
||||||
|
}
|
||||||
|
if (task.data.taskList[2].doneFlag == 0) {
|
||||||
|
await qqreadsign2();//金币签到
|
||||||
|
}
|
||||||
|
|
||||||
|
if (task.data.treasureBox.videoDoneFlag == 0) {
|
||||||
|
await qqreadbox2();//宝箱翻倍
|
||||||
|
}
|
||||||
|
if (task.data.taskList[1].doneFlag == 0) {
|
||||||
await $.wait(5000)
|
await $.wait(5000)
|
||||||
await qqreadssr3();//阅读金币3
|
await qqreadssr3();//阅读金币3
|
||||||
}
|
}
|
||||||
if (task.data.taskList[3].doneFlag == 0) {
|
if (task.data.user.amount >= 100000) {
|
||||||
// await $.wait(2000)
|
await qqreadwithdraw();
|
||||||
await qqreadvideo();//视频奖励
|
|
||||||
}
|
}
|
||||||
if (task.data.treasureBox.videoDoneFlag == 0) {
|
|
||||||
// await $.wait(2000)
|
|
||||||
await qqreadbox2();//宝箱翻倍
|
|
||||||
}
|
|
||||||
if (config.data.pageParams.todayReadSeconds / 3600 <= maxtime) {
|
|
||||||
// await $.wait(2000)
|
|
||||||
await qqreadtime();
|
|
||||||
}
|
|
||||||
|
|
||||||
await qqreadwktime();//周时长查询
|
|
||||||
await qqreadpick();//领周时长奖励
|
|
||||||
await showmsg();//通知
|
await showmsg();//通知
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function showmsg() {
|
function showmsg() {
|
||||||
$.msg(jsname, "", tz); // 宝箱每15次通知一次
|
$.msg(jsname, "", tz); // 宝箱每15次通知一次
|
||||||
}
|
}
|
||||||
|
//提现
|
||||||
|
function qqreadwithdraw() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const toqqreadwithdrawurl = {
|
||||||
|
url: "https://mqqapi.reader.qq.com/mqq/red_packet/user/withdraw?amount=100000",
|
||||||
|
headers: JSON.parse(qqreadtimeheaderVal),
|
||||||
|
timeout: 60000,
|
||||||
|
};
|
||||||
|
$.post(toqqreadwithdrawurl, (error, response, data) => {
|
||||||
|
if (logs) $.log(`${jsname}, 提现: ${data}`);
|
||||||
|
let withdraw = JSON.parse(data);
|
||||||
|
if (withdraw.data.code == 0)
|
||||||
|
tz += `【现金提现】:成功提现10元\n`;
|
||||||
|
kz += `【现金提现】:成功提现10元\n`;
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
// 任务列表
|
// 任务列表
|
||||||
function qqreadtask() {
|
function qqreadtask() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@@ -384,10 +399,9 @@ function qqreadssr1() {
|
|||||||
let ssr1 = JSON.parse(data);
|
let ssr1 = JSON.parse(data);
|
||||||
if (ssr1.data.amount > 0)
|
if (ssr1.data.amount > 0)
|
||||||
tz += `【阅读金币1】获得${ssr1.data.amount}金币\n`;
|
tz += `【阅读金币1】获得${ssr1.data.amount}金币\n`;
|
||||||
|
|
||||||
resolve();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -406,9 +420,10 @@ function qqreadssr2() {
|
|||||||
if (ssr2.data.amount > 0)
|
if (ssr2.data.amount > 0)
|
||||||
tz += `【阅读金币2】获得${ssr2.data.amount}金币\n`;
|
tz += `【阅读金币2】获得${ssr2.data.amount}金币\n`;
|
||||||
|
|
||||||
resolve();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,9 +442,10 @@ function qqreadssr3() {
|
|||||||
if (ssr3.data.amount > 0)
|
if (ssr3.data.amount > 0)
|
||||||
tz += `【阅读金币3】获得${ssr3.data.amount}金币\n`;
|
tz += `【阅读金币3】获得${ssr3.data.amount}金币\n`;
|
||||||
|
|
||||||
resolve();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1010,6 +1010,7 @@ function CreateTuan() {
|
|||||||
async function joinLeaderTuan() {
|
async function joinLeaderTuan() {
|
||||||
await updateTuanIds();
|
await updateTuanIds();
|
||||||
if (!$.tuanIdS) await updateTuanIdsCDN();
|
if (!$.tuanIdS) await updateTuanIdsCDN();
|
||||||
|
if (!$.tuanIdS) await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateFactoryTuanId.json');
|
||||||
for (let tuanId of $.tuanIdS.tuanIds) {
|
for (let tuanId of $.tuanIdS.tuanIds) {
|
||||||
if (!tuanId) continue
|
if (!tuanId) continue
|
||||||
await JoinTuan(tuanId);
|
await JoinTuan(tuanId);
|
||||||
@@ -1184,7 +1185,7 @@ function updateTuanIds(url = 'https://raw.githubusercontent.com/lxk0301/updateTe
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
function updateTuanIdsCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateFactoryTuanId.json') {
|
function updateTuanIdsCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateFactoryTuanId.json') {
|
||||||
return new Promise(resolve => {
|
return new Promise(async resolve => {
|
||||||
$.get({url}, (err, resp, data) => {
|
$.get({url}, (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -1198,6 +1199,8 @@ function updateTuanIdsCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/mast
|
|||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
await $.wait(3000)
|
||||||
|
resolve();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function checkExchange() {
|
function checkExchange() {
|
||||||
|
@@ -29,6 +29,7 @@ async function main() {
|
|||||||
if ($.body) {
|
if ($.body) {
|
||||||
eval($.body);
|
eval($.body);
|
||||||
}
|
}
|
||||||
|
$.done()
|
||||||
}
|
}
|
||||||
function updateShareCodes(url = 'https://raw.githubusercontent.com/yangtingxiao/QuantumultX/master/scripts/jd/jd_lotteryMachine.js') {
|
function updateShareCodes(url = 'https://raw.githubusercontent.com/yangtingxiao/QuantumultX/master/scripts/jd/jd_lotteryMachine.js') {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
@@ -48,7 +49,7 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/yangtingxiao/
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
function updateShareCodesCDN(url = 'https://raw.fastgit.org/yangtingxiao/QuantumultX/master/scripts/jd/jd_lotteryMachine.js') {
|
function updateShareCodesCDN(url = 'https://raw.fastgit.org/yangtingxiao/QuantumultX/master/scripts/jd/jd_lotteryMachine.js') {
|
||||||
return new Promise(resolve => {
|
return new Promise(async resolve => {
|
||||||
$.get({url}, async (err, resp, data) => {
|
$.get({url}, async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -63,6 +64,8 @@ function updateShareCodesCDN(url = 'https://raw.fastgit.org/yangtingxiao/Quantum
|
|||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
await $.wait(3000)
|
||||||
|
resolve();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -158,6 +158,7 @@ async function doChannelsListTask(taskId, taskType) {
|
|||||||
async function helpFriends() {
|
async function helpFriends() {
|
||||||
await updateInviteCode();
|
await updateInviteCode();
|
||||||
if (!$.inviteCodes) await updateInviteCodeCDN();
|
if (!$.inviteCodes) await updateInviteCodeCDN();
|
||||||
|
if (!$.inviteCodes) await updateInviteCodeCDN('https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateSmallHomeInviteCode.json');
|
||||||
for (let item of $.inviteCodes.inviteCode) {
|
for (let item of $.inviteCodes.inviteCode) {
|
||||||
if (!item) continue
|
if (!item) continue
|
||||||
await createAssistUser(item, $.createAssistUserID || "1318106976846299138");
|
await createAssistUser(item, $.createAssistUserID || "1318106976846299138");
|
||||||
@@ -711,7 +712,7 @@ function updateInviteCode(url = 'https://raw.githubusercontent.com/lxk0301/updat
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
function updateInviteCodeCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateSmallHomeInviteCode.json') {
|
function updateInviteCodeCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateSmallHomeInviteCode.json') {
|
||||||
return new Promise(resolve => {
|
return new Promise(async resolve => {
|
||||||
$.get({url}, async (err, resp, data) => {
|
$.get({url}, async (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -726,6 +727,8 @@ function updateInviteCodeCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/m
|
|||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
await $.wait(3000)
|
||||||
|
resolve();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function taskUrl(url, body = {}) {
|
function taskUrl(url, body = {}) {
|
||||||
|
Reference in New Issue
Block a user