Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@crawlee/browser-pool

Package Overview
Dependencies
Maintainers
1
Versions
1270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crawlee/browser-pool - npm Package Compare versions

Comparing version 3.0.0-beta.39 to 3.0.0-beta.40

4

browser-pool.d.ts

@@ -21,7 +21,7 @@ import { TypedEmitter } from 'tiny-typed-emitter';

*/
useFingerprintPerProxyCache?: boolean;
useFingerprintCache?: boolean;
/**
* @default 10000
*/
fingerprintPerProxyCacheSize?: number;
fingerprintCacheSize?: number;
}

@@ -28,0 +28,0 @@ export interface BrowserPoolOptions<Plugin extends BrowserPlugin = BrowserPlugin> {

@@ -557,7 +557,7 @@ "use strict";

_initializeFingerprinting() {
const { useFingerprintPerProxyCache = true, fingerprintPerProxyCacheSize = 10000 } = this.fingerprintsOptions;
const { useFingerprintCache = true, fingerprintCacheSize = 10000 } = this.fingerprintsOptions;
this.fingerprintGenerator = new fingerprint_generator_1.FingerprintGenerator(this.fingerprintsOptions.fingerprintGeneratorOptions);
this.fingerprintInjector = new fingerprint_injector_1.FingerprintInjector();
if (useFingerprintPerProxyCache) {
this.fingerprintCache = new quick_lru_1.default({ maxSize: fingerprintPerProxyCacheSize });
if (useFingerprintCache) {
this.fingerprintCache = new quick_lru_1.default({ maxSize: fingerprintCacheSize });
}

@@ -564,0 +564,0 @@ this._addFingerprintHooks();

@@ -12,4 +12,5 @@ "use strict";

return (_pageId, launchContext) => {
const { useIncognitoPages, proxyUrl } = launchContext;
const { useIncognitoPages } = launchContext;
// @TODO: Fix the typings so they are easier to work with.
const cacheKey = launchContext.session?.id ?? launchContext.proxyUrl;
const { launchOptions } = launchContext;

@@ -19,8 +20,8 @@ // If no options are passed we try to pass best default options as possible to match browser and OS.

let fingerprint;
if (proxyUrl && fingerprintCache?.has(proxyUrl)) {
fingerprint = fingerprintCache.get(proxyUrl);
if (cacheKey && fingerprintCache?.has(cacheKey)) {
fingerprint = fingerprintCache.get(cacheKey);
}
else if (proxyUrl) {
else if (cacheKey) {
fingerprint = fingerprintGenerator.getFingerprint(fingerprintGeneratorFinalOptions);
fingerprintCache?.set(proxyUrl, fingerprint);
fingerprintCache?.set(cacheKey, fingerprint);
}

@@ -27,0 +28,0 @@ else {

{
"name": "@crawlee/browser-pool",
"version": "3.0.0-beta.39",
"version": "3.0.0-beta.40",
"description": "Rotate multiple browsers using popular automation libraries such as Playwright or Puppeteer.",

@@ -5,0 +5,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc