UNPKG

rsshub

Version:
23 lines (21 loc) 843 B
import { t as ofetch_default } from "./ofetch-BIyrKU3Y.mjs"; import { t as cache_default } from "./cache-Bo__VnGm.mjs"; //#region lib/routes/zhihu/xhu/auth.ts var auth_default = { getCookie: () => { return cache_default.tryGet("zhihu-xhu-cookie", async () => { const udidCookieArray = (await ofetch_default.raw("https://api.zhihuvvv.workers.dev/appcloud/v1/device", { method: "get", headers: { Referer: "https://api.zhihuvvv.workers.dev" } })).headers.getSetCookie(); const udidCookie = udidCookieArray.join("; "); return [...(await ofetch_default.raw("https://api.zhihuvvv.workers.dev/guests/token", { method: "get", headers: { Referer: "https://api.zhihuvvv.workers.dev", Cookie: udidCookie } })).headers.getSetCookie(), ...udidCookieArray].join("; "); }); } }; //#endregion export { auth_default as t };