# node-proshot

> Handy tool to capture website screenshots using Puppeteer.

Latest version **1.3.6** (published 2018-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-proshot
pnpm add node-proshot
yarn add node-proshot
bun add node-proshot
```

Provides the commands `promultishot`, `proscreenshot`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.6 |
| Published | 2018-08-02 |
| First published | 2018-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.4.0 |
| Dependencies | 3 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Pete Houston |
| Maintainers | petehouston |
| Keywords | puppeteer, screenshot, webshot, photoshot, capture |

## Links

- npm: https://www.npmjs.com/package/node-proshot
- Repository: https://github.com/petehouston/node-proshot
- Homepage: https://github.com/petehouston/node-proshot#readme
- Issues: https://github.com/petehouston/node-proshot/issues
- npm.io page: https://npm.io/package/node-proshot

## Dependencies (3)

- [meow](https://npm.io/package/meow.md) ^5.0.0
- [puppeteer](https://npm.io/package/puppeteer.md) ^1.6.1
- [url-parse](https://npm.io/package/url-parse.md) ^1.4.3

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 1.3.6 (latest) — 2018-08-02
- 1.3.5 — 2018-08-02
- 1.3.4 — 2018-08-02
- 1.3.3 — 2018-08-02
- 1.3.2 — 2018-08-02
- 1.3.1 — 2018-08-02
- 1.3.0 — 2018-08-02
- 1.2.3 — 2018-08-02
- 1.2.2 — 2018-08-02
- 1.2.1 — 2018-08-02
- 1.2.0 — 2018-08-02
- 1.1.0 — 2018-08-02
- 1.0.0 — 2018-08-02

## README

# node-proshot

Handy tool to capture website screenshots using Puppeteer.

## Installation

```
$ npm install node-proshot
```

## Usage


```js
const proshot = require('node-proshot');
```


## Take a screenshot for a website

```js
proshot.screenshot(URL, FILE_NAME_TO_SAVE, CONFIG);
```

The `CONFIG` have following properties:

* `timeout`: duration to wait for AJAX loading to complete. Default to 5000 milliseconds.
* `viewport {width, height}`: the viewport to take screenshot. Default: 1280x720.

For examples:

```js
proshot.screenshot('https://petehouston.com', 'petehouston.com.png', { 
    viewport: { 
        width: 1920,
        height: 1080
    },
    timeout: 2000 
});

proshot.screenshot('https://petehouston.com', 'petehouston.com.png', { timeout: 2000 });

proshot.screenshot('https://moso.com', 'moso.com.jpg');
```

## Take screenshots for multiple websites at a time

```js
proshot.multishot(URL_ARRAY, DIRECTORY_TO_SAVE, CONFIG);
```

* `URL_ARRAY` : the array of websites, should start with either `http` or `https`.
* `DIRECTORY_TO_SAVE`: this should be the folder where screenshots are stored. Default: directory where script is executed.
* `CONFIG`: have following properties:
  * `viewport`: viewport to take screenshots. Default: 1280x720.
  * `timeout` : duration to wait for AJAX loading to complete. Default to 5000 milliseconds.
  * `extension` : image file types. It could be `jpg` or `png`.

Examples:

```js
proshot.multishot([
    'https://petehouston.com',
    'https://apple.com',
    'https://youtube.com'
]);

proshot.multishot([
    'https://petehouston.com',
    'https://apple.com',
    'https://youtube.com'
], '/home/petehouston/screenshots');

proshot.multishot([
    'https://petehouston.com',
    'https://apple.com',
    'https://youtube.com'
], '/home/petehouston/screenshots', {
    viewport: { width: 1920, height: 1080 },
    timeout: 3000,
    extension: 'jpg'
});
```

---
_Source: https://npm.io/package/node-proshot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
