* 获取腾讯视频任务列表 * @async * @function readTxspTaskList * @returns
()
| 257 | * @returns |
| 258 | */ |
| 259 | async function readTxspTaskList() { |
| 260 | let opt = { |
| 261 | url: `https://vip.video.qq.com/rpc/trpc.new_task_system.task_system.TaskSystem/ReadTaskList?rpc_data=%7B%22business_id%22:%221%22,%22platform%22:5%7D`, |
| 262 | headers: { |
| 263 | referer: "https://film.video.qq.com/x/grade/?ptag=user.apho&ovscroll=0&hidetitlebar=1&aid=V0$$1:0$2:7$3:8.11.01.25068$4:0$8:4&isDarkMode=1&uiType=REGULAR", |
| 264 | cookie: txspCookie |
| 265 | } |
| 266 | }; |
| 267 | return await $.fetch(opt).then(response => { |
| 268 | try { |
| 269 | const obj = $.toObj(response.body) |
| 270 | var code = obj.ret; |
| 271 | let task_maintitle = ""; |
| 272 | if (code === 0) { |
| 273 | month_received_score = obj.limit_info.month_received_score; |
| 274 | month_limit = obj.limit_info.month_limit; |
| 275 | let taskList = obj.task_list; |
| 276 | let txspCheckInTask = taskList && taskList.find(task => task.task_maintitle === "VIP会员每日签到"); |
| 277 | isTxspCheckIn = txspCheckInTask.task_status; |
| 278 | } else { |
| 279 | $.log(`获取腾讯视频任务列表失败,异常详细信息如下\n${data}`); |
| 280 | } |
| 281 | } catch (e) { |
| 282 | $.logErr(e, response) |
| 283 | } |
| 284 | }) |
| 285 | } |
| 286 | |
| 287 | |
| 288 | /** |
no test coverage detected