From 997a466f305a80db114000005a6517746895af2a Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 18 Aug 2024 22:46:44 +0530 Subject: [PATCH] chore: remove comment --- maxun-core/src/interpret.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/maxun-core/src/interpret.ts b/maxun-core/src/interpret.ts index 54e5bdb2..9f8a9adc 100644 --- a/maxun-core/src/interpret.ts +++ b/maxun-core/src/interpret.ts @@ -378,10 +378,8 @@ export default class Interpreter extends EventEmitter { switch (config.pagination.type) { case 'scrollDown': await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight)); - // Wait for potential lazy-loaded content await page.waitForTimeout(2000); - // Check if new content was loaded const currentHeight = await page.evaluate(() => document.body.scrollHeight); if (currentHeight === previousHeight) { // No new content loaded, scrape final results and exit loop @@ -389,6 +387,7 @@ export default class Interpreter extends EventEmitter { allResults = allResults.concat(finalResults); return allResults; } + previousHeight = currentHeight; break; case 'scrollUp':