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.

Updated comments

Jan Curndcbae67fe27f
diff --git a/src/actor.js b/src/actor.js
index 81573f5e4..4ed428176 100644
--- a/src/actor.js
+++ b/src/actor.js
@@ -40,11 +40,13 @@ const getDefaultStoreIdOrThrow = () => {
/**
* Gets a value from the default key-value store for the current act run.
- * This store is created automatically for this run,
- * whose ID is defined in the `APIFY_DEFAULT_KEY_VALUE_STORE_ID` environment variable.
- * The result of the function is the body of the record. For records with 'application/json'
- * content type, the body is the already parsed object. For other content types,
- * the body is raw String or Buffer. If the record cannot be found, the result is null.
+ * This store is created automatically for this run
+ * and its ID is defined in the `APIFY_DEFAULT_KEY_VALUE_STORE_ID` environment variable.
+ * The result of the function is the body of the record. For records with the 'application/json'
+ * content type, the body is the already parsed object
+ * and for 'text/plain' content types it is parsed as String.
+ * For other content types, the body is raw Buffer.
+ * If the record cannot be found, the result is null.
*
* If the `APIFY_DEV_KEY_VALUE_STORE_DIR` environment variable is defined,
* the value is read from a that directory rather than the key-value store,
@@ -53,6 +55,7 @@ const getDefaultStoreIdOrThrow = () => {
* The file is assumed to have a content type specified in the `APIFY_DEV_KEY_VALUE_STORE_CONTENT_TYPE`
* environment variable, or `application/json` if not set.
* This is useful for local development of the act.
+ *
* @param callback Optional callback.
* @return Returns a promise if no callback was provided, otherwise the return value is not defined.
*/