Reputation: 408
I want to use a remote headless browser service (this one) and in the docs they use puppeteer.connect()
instead of puppeteer.launch()
this the code to launch the puppeteer cluster:
const cluster = await Cluster.launch({
concurrency: Cluster.CONCURRENCY_PAGE,
maxConcurrency: 10,
monitor: true,
options: {
timeout: 0,
}
});
how can I use puppeteer.connect() in puppeteer-cluster?
Upvotes: 0
Views: 2700
Reputation: 484
What is the use-case for connecting to an already open Chrome?
Puppeteer-cluster manages the whole operation of opening, closing the worker puppeteer browsers for you.
Look at this example I wrote, the syntax is correct, you can even copypasta it and use it yourself. The question is not really relevant to your query, but the code, you can use if you want, TD, the creator helped me come up with it.
Upvotes: 1