Skip to content

Commit

Permalink
feat: add bili url log
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 2, 2023
1 parent 73e2741 commit 2738e5d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pages/api/summarize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

1 comment on commit 2738e5d

@vercel
Copy link

@vercel vercel bot commented on 2738e5d Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.