MCPcopy Create free account
hub / github.com/ClydeTime/Surge / txspCheckIn

Function txspCheckIn

Script/Task/videoqq.js:294–322  ·  view source on GitHub ↗

* 腾讯视频签到领取V力值 * @async * @function txspCheckIn * @returns

()

Source from the content-addressed store, hash-verified

292 * @returns
293 */
294async function txspCheckIn() {
295 let opt = {
296 url: `https://vip.video.qq.com/rpc/trpc.new_task_system.task_system.TaskSystem/CheckIn?rpc_data==%7B%7D`,
297 headers: {
298 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",
299 Cookie: txspCookie
300 }
301 };
302 return await $.fetch(opt).then(response => {
303 try {
304 const obj = $.toObj(response.body);
305 var code = obj.ret;
306 let message;
307 if (code === 0 && obj.check_in_score != undefined) {
308 message = `签到成功:获得${obj.check_in_score}V力值`
309 $.log(message);
310 } else if (code === -2002) {
311 message = `今天已签到, 明日再来吧`
312 $.log(message);
313 } else {
314 message = `签到失败, 异常详细信息请查看日志\n`;
315 $.log(`签到失败,异常详细信息如下\n${obj.msg}`);
316 }
317 $.taskInfo += message + `\n`;
318 } catch (e) {
319 $.logErr(e, response)
320 }
321 })
322}
323
324/**
325 * 观看60分钟任务签到请求

Callers 1

videoqq.jsFile · 0.85

Calls 4

fetchMethod · 0.45
toObjMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected