Merge pull request #551 from FlowiseAI/feature/WebCrawl

This commit is contained in:
Ong Chung Yau 2023-07-16 10:20:17 +08:00 committed by GitHub
commit 7d985dbfce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -320,7 +320,7 @@ export async function xmlScrape(currentURL: string, limit: number): Promise<stri
} }
const contentType: string | null = resp.headers.get('content-type') const contentType: string | null = resp.headers.get('content-type')
if ((contentType && !contentType.includes('application/xml')) || !contentType) { if ((contentType && !contentType.includes('application/xml') && !contentType.includes('text/xml')) || !contentType) {
if (process.env.DEBUG === 'true') console.error(`non xml response, content type: ${contentType}, on page: ${currentURL}`) if (process.env.DEBUG === 'true') console.error(`non xml response, content type: ${contentType}, on page: ${currentURL}`)
return urls return urls
} }