🐞 fix: 修复知乎字段变更 #98

This commit is contained in:
imsyy
2025-04-02 14:32:18 +08:00
parent 410d88860d
commit dddcb27487
4 changed files with 583 additions and 398 deletions

View File

@@ -95,6 +95,7 @@ export type RouterType = {
title: string;
excerpt: string;
created: number;
url: string;
};
children: [
{

View File

@@ -24,6 +24,7 @@ const getList = async (noCache: boolean) => {
...result,
data: list.map((v: RouterType["zhihu"]) => {
const data = v.target;
const questionId = data.url.split("/").pop();
return {
id: data.id,
title: data.title,
@@ -31,8 +32,8 @@ const getList = async (noCache: boolean) => {
cover: v.children[0].thumbnail,
timestamp: getTime(data.created),
hot: parseFloat(v.detail_text.split(" ")[0]) * 10000,
url: `https://www.zhihu.com/question/${data.id}`,
mobileUrl: `https://www.zhihu.com/question/${data.id}`,
url: `https://www.zhihu.com/question/${questionId}`,
mobileUrl: `https://www.zhihu.com/question/${questionId}`,
};
}),
};