From 164676c70a85453384433d93bb0c90924153da44 Mon Sep 17 00:00:00 2001 From: rafaelsideguide <150964962+rafaelsideguide@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:34:42 -0300 Subject: [PATCH] bugfix screenshot for readme pages --- apps/api/src/scraper/WebScraper/single_url.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/api/src/scraper/WebScraper/single_url.ts b/apps/api/src/scraper/WebScraper/single_url.ts index 41d4274..689d5e7 100644 --- a/apps/api/src/scraper/WebScraper/single_url.ts +++ b/apps/api/src/scraper/WebScraper/single_url.ts @@ -337,6 +337,9 @@ export async function scrapSingleUrl( switch (customScraperResult.scraper) { case "fire-engine": customScrapedContent = await scrapWithFireEngine(customScraperResult.url, customScraperResult.waitAfterLoad, false, customScraperResult.pageOptions) + if (screenshot) { + customScrapedContent.screenshot = screenshot; + } break; case "pdf": customScrapedContent = { html: await fetchAndProcessPdf(customScraperResult.url), screenshot }