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

Method art_list

gqftbz.js:508–540  ·  view source on GitHub ↗

* 帖子列表 *

()

Source from the content-addressed store, hash-verified

506 *
507 */
508 async art_list() {
509 try {
510 let bodydata = { queryPostType: "NEWEST", pageNo: 1, pageSize: 20 };
511 let options = {
512 url: `https://gw.nevapp.gtmc.com.cn/main/api/community/post/page`,
513 headers: this.getHeadersPost_h5(),
514 body: JSON.stringify(bodydata),
515 },
516 result = await httpRequest(options);
517 //console.log(options);
518 //console.log(result);
519 if (result.header.code == "10000000") {
520 for (let i = 0; i < 10; i++) {
521 DoubleLog(`账号[${this.index}] 文章 [${result.body.list[i].id}]`);
522 let artId = result.body.list[i].id;
523 //DoubleLog('开始浏览')
524 await $.wait(5000);
525 await this.task_read(artId);
526 //DoubleLog('开始点赞')
527 await $.wait(5000);
528 await this.task_like(artId);
529 //DoubleLog('开始分享')
530 await $.wait(5000);
531 await this.task_share(artId);
532 }
533 } else {
534 DoubleLog(`账号[${this.index}] 获取帖子列表:失败 ❌ 了呢,原因未知!`);
535 console.log(result);
536 }
537 } catch (e) {
538 console.log(e);
539 }
540 }
541 async refresh_token() {
542 let headers = this.getHeadersPost_android()
543 headers['DeviceId'] = '417d0945-b207-44ea-b185-c5673d268b81'

Callers 2

refresh_tokenMethod · 0.95
startFunction · 0.45

Calls 8

getHeadersPost_h5Method · 0.95
task_readMethod · 0.95
task_likeMethod · 0.95
task_shareMethod · 0.95
httpRequestFunction · 0.70
DoubleLogFunction · 0.70
waitMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected