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: use correct apify-client instance for snapshotting (#1308)

Martin Adámek91d152a295c0
diff --git a/package.json b/package.json
index 0677d32fa..340bc05a3 100644
--- a/package.json
+++ b/package.json
@@ -126,7 +126,7 @@
"sinon": "^12.0.0",
"sinon-stub-promise": "^4.0.0",
"ts-jest": "^27.0.5",
- "typescript": "4.6.2",
+ "typescript": "4.5.5",
"ua-parser-js": "^1.0.0",
"why-is-node-running": "^2.2.0"
}
diff --git a/renovate.json b/renovate.json
index 3853ce4e1..880f006c3 100644
--- a/renovate.json
+++ b/renovate.json
@@ -23,5 +23,6 @@
"automergeType": "branch"
}
],
+ "ignoreDeps": ["typescript"],
"schedule": ["every weekday"]
}
diff --git a/src/utils.js b/src/utils.js
index 9d859476c..48b67b85d 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -27,6 +27,7 @@ import { requestAsBrowser } from './utils_request';
import Request, { RequestOptions } from './request';
import { ActorRun } from './typedefs';
import { CheerioAPI } from 'cheerio';
+import { Configuration } from './configuration';
/* eslint-enable no-unused-vars,import/named,import/no-duplicates,import/order */
const rimrafp = util.promisify(rimraf);
@@ -114,7 +115,7 @@ export const logSystemInfo = () => {
* @type {*}
* @ignore
*/
-export const apifyClient = newClient();
+export const apifyClient = Configuration.getGlobalConfig().getClient();
/**
* Adds charset=utf-8 to given content type if this parameter is missing.