puppeteer-extra
Advanced tools
Comparing version 3.1.4 to 3.1.5
/*! | ||
* puppeteer-extra v3.1.3 by berstend | ||
* puppeteer-extra v3.1.4 by berstend | ||
* https://github.com/berstend/puppeteer-extra | ||
@@ -4,0 +4,0 @@ * @license MIT |
/*! | ||
* puppeteer-extra v3.1.3 by berstend | ||
* puppeteer-extra v3.1.4 by berstend | ||
* https://github.com/berstend/puppeteer-extra | ||
@@ -4,0 +4,0 @@ * @license MIT |
{ | ||
"name": "puppeteer-extra", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"description": "Teach puppeteer new tricks through plugins.", | ||
@@ -52,3 +52,3 @@ "repository": "berstend/puppeteer-extra", | ||
"puppeteer-extra-plugin": "^3.1.2", | ||
"puppeteer-extra-plugin-anonymize-ua": "^2.2.3", | ||
"puppeteer-extra-plugin-anonymize-ua": "^2.2.4", | ||
"puppeteer-firefox": "^0.5.0", | ||
@@ -77,3 +77,3 @@ "rimraf": "^3.0.0", | ||
}, | ||
"gitHead": "e52842520747a4a2ae8c5151660d4edf1926286e" | ||
"gitHead": "4ccd12798f596c65d7c82e3e3ea31aadbd81bdd9" | ||
} |
@@ -30,3 +30,3 @@ # puppeteer-extra [![Build Status](https://travis-ci.org/berstend/puppeteer-extra.svg?branch=master)](https://travis-ci.org/berstend/puppeteer-extra) [![npm](https://img.shields.io/npm/v/puppeteer-extra.svg)](https://www.npmjs.com/package/puppeteer-extra) [![npm](https://img.shields.io/npm/dt/puppeteer-extra.svg)](https://www.npmjs.com/package/puppeteer-extra) [![npm](https://img.shields.io/npm/l/puppeteer-extra.svg)](https://www.npmjs.com/package/puppeteer-extra) | ||
// Add adblocker plugin to efficiently block all ads and trackers (saves bandwidth!) | ||
// Add adblocker plugin to block all ads and trackers (saves bandwidth) | ||
const AdblockerPlugin = require('puppeteer-extra-plugin-adblocker') | ||
@@ -74,2 +74,5 @@ puppeteer.use(AdblockerPlugin({ blockTrackers: true })) | ||
> `puppeteer-extra` and most plugins are written in TS, | ||
> so you get perfect type support out of the box. :) | ||
```ts | ||
@@ -99,5 +102,9 @@ import puppeteer from 'puppeteer-extra' | ||
<details> | ||
<summary><strong>Firefox usage</strong></summary><br/> | ||
<summary><strong>Using with <code>puppeteer-firefox</code></strong></summary><br/> | ||
> [puppeteer-firefox](https://github.com/puppeteer/puppeteer/tree/master/experimental/puppeteer-firefox) is still new and experimental, you can follow it's progress [here](https://aslushnikov.github.io/ispuppeteerfirefoxready/). | ||
```js | ||
// Any puppeteer API-compatible puppeteer implementation | ||
// or version can be augmented with `addExtra`. | ||
const { addExtra } = require('puppeteer-extra') | ||
@@ -118,2 +125,34 @@ const puppeteer = addExtra(require('puppeteer-firefox')) | ||
<details> | ||
<summary><strong>Using with <code>chrome-aws-lambda</code></strong></summary><br/> | ||
> If you plan to use [chrome-aws-lambda](https://github.com/alixaxel/chrome-aws-lambda) with the [`stealth`](/packages/puppeteer-extra-plugin-stealth) plugin, you'll need to modify the default args to remove the | ||
> `--disable-notifications` flag to pass all the tests. | ||
```js | ||
const chromium = require('chrome-aws-lambda') | ||
const { addExtra } = require('puppeteer-extra') | ||
const puppeteerExtra = addExtra(chromium.puppeteer) | ||
const launch = async () => { | ||
puppeteerExtra | ||
.launch({ | ||
args: chromium.args, | ||
defaultViewport: chromium.defaultViewport, | ||
executablePath: await chromium.executablePath, | ||
headless: chromium.headless | ||
}) | ||
.then(async browser => { | ||
const page = await browser.newPage() | ||
await page.goto('https://www.spacejam.com/archive/spacejam/movie/jam.htm') | ||
await page.waitFor(10 * 1000) | ||
await browser.close() | ||
}) | ||
} | ||
launch() // Launch Browser | ||
``` | ||
</details> | ||
--- | ||
@@ -130,3 +169,3 @@ | ||
- Very fast & efficient blocker for ads and trackers. Reduces bandwidth & load times. | ||
- Thanks to [@remusao](https://github.com/remusao) for contributing this sweet plugin π | ||
- Thanks to [@remusao](https://github.com/remusao) for contributing this plugin π | ||
@@ -133,0 +172,0 @@ #### π΄ [`puppeteer-extra-plugin-recaptcha`](/packages/puppeteer-extra-plugin-recaptcha) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143260
462