refactor: optimize read and search

This commit is contained in:
Han Xiao 2025-04-11 22:09:42 +08:00
parent feb918c7b5
commit 153479abb6

View File

@ -21,8 +21,8 @@ export function normalizeUrl(urlString: string, debug = false, options = {
throw new Error('Empty URL');
}
if (urlString.startsWith('https://google.com/') || urlString.startsWith('https://www.google.com')) {
throw new Error('Google search link');
if (urlString.startsWith('https://google.com/') || urlString.startsWith('https://www.google.com') || urlString.startsWith('https://baidu.com/s?')) {
throw new Error('Google/baidu search link');
}
if (urlString.includes('example.com')) {