mirror of
https://github.com/imsyy/DailyHotApi.git
synced 2026-01-12 21:24:55 +08:00
更新知乎日报
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
|
||||||
import type { RouterData } from "../types.js";
|
import type { RouterData } from "../types.js";
|
||||||
import type { RouterType } from "../router.types.js";
|
import type { RouterType } from "../router.types.js";
|
||||||
import { get } from "../utils/getData.js";
|
import { get } from "../utils/getData.js";
|
||||||
@@ -20,13 +19,13 @@ export const handleRoute = async (_: undefined, noCache: boolean) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getList = async (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({
|
const result = await get({
|
||||||
url,
|
url,
|
||||||
noCache,
|
noCache,
|
||||||
headers: {
|
headers: {
|
||||||
Referer: "https://news-at.zhihu.com/api/4/news/latest",
|
Referer: "https://daily.zhihu.com/api/4/news/latest",
|
||||||
Host: "news-at.zhihu.com",
|
Host: "daily.zhihu.com",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const list = result.data.stories.filter((el: RouterType["zhihu-daily"]) => el.type === 0);
|
const list = result.data.stories.filter((el: RouterType["zhihu-daily"]) => el.type === 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user