mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
refactor: optimize read and search
This commit is contained in:
@@ -21,8 +21,8 @@ export function normalizeUrl(urlString: string, debug = false, options = {
|
|||||||
throw new Error('Empty URL');
|
throw new Error('Empty URL');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (urlString.startsWith('https://google.com/') || urlString.startsWith('https://www.google.com')) {
|
if (urlString.startsWith('https://google.com/') || urlString.startsWith('https://www.google.com') || urlString.startsWith('https://baidu.com/s?')) {
|
||||||
throw new Error('Google search link');
|
throw new Error('Google/baidu search link');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (urlString.includes('example.com')) {
|
if (urlString.includes('example.com')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user