fix(route/zhihu): Repair the regex for extracting __zse_ck (#17011)

This commit is contained in:
Andvari
2024-10-06 04:21:59 -07:00
committed by GitHub
parent d4ff0ff20d
commit 27474442ca
+1 -1
View File
@@ -75,7 +75,7 @@ export const getSignedHeader = async (url: string, apiPath: string) => {
}
const response1 = await ofetch.raw('https://static.zhihu.com/zse-ck/v3.js');
const script = await response1._data.text();
const zseCk = script.match(/__g\.ck\|\|"([\w+/=\\]*?)",_=630e8;/)?.[1];
const zseCk = script.match(/__g\.ck\|\|"([\w+/=\\]*?)",_=/)?.[1];
const response2 = zseCk
? await ofetch.raw(url, {