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

generative-bayesian-network

Package Overview
Dependencies
Maintainers
9
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generative-bayesian-network - npm Package Compare versions

Comparing version 2.1.13 to 2.1.14

2

package.json
{
"name": "generative-bayesian-network",
"version": "2.1.13",
"version": "2.1.14",
"author": {

@@ -5,0 +5,0 @@ "name": "Apify"

<h1 align="center">
<a href="https://apify.github.io/fingerprint-suite/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/apify/fingerprint-suite/master/website/static/img/logo_big_light.svg">
<img alt="Fingerprinting suite" src="https://raw.githubusercontent.com/apify/fingerprint-suite/master/website/static/img/logo_big_dark.svg" width="500">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/apify/fingerprint-suite/master/static/logo_big_light.svg">
<img alt="Fingerprinting suite" src="https://raw.githubusercontent.com/apify/fingerprint-suite/master/static/logo_big_dark.svg" width="500">
</picture>

@@ -40,43 +40,59 @@ </a>

```typescript
const { chromium } = require('playwright');
const { FingerprintGenerator } = require('fingerprint-generator');
const { FingerprintInjector } = require('fingerprint-injector');
import { chromium } from 'playwright';
import { newInjectedContext } from 'fingerprint-injector';
(async () => {
const fingerprintGenerator = new FingerprintGenerator();
const browser = await chromium.launch({ headless: false });
const context = await newInjectedContext(
browser,
{
// Constraints for the generated fingerprint (optional)
fingerprintOptions: {
devices: ['mobile'],
operatingSystems: ['ios'],
},
// Playwright's newContext() options (optional, random example for illustration)
newContextOptions: {
geolocation: {
latitude: 51.50853,
longitude: -0.12574,
}
}
},
);
const browserFingerprintWithHeaders = fingerprintGenerator.getFingerprint({
devices: ['desktop'],
browsers: ['chrome'],
});
const page = await context.newPage();
// ... your code using `page` here
})();
```
const fingerprintInjector = new FingerprintInjector();
const { fingerprint } = browserFingerprintWithHeaders;
Here is the same example using Puppeteer:
const browser = await chromium.launch({ headless: false });
```typescript
import puppeteer from 'puppeteer';
import { newInjectedPage } from 'fingerprint-injector';
// With certain properties, we need to inject the props into the context initialization
const context = await browser.newContext({
userAgent: fingerprint.userAgent,
locale: fingerprint.navigator.language,
viewport: fingerprint.screen,
});
// Attach the rest of the fingerprint
await fingerprintInjector.attachFingerprintToPlaywright(context, browserFingerprintWithHeaders);
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await newInjectedPage(
browser,
{
// constraints for the generated fingerprint
fingerprintOptions: {
devices: ['mobile'],
operatingSystems: ['ios'],
},
},
);
const page = await context.newPage();
// ... your code using `page` here
// ... your code using `page` here
await page.goto('https://example.com');
})();
```
<!-- ## Performance
## Performance
With ever-improving performance of antibot fingerprinting services, we use some of the industry-leading services to benchmark our performance.
The following table shows how is the latest build of `fingerprint-suite` doing in tests provided by various open-source fingerprinting services.
The following table shows how is the latest build of `fingerprint-suite` doing in comparison to other popular fingerprinting tools.
The performace is evaluated using school-like grades (A being the best, F being the worst).
|Service|Grade|
|---|---|
|BotD |![](https://byob.yarr.is/apify/fingerprint-suite/BotD) |
|CreepJS |![](https://byob.yarr.is/apify/fingerprint-suite/CreepJS)| -->
![Fingerprinting Benchmark Report](https://raw.githubusercontent.com/apify/fingerprint-suite/master/test/antibot-services/live-testing/report.png)

@@ -83,0 +99,0 @@ ## Support

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