1.1.56 ā€¢ Published 2 years ago

@scaleleap/puppeteer v1.1.56

Weekly downloads
177
License
MIT
Repository
-
Last release
2 years ago

npm.io

šŸ“¦ @scaleleap/puppeteer

A Puppeteer convenience wrapper with stealth mode enabled by default.


Download & Installation

$ npm i -s @scaleleap/puppeteer

Usage

Exports everything the same as puppeteer-core package.

In addition to that, launch method is amended to include an extra option that can enable or disable puppeteer-extra behavior.

Also executablePath is set, and headless is set via PUPPETEER_HEADLESS environment variable.

import { launch } from '@scaleleap/puppeteer'

const await browser = launch({
  extra: {
    // is true by default, but we are just showing the example
    stealth: true
  }
})

Helper Functions

clickAndWait(page: Page, selector: string, clickOptions?: ClickOptions, navigationOptions?: NavigationOptions)

Clicks and waits for network request to complete and resolves.

Environment Variables

The following environment variables are available:

  • PUPPETEER_EXECUTABLE_PATH - the location of the Puppeteer executable.
  • GOOGLE_CHROME_BIN - same as above, but only used inside Heroku buildpack.
  • PUPPETEER_HEADLESS - Whether or not it should run in headless mode. Default: true

Heroku

For Heroku deployments, use a heroku/google-chrome buildpack.

This package will get the Chrome locations from the environment variable provided by the buildpack.

## make sure we are using NodeJS
heroku buildpacks:set heroku/nodejs

## now add chrome buildpack
heroku buildpacks:add heroku/google-chrome

References

Contributing

This repository uses Conventional Commit style commit messages.

Authors or Acknowledgments

License

This project is licensed under the MIT License.

Badges

GitHub Workflow Status NPM License Coveralls Semantic Release

1.1.56

2 years ago

1.1.55

2 years ago

1.1.54

3 years ago

1.1.52

3 years ago

1.1.53

3 years ago

1.1.51

3 years ago

1.1.50

3 years ago

1.1.49

3 years ago

1.1.48

3 years ago

1.1.47

3 years ago

1.1.46

3 years ago

1.1.45

3 years ago

1.1.44

3 years ago

1.1.43

3 years ago

1.1.41

3 years ago

1.1.42

3 years ago

1.1.40

3 years ago

1.1.39

3 years ago

1.1.38

3 years ago

1.1.37

3 years ago

1.1.36

3 years ago

1.1.35

3 years ago

1.1.34

3 years ago

1.1.33

3 years ago

1.1.32

3 years ago

1.1.31

3 years ago

1.1.30

3 years ago

1.1.29

3 years ago

1.1.28

4 years ago

1.1.27

4 years ago

1.1.26

4 years ago

1.1.25

4 years ago

1.1.24

4 years ago

1.1.23

4 years ago

1.1.22

4 years ago

1.1.21

4 years ago

1.1.19

4 years ago

1.1.20

4 years ago

1.1.18

4 years ago

1.1.17

4 years ago

1.1.16

4 years ago

1.1.15

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.14

4 years ago

1.1.13

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago