e9df6750d2
🤖 I have created a release *beep* *boop* --- <details><summary>puppeteer: 19.5.2</summary> ## [19.5.2](https://github.com/puppeteer/puppeteer/compare/puppeteer-v19.5.1...puppeteer-v19.5.2) (2023-01-11) ### Miscellaneous Chores * **puppeteer:** Synchronize puppeteer versions ### Dependencies * The following workspace dependencies were updated * dependencies * puppeteer-core bumped from 19.5.1 to 19.5.2 </details> <details><summary>puppeteer-core: 19.5.2</summary> ## [19.5.2](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v19.5.1...puppeteer-core-v19.5.2) (2023-01-11) ### Bug Fixes * make sure browser fetcher in launchers uses configuration ([#9493](https://github.com/puppeteer/puppeteer/issues/9493)) ([df55439
](df554397b5
)), closes [#9470](https://github.com/puppeteer/puppeteer/issues/9470) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
49 lines
2.7 KiB
Markdown
49 lines
2.7 KiB
Markdown
---
|
|
sidebar_label: BrowserFetcher
|
|
---
|
|
|
|
# BrowserFetcher class
|
|
|
|
BrowserFetcher can download and manage different versions of Chromium and Firefox.
|
|
|
|
#### Signature:
|
|
|
|
```typescript
|
|
export declare class BrowserFetcher
|
|
```
|
|
|
|
## Remarks
|
|
|
|
BrowserFetcher is not designed to work concurrently with other instances of BrowserFetcher that share the same downloads directory.
|
|
|
|
## Example
|
|
|
|
An example of using BrowserFetcher to download a specific version of Chromium and running Puppeteer against it:
|
|
|
|
```ts
|
|
const browserFetcher = new BrowserFetcher({path: 'path/to/download/folder'});
|
|
const revisionInfo = await browserFetcher.download('533271');
|
|
const browser = await puppeteer.launch({
|
|
executablePath: revisionInfo.executablePath,
|
|
});
|
|
```
|
|
|
|
## Constructors
|
|
|
|
| Constructor | Modifiers | Description |
|
|
| --------------------------------------------------------------------- | --------- | --------------------------------------------------- |
|
|
| [(constructor)(options)](./puppeteer.browserfetcher._constructor_.md) | | Constructs a browser fetcher for the given options. |
|
|
|
|
## Methods
|
|
|
|
| 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) | | |
|
|
| [localRevisions()](./puppeteer.browserfetcher.localrevisions.md) | | |
|
|
| [platform()](./puppeteer.browserfetcher.platform.md) | | |
|
|
| [product()](./puppeteer.browserfetcher.product.md) | | |
|
|
| [remove(revision)](./puppeteer.browserfetcher.remove.md) | | |
|
|
| [revisionInfo(revision)](./puppeteer.browserfetcher.revisioninfo.md) | | |
|