(stringURL: string, limit: number)
| 484 | * @returns {Promise<string[]>} |
| 485 | */ |
| 486 | export 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 | |
| 494 | export function getURLsFromXML(xmlBody: string, limit: number): string[] { |
| 495 | const dom = new JSDOM(xmlBody, { contentType: 'text/xml' }) |
no test coverage detected