* 获取腾讯体育任务列表 * @async * @function readTxSportsTaskList * @returns
()
| 372 | * @returns |
| 373 | */ |
| 374 | async function readTxSportsTaskList() { |
| 375 | let opt = { |
| 376 | url: `https://vip.video.qq.com/rpc/trpc.new_task_system.task_system.TaskSystem/ReadTaskList?rpc_data={"business_id":3,"channel_id":4,"platform":5}`, |
| 377 | headers: { |
| 378 | Referer: "https://film.video.qq.com/x/sports-grade/?ovscroll=0&hidetitlebar=1&immersive=1", |
| 379 | Cookie: txspCookie, |
| 380 | }, |
| 381 | }; |
| 382 | return await $.fetch(opt).then(response => { |
| 383 | try { |
| 384 | const obj = $.toObj(response.body) |
| 385 | var code = obj.ret; |
| 386 | let task_maintitle = ""; |
| 387 | if (code === 0) { |
| 388 | let taskList = obj.task_list; |
| 389 | let txSportsCheckInTasks = taskList && taskList.find(task => task.task_maintitle === "每日签到"); |
| 390 | isTxSportsCheckIn = txSportsCheckInTasks.task_status; |
| 391 | } else { |
| 392 | $.log(`获取腾讯视频任务列表失败,异常详细信息如下\n${data}`); |
| 393 | } |
| 394 | } catch (e) { |
| 395 | $.logErr(e, response) |
| 396 | } |
| 397 | }) |
| 398 | } |
| 399 | |
| 400 | /** |
| 401 | * 腾讯体育签到领取热爱值 |
no test coverage detected