JSPM

puppeteer-extra-stealth-plugin-anonymize-ua

2.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q36555F
  • License MIT

Enhanced User-Agent anonymization plugin for puppeteer-extra with advanced features.

Package Exports

  • puppeteer-extra-stealth-plugin-anonymize-ua
  • puppeteer-extra-stealth-plugin-anonymize-ua/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (puppeteer-extra-stealth-plugin-anonymize-ua) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

puppeteer-extra-stealth-plugin-anonymize-ua

A fork of puppeteer-extra plugin for puppeteer-extra-stealth with enhanced User-Agent anonymization features.

Install

yarn add puppeteer-extra-stealth-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 {})
    • opts.stripHeadless boolean Replace HeadlessChrome with Chrome. (optional, default true)
    • opts.makeWindows boolean Sets the platform to Windows 10, 64bit (most common). (optional, default true)
    • opts.customFn Function A custom UA replacer function. (optional, default null)

Example:

const puppeteer = require('puppeteer-extra-stealth')
puppeteer.use(require('puppeteer-extra-stealth-plugin-anonymize-ua')())
// or
puppeteer.use(require('puppeteer-extra-stealth-plugin-anonymize-ua')({
  customFn: (ua) => 'MyCoolAgent/' + ua.replace('Chrome', 'Beer')})
)
const browser = await puppeteer.launch()