UNPKG

rsshub

Version:
22 lines (21 loc) 821 B
import { t as rofetch } from "./ofetch-C3ts-Hud.mjs"; import { t as cache_default } from "./cache-BkqOokyU.mjs"; //#region lib/routes/zhihu/xhu/auth.ts var auth_default = { getCookie: () => { return cache_default.tryGet("zhihu-xhu-cookie", async () => { const udidCookieArray = (await rofetch.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 rofetch.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 };