diff --git a/toutiao-search.ts b/toutiao-search.ts index 0efd7ac14c..2bad11a32f 100644 --- a/toutiao-search.ts +++ b/toutiao-search.ts @@ -33,7 +33,7 @@ if (await exists(fullPath)) { } const _words = words.map((x) => { - x.url = `https://so.toutiao.com/search?keyword=${x.word.replace(" ", "+")}`; + x.url = `https://so.toutiao.com/search?keyword=${x.word.replace(/(^\s+)|(\s+$)|\s+/g,'%20')}`; return x; });