MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / browseTasks

Method browseTasks

wxapp/wps.js:515–536  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

513 }
514
515 async browseTasks() {
516 let outline;
517 try {
518 outline = await this.taskOutline();
519 } catch (e) {
520 $.log(`账号[${this.index}] 查询任务列表失败: ${e.message || e}`);
521 return;
522 }
523 const tasks = this.flattenTasks(outline).filter((t) => t.type === "browse" && Number(t.status || 0) !== 1);
524 if (!tasks.length) {
525 $.log(`账号[${this.index}] 暂无待完成浏览任务`);
526 return;
527 }
528 $.log(`账号[${this.index}] 待浏览任务: ${tasks.length}个`);
529 for (const task of tasks) {
530 try {
531 await this.doBrowseTask(task);
532 } catch (e) {
533 $.log(`账号[${this.index}] 浏览任务异常: ${e.message || e}`);
534 }
535 }
536 }
537
538 async tryLotteryOnce(index) {
539 const actCsrf = randomHex(16);

Callers 1

runMethod · 0.95

Calls 4

taskOutlineMethod · 0.95
flattenTasksMethod · 0.95
doBrowseTaskMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected