mirror of
https://github.com/imsyy/DailyHotApi.git
synced 2026-01-12 13:14:55 +08:00
feat: 调整bilibili参数
This commit is contained in:
@@ -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: {
|
||||||
|
|||||||
@@ -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}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user