feat: 调整bilibili参数

This commit is contained in:
helti
2025-02-05 21:49:02 +08:00
parent 212b58ada9
commit 6ce0f7d8b0
2 changed files with 4 additions and 5 deletions

View File

@@ -10,13 +10,12 @@ const typeMap: Record<string, string> = {
"3": "音乐", "3": "音乐",
"4": "游戏", "4": "游戏",
"5": "娱乐", "5": "娱乐",
"36": "科技", "188": "科技",
"119": "鬼畜", "119": "鬼畜",
"129": "舞蹈", "129": "舞蹈",
"155": "时尚", "155": "时尚",
"160": "生活", "160": "生活",
"168": "国创相关", "168": "国创相关",
"188": "数码",
"181": "影视", "181": "影视",
}; };
@@ -44,7 +43,7 @@ export const handleRoute = async (c: ListContext, noCache: boolean) => {
const getList = async (options: Options, noCache: boolean): Promise<RouterResType> => { const getList = async (options: Options, noCache: boolean): Promise<RouterResType> => {
const { type } = options; const { type } = options;
const wbiData = await getBiliWbi(); const wbiData = await getBiliWbi();
const url = `https://api.bilibili.com/x/web-interface/ranking/v2?tid=${type}&type=all&${wbiData}`; const url = `https://api.bilibili.com/x/web-interface/ranking/v2?rid=${type}&type=all&${wbiData}`;
const result = await get({ const result = await get({
url, url,
headers: { headers: {

View File

@@ -49,8 +49,8 @@ export const handleRoute = async (c: ListContext) => {
type: typeMap[type], type: typeMap[type],
params: { params: {
type: { type: {
name: typeMap[type], name: '排行榜分区',
type: type, type: typeMap,
}, },
}, },
link: `https://github.com/trending?since=${type}`, link: `https://github.com/trending?since=${type}`,