From 2738e5d0c0d6219bc11ffed2dba8cebfa5efbe83 Mon Sep 17 00:00:00 2001 From: JimmyLv Date: Thu, 2 Mar 2023 14:18:28 +0800 Subject: [PATCH] feat: add bili url log --- pages/api/summarize.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pages/api/summarize.ts b/pages/api/summarize.ts index 88a700a4..8a5e422a 100644 --- a/pages/api/summarize.ts +++ b/pages/api/summarize.ts @@ -26,12 +26,11 @@ export default async function handler( } try { - const response = await fetch( - `https://api.bilibili.com/x/web-interface/view?bvid=${bvId}`, - { - method: "GET", - } - ); + const requestUrl = `https://api.bilibili.com/x/web-interface/view?bvid=${bvId}`; + console.log(`fetch`, requestUrl); + const response = await fetch(requestUrl, { + method: "GET", + }); const res = await response.json(); // @ts-ignore const title = res.data?.title; @@ -43,7 +42,6 @@ export default async function handler( subtitleList.find(({ lan }: { lan: string }) => lan === "zh-CN") || subtitleList?.[0]; const subtitleUrl = betterSubtitle?.subtitle_url; - console.log("bvid", bvId); console.log("subtitle_url", subtitleUrl); const subtitleResponse = await fetch(subtitleUrl);