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.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
docs: remove references to deprecated gotoFunction
Ondra Urbanc9cb6ce3a69c
diff --git a/src/crawlers/browser_crawler.js b/src/crawlers/browser_crawler.jsindex e560c1445..bb11c7166 100644--- a/src/crawlers/browser_crawler.js+++ b/src/crawlers/browser_crawler.js@@ -119,7 +119,7 @@ import { AutoscaledPoolOptions } from '../autoscaling/autoscaled_pool';* @property {Array<Hook>} [preNavigationHooks]* Async functions that are sequentially evaluated before the navigation. Good for setting additional cookies* or browser properties before navigation. The function accepts two parameters, `crawlingContext` and `gotoOptions`,- * which are passed to the `gotoFunction` the crawler calls to navigate.+ * which are passed to the `page.goto()` function the crawler calls to navigate.* Example:* ```* preNavigationHooks: [diff --git a/src/crawlers/crawler_utils.js b/src/crawlers/crawler_utils.jsindex 1a8407044..f7ad844b1 100644--- a/src/crawlers/crawler_utils.js+++ b/src/crawlers/crawler_utils.js@@ -13,7 +13,7 @@ export function handleRequestTimeout(session, errorMessage) {if (session) session.markBad();const timeoutMillis = errorMessage.match(/(\d+)\s?ms/)[1]; // first capturing groupconst timeoutSecs = Number(timeoutMillis) / 1000;- throw new Error(`gotoFunction timed out after ${timeoutSecs} seconds.`);+ throw new Error(`Navigation timed out after ${timeoutSecs} seconds.`);}/**diff --git a/src/crawlers/playwright_crawler.js b/src/crawlers/playwright_crawler.jsindex b999ba7c3..33e587cb7 100644--- a/src/crawlers/playwright_crawler.js+++ b/src/crawlers/playwright_crawler.js@@ -85,8 +85,7 @@ import { gotoExtended } from '../playwright_utils';* The exceptions are logged to the request using the* {@link Request#pushErrorMessage} function.* @property {number} [navigationTimeoutSecs=60]- * Timeout in which page navigation needs to finish, in seconds. When `gotoFunction()` is used and thus the default- * function is overridden, this timeout will not be used and needs to be configured in the new `gotoFunction()`.+ * Timeout in which page navigation needs to finish, in seconds.* @property {HandleFailedRequest} [handleFailedRequestFunction]* A function to handle requests that failed more than `option.maxRequestRetries` times.*@@ -107,7 +106,7 @@ import { gotoExtended } from '../playwright_utils';* @property {Array<PlaywrightHook>} [preNavigationHooks]* Async functions that are sequentially evaluated before the navigation. Good for setting additional cookies* or browser properties before navigation. The function accepts two parameters, `crawlingContext` and `gotoOptions`,- * which are passed to the `gotoFunction` the crawler calls to navigate.+ * which are passed to the `page.goto()` function the crawler calls to navigate.* Example:* ```* preNavigationHooks: [diff --git a/src/crawlers/puppeteer_crawler.js b/src/crawlers/puppeteer_crawler.jsindex aee3dd68d..839397866 100644--- a/src/crawlers/puppeteer_crawler.js+++ b/src/crawlers/puppeteer_crawler.js@@ -72,8 +72,7 @@ import { BrowserPoolOptions } from 'browser-pool';* The exceptions are logged to the request using the* {@link Request#pushErrorMessage} function.* @property {number} [navigationTimeoutSecs=60]- * Timeout in which page navigation needs to finish, in seconds. When `gotoFunction()` is used and thus the default- * function is overridden, this timeout will not be used and needs to be configured in the new `gotoFunction()`.+ * Timeout in which page navigation needs to finish, in seconds.* @property {HandleFailedRequest} [handleFailedRequestFunction]* A function to handle requests that failed more than `option.maxRequestRetries` times.*@@ -107,7 +106,7 @@ import { BrowserPoolOptions } from 'browser-pool';* @property {Array<PuppeteerHook>} [preNavigationHooks]* Async functions that are sequentially evaluated before the navigation. Good for setting additional cookies* or browser properties before navigation. The function accepts two parameters, `crawlingContext` and `gotoOptions`,- * which are passed to the `gotoFunction` the crawler calls to navigate.+ * which are passed to the `page.goto()` function the crawler calls to navigate.* Example:* ```* preNavigationHooks: [