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; });