Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silvestrodecaro/puppeteer-cluster-with-fingerprints
Example code of using puppeteer-cluster and puppeteer-with-fingerprints together
https://github.com/silvestrodecaro/puppeteer-cluster-with-fingerprints
automation browser browser-fingerprint browser-fingerprinting chrome chromedriver chromium cluster fingerprint fingerprinting fingerprints puppeteer puppeteer-cluster puppeteer-with-fingerprints stealth
Last synced: 4 months ago
JSON representation
Example code of using puppeteer-cluster and puppeteer-with-fingerprints together
- Host: GitHub
- URL: https://github.com/silvestrodecaro/puppeteer-cluster-with-fingerprints
- Owner: silvestrodecaro
- License: mit
- Created: 2024-07-05T12:58:20.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-26T16:13:02.000Z (6 months ago)
- Last Synced: 2024-09-30T15:14:00.985Z (4 months ago)
- Topics: automation, browser, browser-fingerprint, browser-fingerprinting, chrome, chromedriver, chromium, cluster, fingerprint, fingerprinting, fingerprints, puppeteer, puppeteer-cluster, puppeteer-with-fingerprints, stealth
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Puppeteer Cluster with Fingerprints
This is a "template" repository that you can use to run multiple instances with unique fingerprints using the [puppeteer-with-fingerprints](https://github.com/CheshireCaat/puppeteer-with-fingerprints) library in conjunction with [puppeteer-cluster](https://github.com/thomasdondorf/puppeteer-cluster). For more details, check out their repositories, and most importantly, support them.## Installation
First, clone the repository:
```bash
git clone https://github.com/silvestrodecaro/puppeteer-cluster-with-fingerprints.git
cd puppeteer-cluster-with-fingerprints
```Then install the dependencies:
```bash
npm install puppeteer puppeteer-with-fingerprints puppeteer-cluster
```## Usage
Here's an example of how to use the script:
```js
const { plugin } = require("puppeteer-with-fingerprints");
const { Cluster } = require('puppeteer-cluster');(async () => {
// Get a fingerprint from the server:
const fingerprint = await plugin.fetch('', {
tags: ['Microsoft Windows', 'Chrome'],
});// Apply fingerprint:
plugin.useFingerprint(fingerprint);const cluster = await Cluster.launch({
puppeteer: plugin,
concurrency: Cluster.CONCURRENCY_CONTEXT,
maxConcurrency: 2,
puppeteerOptions: {
headless: false,
},
});await cluster.task(async ({ page, data: url }) => {
await page.goto(url);
await page.screenshot({ path: `${ await page.title() }.png`});
// Store screenshot, do something else
});cluster.queue('http://www.google.com/');
cluster.queue('http://www.wikipedia.org/');
// many more pagesawait cluster.idle();
await cluster.close();
})();
```## WARNING
This project relies on the 'puppeteer-with-fingerprints' and 'puppeteer-cluster' libraries, which in turn depend on [Puppeteer Framework](https://github.com/puppeteer/puppeteer). As Puppeteer is constantly being updated, there may be issues with regressions and compatibility. It is recommended to frequently check for updates and test your implementation to ensure continued functionality.
## License
This project is licensed under the MIT License.