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.

docs: proxy tier logging (#2527)

Jindřich Bära5885278f2b7
diff --git a/packages/core/src/proxy_configuration.ts b/packages/core/src/proxy_configuration.ts
index 435f1ca76..c0a4e0bf1 100644
--- a/packages/core/src/proxy_configuration.ts
+++ b/packages/core/src/proxy_configuration.ts
@@ -345,6 +345,15 @@ export class ProxyConfiguration {
const tierPrediction = tracker.predictTier();
+ if (
+ typeof request.userData.__crawlee.lastProxyTier === 'number' &&
+ request.userData.__crawlee.lastProxyTier !== tierPrediction
+ ) {
+ log.debug(
+ `Changing proxy tier for domain "${domain}" from ${request.userData.__crawlee.lastProxyTier} to ${tierPrediction}.`,
+ );
+ }
+
request.userData.__crawlee.lastProxyTier = tierPrediction;
request.userData.__crawlee.forefront = true;