更新知乎日报

This commit is contained in:
allen.zhou
2024-04-30 15:58:44 +08:00
parent 5555cc6f00
commit 8e077640b1

View File

@@ -1,4 +1,3 @@
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
import type { RouterData } from "../types.js";
import type { RouterType } from "../router.types.js";
import { get } from "../utils/getData.js";
@@ -20,13 +19,13 @@ export const handleRoute = async (_: undefined, noCache: boolean) => {
};
const getList = async (noCache: boolean) => {
const url = `https://news-at.zhihu.com/api/4/news/latest`;
const url = `https://daily.zhihu.com/api/4/news/latest`;
const result = await get({
url,
noCache,
headers: {
Referer: "https://news-at.zhihu.com/api/4/news/latest",
Host: "news-at.zhihu.com",
Referer: "https://daily.zhihu.com/api/4/news/latest",
Host: "daily.zhihu.com",
},
});
const list = result.data.stories.filter((el: RouterType["zhihu-daily"]) => el.type === 0);