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.

Increasing pageOpsTimeoutMillis to 300s

Marek Trunkat256c74a4f252
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ba4dcde3f..517da6cd9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
- Added `Apify.isAtHome()` function that returns `true` when code is running at Apify platform and `false` otherwise
(for example locally).
- Added `ignoreMainProcess` parameter to `AutoscaledPool`. Check documentation for more info.
+- `pageOpsTimeoutMillis` of `PuppeteerCrawler` increased to 300 seconds.
0.5.26 / 2018-04-27
===================
diff --git a/src/puppeteer_crawler.js b/src/puppeteer_crawler.js
index 72f67308d..a403c2767 100644
--- a/src/puppeteer_crawler.js
+++ b/src/puppeteer_crawler.js
@@ -8,7 +8,7 @@ import { isPromise } from './utils';
const DEFAULT_OPTIONS = {
gotoFunction: ({ request, page }) => page.goto(request.url),
- pageOpsTimeoutMillis: 30000,
+ pageOpsTimeoutMillis: 300000,
};
/**
@@ -56,7 +56,7 @@ const DEFAULT_OPTIONS = {
* It is passed an object with the following fields:
* `request` is an instance of the `Request` object with details about the URL to open, HTTP method etc.
* `page` is an instance of the `Puppeteer.Page` class with `page.goto(request.url)` already called.
- * @param {Number} [options.pageOpsTimeoutMillis=30000] Timeout in which the fuction passed as `options.handlePageFunction` needs to finish.
+ * @param {Number} [options.pageOpsTimeoutMillis=300000] Timeout in which the fuction passed as `options.handlePageFunction` needs to finish.
* @param {Function} [options.gotoFunction=({ request, page }) => page.goto(request.url)] Overrides the function that opens the request in Puppeteer.
* This function should return a result of `page.goto()`, i.e. the Puppeteer's `Response` object.
* @param {Function} [options.handleFailedRequestFunction=({ request }) => log.error('Request failed', _.pick(request, 'url', 'uniqueKey'))]