Skip to content

Commit

Permalink
fix(route/zhihu): Repair the regex for extracting __zse_ck (#17011)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzx-dzx authored Oct 6, 2024
1 parent d4ff0ff commit 2747444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes/zhihu/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit 2747444

Please sign in to comment.