mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Merge pull request #491 from mendableai/bugfix/issue-477
[Bug] Nested sitemaps
This commit is contained in:
commit
893113a39e
|
@ -476,7 +476,7 @@ export class WebCrawler {
|
|||
try {
|
||||
const response = await axios.get(baseUrlSitemap, { timeout: axiosTimeout });
|
||||
if (response.status === 200) {
|
||||
sitemapLinks = await getLinksFromSitemap({ sitemapUrl: baseUrlSitemap });
|
||||
sitemapLinks = await getLinksFromSitemap({ sitemapUrl: baseUrlSitemap, mode: 'fire-engine' });
|
||||
}
|
||||
} catch (error) {
|
||||
Logger.debug(`Failed to fetch sitemap from ${baseUrlSitemap}: ${error}`);
|
||||
|
|
|
@ -19,7 +19,7 @@ export async function getLinksFromSitemap(
|
|||
try {
|
||||
let content: string;
|
||||
try {
|
||||
if (mode === 'axios') {
|
||||
if (mode === 'axios' || process.env.FIRE_ENGINE_BETA_URL === '') {
|
||||
const response = await axios.get(sitemapUrl, { timeout: axiosTimeout });
|
||||
content = response.data;
|
||||
} else if (mode === 'fire-engine') {
|
||||
|
|
Loading…
Reference in New Issue
Block a user