From fd4f828460c4c363aa6f3ddbb78d7b2bb9222a09 Mon Sep 17 00:00:00 2001 From: Richard Dern Date: Mon, 7 Apr 2025 10:49:06 +0200 Subject: [PATCH] Fixed screenshot capture --- tools/lib/puppeteer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/puppeteer.js b/tools/lib/puppeteer.js index d34a2f19..4041631d 100644 --- a/tools/lib/puppeteer.js +++ b/tools/lib/puppeteer.js @@ -10,7 +10,7 @@ puppeteer.use(StealthPlugin()); * @param {string} screenshotPath - Path where the screenshot should be saved. * @returns {Promise} - Metadata including title, description, keywords, language, and HTTP status. */ -async function scrapePage(url, screenshotPath, { screenshot = true }) { +async function scrapePage(url, screenshotPath) { console.log(`🔍 Scraping: ${url}`); const browser = await puppeteer.launch({ @@ -90,7 +90,7 @@ async function scrapePage(url, screenshotPath, { screenshot = true }) { }); - if (screenshot && screenshotPath) { + if (screenshotPath) { await page.screenshot({ path: screenshotPath, fullPage: true }); console.log(`✔ Screenshot saved: ${screenshotPath}`); }