Rafa: removed throw error and added map to requests

This commit is contained in:
rafaelmmiller 2024-11-19 09:34:52 -03:00
parent 36cf49c959
commit 53134b7c85
2 changed files with 13 additions and 5 deletions

View File

@ -46,4 +46,16 @@ content-type: application/json
@batchScrapeId = {{batchScrape.response.body.$.id}}
# @name batchScrapeStatus
GET {{baseUrl}}/v1/crawl/{{batchScrapeId}} HTTP/1.1
Authorization: Bearer {{$dotenv TEST_API_KEY}}
Authorization: Bearer {{$dotenv TEST_API_KEY}}
### Map Website
# @name map
POST {{baseUrl}}/v1/map HTTP/1.1
Authorization: Bearer {{$dotenv TEST_API_KEY}}
content-type: application/json
{
"url": "firecrawl.dev",
"sitemapOnly": true
}

View File

@ -80,10 +80,6 @@ export async function getMapResults({
// If sitemapOnly is true, only get links from sitemap
if (crawlerOptions.sitemapOnly) {
if (includeMetadata) {
throw new Error("includeMetadata is not supported with sitemapOnly");
}
const sitemap = await crawler.tryGetSitemap(true, true);
if (sitemap !== null) {
sitemap.forEach((x) => {