MCPcopy
hub / github.com/FlowiseAI/Flowise / webCrawl

Function webCrawl

packages/components/src/utils.ts:486–492  ·  view source on GitHub ↗
(stringURL: string, limit: number)

Source from the content-addressed store, hash-verified

484 * @returns {Promise<string[]>}
485 */
486export async function webCrawl(stringURL: string, limit: number): Promise<string[]> {
487 await checkDenyList(stringURL)
488
489 const URLObj = new URL(stringURL)
490 const modifyURL = stringURL.slice(-1) === '/' ? stringURL.slice(0, -1) : stringURL
491 return await crawl(URLObj.protocol + '//' + URLObj.hostname, modifyURL, [], limit)
492}
493
494export function getURLsFromXML(xmlBody: string, limit: number): string[] {
495 const dom = new JSDOM(xmlBody, { contentType: 'text/xml' })

Callers 4

initMethod · 0.90
initMethod · 0.90
initMethod · 0.90
getAllLinksFunction · 0.85

Calls 2

checkDenyListFunction · 0.90
crawlFunction · 0.85

Tested by

no test coverage detected