0.1.4 • Published 2 years ago

@fuseble.inc/puppeteer v0.1.4

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Puppeteer Cluster

Example - Starter

import { PuppeteerCluster, wait } from '@fuseble.inc/puppeteer';

const cluster = await PuppeteerCluster.launch('clusterId', {
  concurrency: 'BROWSER',
  maxConcurrency: 2,
});

cluster.task('taskId', async (page, { browser, logger, clusterId, taskId, changeTask }) => {
  await page.goto('https://example.com');
  await page.screenshot({ path: 'example.png' });
  await wait(1000);
});

await cluster.init();
await cluster.close();

Browserless Setting

Docker Setting

docker run -p 3000:3000 \
-e "CONNECTION_TIMEOUT=-1" \
-e "WORKSPACE_DELETE_EXPIRED=true" \
-e "WORKSPACE_EXPIRE_DAYS=7" \
-e "EXIT_ON_HEALTH_FAILURE=true" \
-e "DEFAULT_BLOCK_ADS=true" \
-e "DEFAULT_LAUNCH_ARGS=[\"--window-size=1920,1080\", \"--mute-audio\"]" \
--restart always -d \
--name browserless-3000 browserless/chrome:1-chrome-stable
0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago