import { BrowserFetcher } from "https://deno.land/x/puppeteer@16.2.0/src/deno/BrowserFetcher.ts";
BrowserFetcher can download and manage different versions of Chromium and Firefox.
Examples
An example of using BrowserFetcher to download a specific version of Chromium
and running Puppeteer against it:
An example of using BrowserFetcher to download a specific version of Chromium and running Puppeteer against it:
const browserFetcher = puppeteer.createBrowserFetcher();
const revisionInfo = await browserFetcher.download('533271');
const browser = await puppeteer.launch({executablePath: revisionInfo.executablePath})
NOTE BrowserFetcher is not designed to work concurrently with other instances of BrowserFetcher that share the same downloads directory.
Methods
private
setPlatform(platformFromOptions?: Platform): void_getFolderPath(revision: string): string
canDownload(revision: string): Promise<boolean>
Initiates a HEAD request to check if the revision is available.
download(revision: string, progressCallback?: (x: number, y: number) => void): Promise<BrowserFetcherRevisionInfo>
Initiates a GET request to download the revision from the host.
host(): string
localRevisions(): Promise<string[]>
platform(): Platform
product(): Product
remove(revision: string): Promise<void>
revisionInfo(revision: string): BrowserFetcherRevisionInfo