puppeteer-cluster
puppeteer-cluster copied to clipboard
how to add adblocker
I can add adblocker like this to my puppeteer
const puppeteer = require('puppeteer-extra')
// Add adblocker plugin, which will transparently block ads in all pages you
// create using puppeteer.
const { DEFAULT_INTERCEPT_RESOLUTION_PRIORITY } = require('puppeteer')
const AdblockerPlugin = require('puppeteer-extra-plugin-adblocker')
puppeteer.use(
AdblockerPlugin({
// Optionally enable Cooperative Mode for several request interceptors
interceptResolutionPriority: DEFAULT_INTERCEPT_RESOLUTION_PRIORITY
})
)
with puppeteer cluster how can I puppeteer.use() to use such features?
with page
await cluster.queue({url someURL})
await cluster.task(async ({ page, data }) => { })
or with puppeteerOptions ?
const cluster = await Cluster.launch({puppeteerOptions: {}})