Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

Fix deprecated waitFor (#827)

Lukáš Křivkaf297aa920af9
diff --git a/src/puppeteer_utils.js b/src/puppeteer_utils.js
index 13127754a..d240d5963 100644
--- a/src/puppeteer_utils.js
+++ b/src/puppeteer_utils.js
@@ -455,7 +455,7 @@ export const infiniteScroll = async (page, options = {}) => {
while (!finished) {
await doScroll();
- await page.waitFor(50);
+ await page.waitForTimeout(50);
if (scrollDownAndUp) {
await page.evaluate(() => {
window.scrollBy(0, -1000);