From d2b5391b46536222f2642aa5d2b0606c6bb44e68 Mon Sep 17 00:00:00 2001 From: huqi Date: Thu, 10 Mar 2022 13:53:42 +0800 Subject: [PATCH] Update zhihu-search.ts --- zhihu-search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zhihu-search.ts b/zhihu-search.ts index 2de24f6bd7..c7d360f63c 100755 --- a/zhihu-search.ts +++ b/zhihu-search.ts @@ -33,7 +33,7 @@ if (await exists(fullPath)) { const wordsAll = mergeWords(words, wordsAlreadyDownload); export const zhihuSearchData = wordsAll.map((x) => { - x.url = `https://www.zhihu.com/search?q=${x.query}`; + x.url = `https://www.zhihu.com/search?q=${x.query.replace(/(^\s+)|(\s+$)|\s+/g,'%20')}`; return x; });