Skip to content

Commit 513d1a8

Browse files
author
ziye12
authored
Update qqreads.js
1 parent a8e28ec commit 513d1a8

File tree

1 file changed

+37
-44
lines changed

1 file changed

+37
-44
lines changed

Task/qqreads.js

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ var tz=''
8181
console.log(`\n========= 脚本执行时间(TM):${new Date(new Date().getTime() + 0 * 60 * 60 * 1000).toLocaleString('zh', {hour12: false})} =========\n`)
8282

8383
const logs = 0; //0为关闭日志,1为开启
84-
const notifyInterval=1
84+
const notifyInterval=2
8585
//0为关闭通知,1为所有通知,2为宝箱领取成功通知,3为宝箱每15次通知一次
8686

8787

@@ -173,48 +173,7 @@ if (isGetCookie = typeof $request !== 'undefined') {
173173
$.index = i + 1;
174174
console.log(`-------------------------\n\n开始【企鹅读书${$.index}】`)
175175
}
176-
await all();
177-
await showmsg();
178-
179-
180-
}
181-
})()
182-
.catch((e) => $.logErr(e))
183-
.finally(() => $.done())
184-
185-
186-
187-
188-
function GetCookie() {
189-
if($request &&$request.url.indexOf("init")>=0) {
190-
191-
192-
const qqreadheaderVal = JSON.stringify($request.headers)
193-
if (qqreadheaderVal) $.setdata(qqreadheaderVal,'qqreadhd')
194-
$.log(`[${jsname}] 获取Cookie: 成功,qqreadheaderVal: ${qqreadheaderVal}`)
195-
$.msg(jsname, `获取cookie: 成功🎉`, ``)
196-
}
197-
198-
else if($request &&$request.url.indexOf("addReadTimeWithBid?")>=0) {
199-
const qqreadtimeurlVal = $request.url
200-
if (qqreadtimeurlVal) $.setdata(qqreadtimeurlVal,'qqreadtimeurl')
201-
$.log(`[${jsname}] 获取阅读时长url: 成功,qqreadtimeurlVal: ${qqreadtimeurlVal}`)
202-
203-
const qqreadtimeheaderVal = JSON.stringify($request.headers)
204-
if (qqreadtimeheaderVal) $.setdata(qqreadtimeheaderVal,'qqreadtimehd')
205-
$.log(`[${jsname}] 获取时长header: 成功,qqreadtimeheaderVal: ${qqreadtimeheaderVal}`)
206-
$.msg(jsname, `获取阅读时长cookie: 成功🎉`, ``)
207-
}
208-
}
209-
210-
211-
212-
213-
function all()
214-
215-
{
216-
217-
for(var i=0;i<16;i++)
176+
await for(var i=0;i<18;i++)
218177
{ (function(i) {
219178
setTimeout(function() {
220179

@@ -267,6 +226,11 @@ qqreadwktime();//周时长查询
267226
else if (i==15)
268227
qqreadpick();//领周时长奖励
269228

229+
else if (i==16)
230+
showmsg();//通知
231+
232+
else if (i==17)
233+
$.done();//结束
270234

271235
}
272236

@@ -276,9 +240,37 @@ qqreadpick();//领周时长奖励
276240

277241

278242

279-
}
243+
};
244+
245+
246+
}
247+
})()
248+
.catch((e) => $.logErr(e))
249+
.finally(() => $.done())
250+
251+
252+
253+
254+
function GetCookie() {
255+
if($request &&$request.url.indexOf("init")>=0) {
280256

281257

258+
const qqreadheaderVal = JSON.stringify($request.headers)
259+
if (qqreadheaderVal) $.setdata(qqreadheaderVal,'qqreadhd')
260+
$.log(`[${jsname}] 获取Cookie: 成功,qqreadheaderVal: ${qqreadheaderVal}`)
261+
$.msg(jsname, `获取cookie: 成功🎉`, ``)
262+
}
263+
264+
else if($request &&$request.url.indexOf("addReadTimeWithBid?")>=0) {
265+
const qqreadtimeurlVal = $request.url
266+
if (qqreadtimeurlVal) $.setdata(qqreadtimeurlVal,'qqreadtimeurl')
267+
$.log(`[${jsname}] 获取阅读时长url: 成功,qqreadtimeurlVal: ${qqreadtimeurlVal}`)
268+
269+
const qqreadtimeheaderVal = JSON.stringify($request.headers)
270+
if (qqreadtimeheaderVal) $.setdata(qqreadtimeheaderVal,'qqreadtimehd')
271+
$.log(`[${jsname}] 获取时长header: 成功,qqreadtimeheaderVal: ${qqreadtimeheaderVal}`)
272+
$.msg(jsname, `获取阅读时长cookie: 成功🎉`, ``)
273+
}
282274
}
283275

284276

@@ -287,6 +279,7 @@ qqreadpick();//领周时长奖励
287279

288280

289281

282+
290283
//任务列表
291284
function qqreadtask() {
292285
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)