diff --git a/maxun-core/src/interpret.ts b/maxun-core/src/interpret.ts index 0cfa2309..b03ed140 100644 --- a/maxun-core/src/interpret.ts +++ b/maxun-core/src/interpret.ts @@ -406,26 +406,20 @@ export default class Interpreter extends EventEmitter { allResults = allResults.concat(newResults); - if (config.limit && allResults.length >= config.limit) { return allResults.slice(0, config.limit); } - const nextButton = await page.$(config.pagination.selector); if (!nextButton) { return allResults; // No more pages to scrape } - - await Promise.all([ nextButton.click(), page.waitForNavigation({ waitUntil: 'networkidle' }) ]); - await page.waitForTimeout(1000); - break; case 'clickLoadMore': const loadMoreButton = await page.$(config.pagination.selector);