mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: normalize url
This commit is contained in:
parent
5c36410b54
commit
01705291c4
@ -21,6 +21,7 @@ export function readUrl(url: string, withAllLinks?: boolean, tracker?: TokenTrac
|
||||
'Content-Type': 'application/json',
|
||||
'X-Retain-Images': 'none',
|
||||
'X-Md-Link-Style': 'discarded',
|
||||
'X-Engine': 'direct'
|
||||
};
|
||||
if (withAllLinks) {
|
||||
headers['X-With-Links-Summary'] = 'all'
|
||||
|
||||
@ -466,7 +466,9 @@ export async function processURLs(
|
||||
(error?.name === 'ParamValidationError' && error.message?.includes('Domain')) ||
|
||||
(error?.name === 'AssertionFailureError' && error.message?.includes('resolve host name')) ||
|
||||
error?.message?.includes("Couldn't resolve host name") ||
|
||||
error?.message?.includes("could not be resolved")
|
||||
error?.message?.includes("could not be resolved") ||
|
||||
error?.message?.includes("ERR_CERT_COMMON_NAME_INVALID") ||
|
||||
error?.message?.includes("ERR_CONNECTION_REFUSED")
|
||||
) {
|
||||
let hostname = '';
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user