everybody. I'm trying to make puppeter-cluster for each task create its own browser instance and it is very important that this browser instance is launched on certain data from the past session in a normal puppeter they are passed through userDataDir when using the launch method.
I found the perBrowserOptions parameter to which you can pass the configurations for the individual browser instance. But how do I, for example, specify which of the previously passed browser parameters in perBrowserOptions I want to use when launching cluster.queue() is unclear.
Here is my example code where I run a separate browser instance on puppeter This is where I'm loading data from past account sessions for the browser.
this.browser = await this.puppeteer.launch({
userDataDir: `./tmp/${accountData?._id}`,
headless: false,
args: args,
});
Now I'm trying to set up work for several accounts at the same time and each account needs its own browser and puppeter-cluster seems to be suitable for this, but I've encountered a problem, I can't configure session reuse.