Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(scrape): use selectedRow instead of data[0] for GCS fetch and cacheInfo (#3151)

firecrawl-spring[bot]67c9dbd3ac90
diff --git a/apps/api/src/scraper/scrapeURL/engines/index/index.ts b/apps/api/src/scraper/scrapeURL/engines/index/index.ts
index 908f75cf4..2bb91843c 100644
--- a/apps/api/src/scraper/scrapeURL/engines/index/index.ts
+++ b/apps/api/src/scraper/scrapeURL/engines/index/index.ts
@@ -324,7 +324,7 @@ export async function scrapeURLWithIndex(
const checkpoint2 = Date.now();
- const id = data[0].id;
+ const id = selectedRow.id;
const doc = await getIndexFromGCS(
id + ".json",
@@ -386,7 +386,7 @@ export async function scrapeURLWithIndex(
contentType: doc.contentType,
cacheInfo: {
- created_at: new Date(data[0].created_at),
+ created_at: new Date(selectedRow.created_at),
},
postprocessorsUsed: doc.postprocessorsUsed,