puppeteer-extra-plugin-anonymize-ua
v2.4.6
Published
Anonymize User-Agent in puppeteer.
Downloads
24,818
Maintainers
Readme
puppeteer-extra-plugin-anonymize-ua
A plugin for puppeteer-extra.
Install
yarn add puppeteer-extra-plugin-anonymize-ua
API
Table of Contents
Plugin
Extends: PuppeteerExtraPlugin
Anonymize the User-Agent on all pages.
Supports dynamic replacing, so the Chrome version stays intact and recent.
Type: function (opts)
opts
Object Options (optional, default{}
)
Example:
const puppeteer = require('puppeteer-extra')
puppeteer.use(require('puppeteer-extra-plugin-anonymize-ua')())
// or
puppeteer.use(require('puppeteer-extra-plugin-anonymize-ua')({
customFn: (ua) => 'MyCoolAgent/' + ua.replace('Chrome', 'Beer')})
)
const browser = await puppeteer.launch()