chore: remove comments
This commit is contained in:
@@ -382,7 +382,6 @@ export default class Interpreter extends EventEmitter {
|
|||||||
|
|
||||||
const currentHeight = await page.evaluate(() => document.body.scrollHeight);
|
const currentHeight = await page.evaluate(() => document.body.scrollHeight);
|
||||||
if (currentHeight === previousHeight) {
|
if (currentHeight === previousHeight) {
|
||||||
// No new content loaded, scrape final results and exit loop
|
|
||||||
const finalResults = await page.evaluate((cfg) => window.scrapeList(cfg), config);
|
const finalResults = await page.evaluate((cfg) => window.scrapeList(cfg), config);
|
||||||
allResults = allResults.concat(finalResults);
|
allResults = allResults.concat(finalResults);
|
||||||
return allResults;
|
return allResults;
|
||||||
@@ -391,12 +390,11 @@ export default class Interpreter extends EventEmitter {
|
|||||||
previousHeight = currentHeight;
|
previousHeight = currentHeight;
|
||||||
break;
|
break;
|
||||||
case 'scrollUp':
|
case 'scrollUp':
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'clickNext':
|
case 'clickNext':
|
||||||
const nextButton = await page.$(config.pagination.selector);
|
const nextButton = await page.$(config.pagination.selector);
|
||||||
if (!nextButton) {
|
if (!nextButton) {
|
||||||
return allResults; // No more pages
|
return allResults;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Capture the current URL to check if it changes after clicking next
|
// Capture the current URL to check if it changes after clicking next
|
||||||
|
|||||||
Reference in New Issue
Block a user