0.1.4 • Published 1 year ago

@fuseble.inc/puppeteer v0.1.4

Weekly downloads
-
License
-
Repository
-
Last release
1 year 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

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago