Skip to content

toddalia/puppeteer-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Pool of puppeteer processes managed with generic-pool.

const createPuppeteerPool = require('puppeteer-pool');
let pool = createPuppeteerPool(
  maxUses: 2000, // max usage count of puppeteer instance
  min: 2, // min number of processes in the pool
  max: 10,
  puppeteerArgs: { // args passed to puppeteer.launch
    headless: true,
    executablePath: "<PATH-TO-CHROME>",
    dumpio: true
  }
)
const browser = await pool.acquire();
await pool.release(browser);
await pool.drain();
await pool.clear();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published