L
L
Log for 10 Skeleton2021-08-27 12:28:28
Google Chrome
Log for 10 Skeleton, 2021-08-27 12:28:28

Is it possible to make a multisession through puppeteer, with different profiles or something like that?

Is it possible to make a multisession through puppeteer, with different profiles or something like that? As a result, at the output, to receive on each tab (Page) its own session with separate cookies
and localStorage Listening to all requests, you can bind a proxy to each tab ... but maybe someone knows more methods Thanks in advance!



Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zlatoslav Desyatnikov, 2021-09-02
@pxz

Can. But not Page, but different Browser instances.

const browsers = await Promise.all([
    puppeteer.launch(puppeteerOptions),
    puppeteer.launch(puppeteerOptions),
    puppeteer.launch(puppeteerOptions),
]);

const page1 = await browsers[0].newPage();
const page2 = await browsers[1].newPage();
const page3 = await browsers[2].newPage();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question