Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix(scrapeURL/fire-engine): screenshot broken hotfix
Gergő Móricz5c4021e8cf37
diff --git a/apps/api/src/__tests__/snips/scrape.test.ts b/apps/api/src/__tests__/snips/scrape.test.tsindex 8463e0983..7970d820b 100644--- a/apps/api/src/__tests__/snips/scrape.test.ts+++ b/apps/api/src/__tests__/snips/scrape.test.ts@@ -98,7 +98,7 @@ describe("Scrape tests", () => {});expectScrapeToSucceed(response);- expect(response.body.data.screenshot).toBeTruthy();+ expect(typeof response.body.data.screenshot).toBe("string");}, 15000);it.concurrent("screenshot@fullPage format works", async () => {@@ -108,7 +108,7 @@ describe("Scrape tests", () => {});expectScrapeToSucceed(response);- expect(response.body.data.screenshot).toBeTruthy();+ expect(typeof response.body.data.screenshot).toBe("string");}, 15000);})});diff --git a/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts b/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.tsindex 988dfeb83..26f7847f1 100644--- a/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts+++ b/apps/api/src/scraper/scrapeURL/engines/fire-engine/index.ts@@ -229,7 +229,7 @@ export async function scrapeURLWithFireEngineChromeCDP({ screenshots: response.screenshots },);if (response.screenshots) {- response.screenshot = response.screenshots.slice(-1, 0)[0];+ response.screenshot = response.screenshots.slice(-1)[0];response.screenshots = response.screenshots.slice(0, -1);}meta.logger.debug("Screenshot transformation done", {