diff --git a/src/background/apis/videos.ts b/src/background/apis/videos.ts index ebf81689..4b97ef7e 100644 --- a/src/background/apis/videos.ts +++ b/src/background/apis/videos.ts @@ -63,6 +63,14 @@ export const setupVideosAPIs = () => { .then(data => data) .catch(error => console.error(error)) } + else if (message.contentScriptQuery === 'getAppRecommendVideos') { + const url = `https://app.bilibili.com/x/feed/index?build=1&idx=${message.idx}&appkey=27eb53fc9058f8c3&access_key=${message.accessKey}` + // const url = `https://app.bilibili.com/x/v2/feed/index?build=72100100&idx=${message.idx}&appkey=27eb53fc9058f8c3&access_key=${message.accessKey}` + return fetch(url) + .then(response => response.json()) + .then(data => data) + .catch(error => console.error(error)) + } // https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/video/info.md#%E8%8E%B7%E5%8F%96%E8%A7%86%E9%A2%91%E8%B6%85%E8%AF%A6%E7%BB%86%E4%BF%A1%E6%81%AFweb%E7%AB%AF else if (message.contentScriptQuery === 'getVideoInfo') { const url = `https://api.bilibili.com/x/web-interface/view/detail?${message.aid ? `aid=${message.aid}` : `bvid=${message.bvid}`}` diff --git a/src/components/Settings.vue b/src/components/Settings.vue index a9587899..3ff712b6 100644 --- a/src/components/Settings.vue +++ b/src/components/Settings.vue @@ -183,7 +183,30 @@ function changeThemeColor(color: string) { /> -