It accepts every BrowserPool option plus the crawler's own launchContext and
headless, and derives the browser plugin from them - so a pool built here always matches the crawler it is
given to, and configuring one never means assembling a PlaywrightPlugin by hand.
Example usage:
const crawler =newPlaywrightCrawler({
browserPool:playwrightBrowserPool({
maxOpenPagesPerBrowser:1,
launchContext:{launcher: firefox },
}),
requestHandler:async({ page })=>{...},
});
The returned pool is not torn down by the crawler, which is what makes it shareable between crawlers.
Builds a BrowserPool of Playwright browsers to pass to a PlaywrightCrawler as its
browserPool.It accepts every
BrowserPooloption plus the crawler's ownlaunchContextandheadless, and derives the browser plugin from them - so a pool built here always matches the crawler it is given to, and configuring one never means assembling a PlaywrightPlugin by hand.Example usage:
The returned pool is not torn down by the crawler, which is what makes it shareable between crawlers.