Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cityssm/puppeteer-launch
Launch Puppeteer, falling back to system browsers when the cached ones aren't working or aren't available.
https://github.com/cityssm/puppeteer-launch
puppeteer puppeteer-firefox
Last synced: 2 months ago
JSON representation
Launch Puppeteer, falling back to system browsers when the cached ones aren't working or aren't available.
- Host: GitHub
- URL: https://github.com/cityssm/puppeteer-launch
- Owner: cityssm
- License: mit
- Created: 2024-04-02T16:26:41.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-09-03T13:30:52.000Z (5 months ago)
- Last Synced: 2024-09-05T11:23:36.410Z (5 months ago)
- Topics: puppeteer, puppeteer-firefox
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@cityssm/puppeteer-launch
- Size: 333 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Puppeteer Launch
[![npm (scoped)](https://img.shields.io/npm/v/@cityssm/puppeteer-launch)](https://www.npmjs.com/package/@cityssm/puppeteer-launch)
[![DeepSource](https://app.deepsource.com/gh/cityssm/puppeteer-launch.svg/?label=active+issues&show_trend=true&token=uZJ-emVRMecP7RWObivU3uT9)](https://app.deepsource.com/gh/cityssm/puppeteer-launch/)
[![Maintainability](https://api.codeclimate.com/v1/badges/e471091916c9aa631407/maintainability)](https://codeclimate.com/github/cityssm/puppeteer-launch/maintainability)
[![codecov](https://codecov.io/gh/cityssm/puppeteer-launch/graph/badge.svg?token=K55LQ4IX7T)](https://codecov.io/gh/cityssm/puppeteer-launch)
[![Coverage Testing](https://github.com/cityssm/puppeteer-launch/actions/workflows/coverage.yml/badge.svg)](https://github.com/cityssm/puppeteer-launch/actions/workflows/coverage.yml)A helper for `puppeteer.launch()`,
for when cached Puppeteer browsers aren't available or aren't compatible.A drop-in replacement the falls back to system browsers automatically!
## Installation
```sh
npm install @cityssm/puppeteer-launch
```## Usage
```javascript
import puppeteerLaunch from '@cityssm/puppeteer-launch'// Launch the default cached browser (likely Chrome).
// Will fallback to a system browser (either Chrome, Chromium, or Firefox)
// if no cached browser is available.
const browser = await puppeteerLaunch()// Launch a Firefox web browser.
// Will use a system Firefox if no Firefox in the Puppeteer cache.
const firefoxBrowser = await puppeteerLaunch({
browser: 'firefox'
})
```