https://github.com/f9mac/puppeteer-extra-plugin-aws
A plugin for puppeteer-extra to run puppeteer on AWS infrastructure like ECS or EC2
https://github.com/f9mac/puppeteer-extra-plugin-aws
aws puppeteer puppeteer-aws puppeteer-extra puppeteer-plugins
Last synced: 14 days ago
JSON representation
A plugin for puppeteer-extra to run puppeteer on AWS infrastructure like ECS or EC2
- Host: GitHub
- URL: https://github.com/f9mac/puppeteer-extra-plugin-aws
- Owner: f9mac
- License: mit
- Created: 2019-07-22T16:15:51.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T18:18:26.000Z (over 2 years ago)
- Last Synced: 2024-10-13T18:07:35.727Z (7 months ago)
- Topics: aws, puppeteer, puppeteer-aws, puppeteer-extra, puppeteer-plugins
- Language: JavaScript
- Homepage:
- Size: 94.7 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# puppeteer-extra-plugin-aws
> A plugin for [puppeteer-extra](https://github.com/berstend/puppeteer-extra) to run puppeteer on AWS infrastructure like ECS or EC2. (Might also work on Lambda)
## Install
```bash
yarn add puppeteer-extra-plugin-aws
# - or -
npm install puppeteer-extra-plugin-aws
```If this is your first [puppeteer-extra](https://github.com/berstend/puppeteer-extra) plugin here's everything you need:
```bash
yarn add puppeteer puppeteer-extra puppeteer-extra-plugin-aws
# - or -
npm install puppeteer puppeteer-extra puppeteer-extra-plugin-aws
```## Usage
```js
// puppeteer-extra is a drop-in replacement for puppeteer,
// it augments the installed puppeteer with plugin functionality
const puppeteer = require('puppeteer-extra');
// require AWS plugin
const awsPlugin = require('puppeteer-extra-plugin-aws');
// add AWS plugin
puppeteer.use(awsPlugin());// puppeteer usage as normal
puppeteer.launch({ headless: true }).then(async browser => {
const page = await browser.newPage()
await page.setViewport({ width: 800, height: 600 })
// will work on AWS
await page.goto("https://example.com")
await page.waitFor(5000)
await browser.close()
})
```For more info [see the tests](./test/test.js).