mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-08 11:38:59 +08:00
fix(v1/map): add wrapper around tryGetSitemap
This commit is contained in:
parent
5aad21b35a
commit
5a039e7b64
@ -171,9 +171,13 @@ export async function getMapResults({
|
||||
(sitemapIndexResult.urls.length < 100 ||
|
||||
new Date(sitemapIndexResult.lastUpdated) < twoDaysAgo)
|
||||
) {
|
||||
await crawler.tryGetSitemap(urls => {
|
||||
links.push(...urls);
|
||||
}, true, false, 30000);
|
||||
try {
|
||||
await crawler.tryGetSitemap(urls => {
|
||||
links.push(...urls);
|
||||
}, true, false, 30000);
|
||||
} catch (e) {
|
||||
logger.warn("tryGetSitemap threw an error", { error: e });
|
||||
}
|
||||
}
|
||||
|
||||
if (!cachedResult) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user