2022-07-05 13:41:43 +00:00
---
sidebar_label: BrowserFetcher
---
# BrowserFetcher class
BrowserFetcher can download and manage different versions of Chromium and Firefox.
2022-10-24 07:07:05 +00:00
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
export declare class BrowserFetcher
```
## Remarks
2022-10-10 15:51:18 +00:00
BrowserFetcher is not designed to work concurrently with other instances of BrowserFetcher that share the same downloads directory.
2022-07-05 13:41:43 +00:00
## Example
An example of using BrowserFetcher to download a specific version of Chromium and running Puppeteer against it:
```ts
2022-10-21 13:09:21 +00:00
const browserFetcher = new BrowserFetcher({path: 'path/to/download/folder'});
2022-07-05 13:41:43 +00:00
const revisionInfo = await browserFetcher.download('533271');
const browser = await puppeteer.launch({
executablePath: revisionInfo.executablePath,
});
```
2022-10-10 15:51:18 +00:00
## Constructors
| Constructor | Modifiers | Description |
| --------------------------------------------------------------------- | --------- | --------------------------------------------------- |
| [(constructor)(options) ](./puppeteer.browserfetcher._constructor_.md ) | | Constructs a browser fetcher for the given options. |
2022-07-05 13:41:43 +00:00
## Methods
2023-03-30 11:54:00 +00:00
| Method | Modifiers | Description |
| ------------------------------------------------------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| [canDownload(revision) ](./puppeteer.browserfetcher.candownload.md ) | | Initiates a HEAD request to check if the revision is available. |
| [download(revision, progressCallback) ](./puppeteer.browserfetcher.download.md ) | | Initiates a GET request to download the revision from the host. |
| [host() ](./puppeteer.browserfetcher.host.md ) | | The download host being used. |
| [localRevisions() ](./puppeteer.browserfetcher.localrevisions.md ) | | |
| [platform() ](./puppeteer.browserfetcher.platform.md ) | | Returns the current < code > Platform</ code > , which is one of < code > mac</ code > , < code > linux</ code > , < code > win32</ code > or < code > win64</ code > . |
| [product() ](./puppeteer.browserfetcher.product.md ) | | Returns the current < code > Product</ code > , which is one of < code > chrome</ code > or < code > firefox</ code > . |
| [remove(revision) ](./puppeteer.browserfetcher.remove.md ) | | |
| [revisionInfo(revision) ](./puppeteer.browserfetcher.revisioninfo.md ) | | |