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
Fix docs
Ondra Urban052758b96178
diff --git a/docs/api/Apify.md b/docs/api/Apify.mdindex 746d39603..36a4bb705 100644--- a/docs/api/Apify.md+++ b/docs/api/Apify.md@@ -19,7 +19,6 @@ accessible from the left sidebar.* [`.getMemoryInfo()`](#module_Apify.getMemoryInfo) ⇒ <code>Promise<Object></code>* [`.getValue(key)`](#module_Apify.getValue) ⇒ <code>Promise<Object></code>* [`.isAtHome()`](#module_Apify.isAtHome) ⇒ <code>Boolean</code>- * [`.isDocker()`](#module_Apify.isDocker) ⇒ <code>Promise</code>* [`.launchPuppeteer([options])`](#module_Apify.launchPuppeteer) ⇒ <code>Promise<Browser></code>* [`.launchWebDriver([options])`](#module_Apify.launchWebDriver) ⇒ <code>Promise</code>* [`.main(userFunc)`](#module_Apify.main)@@ -445,11 +444,6 @@ and [`keyValueStore.getValue()`](keyvaluestore#KeyValueStore+getValue).## `Apify.isAtHome()` ⇒ <code>Boolean</code>Returns `true` when code is running on Apify platform and `false` otherwise (for example locally).-<a name="module_Apify.isDocker"></a>--## `Apify.isDocker()` ⇒ <code>Promise</code>-Returns a `Promise` that resolves to true if the code is running in a Docker container.-<a name="module_Apify.launchPuppeteer"></a>## `Apify.launchPuppeteer([options])` ⇒ <code>Promise<Browser></code>diff --git a/docs/api/utils.md b/docs/api/utils.mdindex f1abe4c24..8939800f3 100644--- a/docs/api/utils.md+++ b/docs/api/utils.md@@ -21,6 +21,7 @@ await Apify.utils.sleep(1500);* [`utils`](#utils) : <code>object</code>* [`.URL_NO_COMMAS_REGEX`](#utils.URL_NO_COMMAS_REGEX)* [`.URL_WITH_COMMAS_REGEX`](#utils.URL_WITH_COMMAS_REGEX)+ * [`.isDocker()`](#utils.isDocker) ⇒ <code>Promise</code>* [`.sleep(millis)`](#utils.sleep) ⇒ <code>Promise</code>* [`.downloadListOfUrls(options)`](#utils.downloadListOfUrls) ⇒ <code>Promise<Array<String>></code>* [`.extractUrls(string, [urlRegExp])`](#utils.extractUrls) ⇒ <code>Array<String></code>@@ -38,6 +39,11 @@ and does not support URLs containing commas or spaces. The URLs also may containRegular expression that, in addition to the default regular expression `URL_NO_COMMAS_REGEX`, supports matching commas in URL path and query.Note, however, that this may prevent parsing URLs from comma delimited lists, or the URLs may become malformed.+<a name="utils.isDocker"></a>++## `utils.isDocker()` ⇒ <code>Promise</code>+Returns a `Promise` that resolves to true if the code is running in a Docker container.+<a name="utils.sleep"></a>## `utils.sleep(millis)` ⇒ <code>Promise</code>diff --git a/src/utils.js b/src/utils.jsindex 944365804..7468dcfa0 100644--- a/src/utils.js+++ b/src/utils.js@@ -124,7 +124,7 @@ const createIsDockerPromise = () => {** @return {Promise}*- * @memberof module:Apify+ * @memberof utils* @name isDocker* @function*/@@ -497,6 +497,7 @@ export const ensureTokenOrLocalStorageEnvExists = (storageName) => {* @namespace utils*/export const publicUtils = {+ isDocker,sleep,downloadListOfUrls,extractUrls,