added .inc files and forced lower case comparison

This commit is contained in:
rafaelsideguide 2024-07-31 09:28:43 -03:00
parent 4ab7fb007a
commit f48ff36b32

View File

@ -164,7 +164,7 @@ export class WebCrawler {
concurrencyLimit,
inProgress
);
if (
urls.length === 0 &&
this.filterLinks([this.initialUrl], limit, this.maxCrawledDepth).length > 0
@ -420,9 +420,10 @@ export class WebCrawler {
".woff",
".ttf",
".woff2",
".webp"
".webp",
".inc"
];
return fileExtensions.some((ext) => url.endsWith(ext));
return fileExtensions.some((ext) => url.toLowerCase().endsWith(ext));
}
private isSocialMediaOrEmail(url: string): boolean {