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.

Rename constant.

Petr Patek49feeabb85f0
diff --git a/src/constants.js b/src/constants.js
index 1fd91d23a..15ffef8d6 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -125,5 +125,3 @@ export const BASIC_CRAWLER_TIMEOUT_MULTIPLIER = 10;
export const COUNTRY_CODE_REGEX = /^[A-Z]{2}$/;
export const STATUS_CODES_BLOCKED = [401, 403, 429];
-
-export const BROWSER_SESSION_KEY_NAME = 'APIFY_SESSION';
diff --git a/src/puppeteer_pool.js b/src/puppeteer_pool.js
index f1510bb16..d3dc607f0 100644
--- a/src/puppeteer_pool.js
+++ b/src/puppeteer_pool.js
@@ -11,8 +11,8 @@ import { launchPuppeteer } from './puppeteer';
import { addTimeoutToPromise } from './utils';
import LiveViewServer from './live_view/live_view_server';
import EVENTS from './session_pool/events';
-import { BROWSER_SESSION_KEY_NAME } from './constants';
+export const BROWSER_SESSION_KEY_NAME = 'APIFY_SESSION';
const PROCESS_KILL_TIMEOUT_MILLIS = 5000;
const PAGE_CLOSE_KILL_TIMEOUT_MILLIS = 1000;
diff --git a/test/puppeteer_pool.test.js b/test/puppeteer_pool.test.js
index 36221e293..40464109e 100644
--- a/test/puppeteer_pool.test.js
+++ b/test/puppeteer_pool.test.js
@@ -6,7 +6,7 @@ import * as Apify from '../build/index';
import { launchPuppeteer } from '../build/puppeteer';
import { SessionPool } from '../build/session_pool/session_pool';
import { LOCAL_STORAGE_DIR, emptyLocalStorageSubdir } from './_helper';
-import { BROWSER_SESSION_KEY_NAME } from '../src/constants';
+import { BROWSER_SESSION_KEY_NAME } from '../build/puppeteer_pool';
import { sleep } from '../src/utils';