UNPKG

fakebrowser

Version:

🤖 Fake fingerprints to bypass anti-bot systems. Simulate mouse and keyboard operations to make behavior like a real person.

34 lines (24 loc) • 775 B
// noinspection JSUnusedLocalSymbols 'use strict'; const {PuppeteerExtraPlugin} = require('puppeteer-extra-plugin'); const withUtils = require('../_utils/withUtils'); const withWorkerUtils = require('../_utils/withWorkerUtils'); class Plugin extends PuppeteerExtraPlugin { constructor(opts = {}) { super(opts); } get name() { return 'evasions/audio.fingerprint'; } async onPageCreated(page) { await withUtils(this, page).evaluateOnNewDocument(this.mainFunction); } onServiceWorkerContent(jsContent) { return withWorkerUtils(this, jsContent).evaluate(this.mainFunction); } mainFunction = (utils, opts) => { }; } module.exports = function (pluginConfig) { return new Plugin(pluginConfig); };