1.8.12 • Published 1 month ago

puppeteer-pro v1.8.12

Weekly downloads
11
License
MIT
Repository
github
Last release
1 month ago

Puppeteer-Pro

A simple puppeteer wrapper to enable useful plugins with ease

Installation

Requires node v10 and higher

npm install puppeteer-pro

Quickstart

Puppeteer-Pro can do all the same things as puppeteer, just now with plugins!

// Puppeteer-Pro is a drop-in replacement for puppeteer
const PuppeteerPro = require('puppeteer-pro');

// Enable the 'avoidDetection' plugin to prevent headless detection
PuppeteerPro.avoidDetection();

// Enable the 'solveRecaptchas' plugin to solve Google's recaptchas (remember to provide a wit.api API access token)
const solver = PuppeteerPro.solveRecaptchas('WIT_AI_ACCESS_TOKEN');

(async () => {
  const browser = await PuppeteerPro.launch();
  const page = await browser.newPage();
  
  console.log('Testing the 🐱‍👤 avoidDetection 🐱‍👤 plugin..')
  await page.goto('https://arh.antoinevastel.com/bots/areyouheadless');
  await page.screenshot({ path: 'are-you-headless.png' });
  
  console.log('Testing the recaptcha solver..')
  await page.goto('https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php');
  await solver.waitForCaptcha(page); // Captcha script is deferred, so will load after page.goto completes
  await solver.solveRecaptcha(page);
  await page.screenshot({ path: 'is-recaptcha-solved.png' });

  await browser.close();
})();

Passive Improvements

  • There can be multiple request interception handlers for the same request. In such cases, the resulting response will prioritize respond, followed by abort, followed by continue. For example:
    • If amongst 5 handlers, respond is called 1 time, abort is called 2 times and continue is called 2 times, the result will be respond. This will occur after the first respond is called and not when all handlers are finished.
    • If amongst 5 handlers, abort is called 1 time and continue is called 4 times, the result will be abort. This will occur after all handlers are finished.
    • If amongst 5 handlers, all handlers call continue, the result will be continue. This will occur after all handlers are finished.

Optional Built-in Plugins

Anonymize User Agent

  • Anonymize the user-agent across all pages

Avoid Detection

  • Multiple techniques to combat headless browser detection

Block Resources

  • Block any resource type from loading
  • Can be used to speed up loading websites by blocking style sheets and images

Disable Dialogs

  • Block dialogs from popping up and stopping execution

Manage Cookies

  • Save and load cookies across sessions
  • Supports multiple profiles and switching between profiles

Manage Local Storage

  • Save and load local storage across sessions
  • Supports multiple profiles and switching between profiles

Solve Recaptcha

  • Solve Google's reCAPTCHA v2
  • Requires a FREE wit.ai access token
1.8.12

1 month ago

1.8.11

2 months ago

1.8.10

2 months ago

1.8.9

3 months ago

1.8.8

3 months ago

1.8.7

4 months ago

1.8.6

4 months ago

1.8.5

4 months ago

1.8.2

6 months ago

1.8.4

6 months ago

1.8.3

6 months ago

1.8.1

7 months ago

1.8.0

7 months ago

1.7.6

8 months ago

1.7.5

9 months ago

1.7.4

11 months ago

1.7.3

1 year ago

1.7.2

1 year ago

1.6.11

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.6.10

1 year ago

1.6.9

2 years ago

1.6.8

2 years ago

1.6.7

2 years ago

1.6.6

2 years ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.5

2 years ago

1.5.5

2 years ago

1.5.4

2 years ago

1.6.2

2 years ago

1.5.3

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.10

2 years ago

1.5.12

2 years ago

1.5.11

2 years ago

1.5.14

2 years ago

1.5.13

2 years ago

1.5.9

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago