shawenguan 1 an în urmă
părinte
comite
6edd3e06da
1 a modificat fișierele cu 22 adăugiri și 22 ștergeri
  1. 22 22
      Scripts/bilibili/bilibiliHelper.js

+ 22 - 22
Scripts/bilibili/bilibiliHelper.js

@@ -277,7 +277,7 @@ async function getAuthCode() {
     }
     return await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body.code === 0 && body.message === "0") {
                 magicJS.logger.info("- 获取auth_code成功")
                 return body.data.auth_code
@@ -307,7 +307,7 @@ async function loginConfirm(auth_code) {
     }
     return await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body.code === 0 && body.message === "0") {
                 magicJS.logger.info("- 确认登录成功")
                 return true
@@ -340,7 +340,7 @@ async function getAccessKey(auth_code) {
     }
     return await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body.code === 0 && body.message === "0") {
                 magicJS.logger.info("- 获取access_key成功")
                 return body.data.access_token
@@ -386,7 +386,7 @@ async function watch(aid, bvid, cid) {
             body: magicJS.objToQueryStr(body)
         }
         await magicJS.http.get(myRequest).then(response => {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0) {
                 magicJS.logger.info(`- 累计观看(登录)次数 ${(config.watch.num || 0) + 1}`)
                 config.user.num = (config.user.num || 0) + 1
@@ -437,7 +437,7 @@ async function share(aid, cid, short_link) {
             body: magicJS.objToQueryStr(Object.fromEntries(new Map(Array.from(Object.entries(body)).sort())))
         }
         await magicJS.http.get(myRequest).then(response => {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0) {
                 config.share.num = (config.share.num || 0) + 1
                 magicJS.logger.info("- 分享成功")
@@ -482,7 +482,7 @@ async function coin() {
             }
             await magicJS.http.get(myRequest).then(async response => {
                 try {
-                    const body = magicJS.toObj(response.body)
+                    const body = response.body;
                     if (body?.code === 0 && body?.message === "0") {
                         magicJS.logger.info("- 投币成功")
                         config.user.money -= 1
@@ -518,7 +518,7 @@ async function getFavUid() {
     }
     return await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             let like_uid_list = new Array()
             if (body?.code === 0) {
                 magicJS.logger.info("- 获取关注列表成功")
@@ -551,7 +551,7 @@ async function getFavAid(arr) {
     }
     return await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0) {
                 magicJS.logger.info("- 获取投币视频成功")
                 let vlist = body.data?.list?.vlist
@@ -589,7 +589,7 @@ async function silver2coin() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            let result = magicJS.toObj(response.body)
+            let result = response.body;
             let title = `银瓜子转硬币`;
             // 兑换成功
             if (result && result.code === 0) {
@@ -631,7 +631,7 @@ async function liveSign() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            let body = magicJS.toObj(response.body)
+            let body = response.body;
             if (body?.code === 0) {
                 magicJS.logger.info("- 签到成功")
                 magicJS.logger.info(`签到奖励:${body.data.text},连续签到${body.data.hadSignDays}天`)
@@ -663,7 +663,7 @@ async function vipScoreSign() {
             }
             await magicJS.http.get(myRequest).then(response => {
                 try {
-                    const body = magicJS.toObj(response.body)
+                    const body = response.body;
                     if (body?.code === 0 && body?.message === "success") {
                         magicJS.logger.info("- 签到成功")
                         config.score.time = startTime
@@ -707,7 +707,7 @@ async function vipExtraEx() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0 && body?.message === "0") {
                 magicJS.logger.info("- 成功获得10经验值")
             } else {
@@ -732,7 +732,7 @@ async function vipScoreGo() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0 && body?.message === "SUCCESS") {
                 magicJS.logger.info("- 成功获得10点大积分")
             } else {
@@ -754,7 +754,7 @@ async function vipScoreFan() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0 && body?.message === "success") {
                 magicJS.logger.info("- 成功获得10点大积分")
             } else {
@@ -776,7 +776,7 @@ async function vipScoreMovie() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0 && body?.message === "success") {
                 magicJS.logger.info("- 成功获得10点大积分")
             } else {
@@ -804,7 +804,7 @@ async function vipScoreDress() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0 && body?.message === "success") {
                 magicJS.logger.info("- 成功获得10点大积分")
             } else {
@@ -842,7 +842,7 @@ async function vipWatchAccept() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0 && body?.message === "success") {
                 magicJS.logger.info("- 大会员观看剧集任务接取成功, 需自行观看")
             } else {
@@ -870,7 +870,7 @@ async function vipPrivilege(type) {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0) {
                 switch (type) {
                     case 1:
@@ -931,7 +931,7 @@ async function Charge(mid, bp_num) {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0) {
                 if (body?.data?.status === 4) {
                     if (mid === config.user.mid) {
@@ -965,7 +965,7 @@ async function me() {
     }
     return await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code) {
                 magicJS.logger.info("- ❌❌获得用户信息失败(请更新cookie)")
                 magicJS.data.write("bilibili_daily_bonus", null)
@@ -1027,7 +1027,7 @@ async function queryStatus() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.code === 0) {
                 if (body.data.login) {
                     magicJS.logger.info("- 今日已登录")
@@ -1098,7 +1098,7 @@ async function dynamic() {
     }
     await magicJS.http.get(myRequest).then(response => {
         try {
-            const body = magicJS.toObj(response.body)
+            const body = response.body;
             if (body?.data?.cards) {
                 cards = body.data.cards
                 const { user, watch, share } = config