# @pscraper/scraper

> Download website to local directory (including all css, images, js, etc.)

Latest version **0.0.15** (published 2020-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pscraper/scraper
pnpm add @pscraper/scraper
yarn add @pscraper/scraper
bun add @pscraper/scraper
```

Provides the command `scraper`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.15 |
| Published | 2020-01-12 |
| First published | 2019-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | wahengchang |
| Maintainers | wahengchang |

## Links

- npm: https://www.npmjs.com/package/@pscraper/scraper
- Repository: https://github.com/wahengchang/pscraper
- Homepage: https://github.com/wahengchang/pscraper#readme
- Issues: https://github.com/wahengchang/pscraper/issues
- npm.io page: https://npm.io/package/@pscraper/scraper

## Dependencies (8)

- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.2
- [express](https://npm.io/package/express.md) ^4.16.4
- [nodemon](https://npm.io/package/nodemon.md) ^1.18.10
- [js-meter](https://npm.io/package/js-meter.md) ^1.1.4
- [optimist](https://npm.io/package/optimist.md) ^0.6.1
- [puppeteer](https://npm.io/package/puppeteer.md) ^1.6.1
- [body-parser](https://npm.io/package/body-parser.md) ^1.18.3
- [@pscraper/cmd](https://npm.io/package/@pscraper/cmd.md) ^0.0.15

## Recent versions

- 0.0.15 (latest) — 2020-01-12
- 0.0.14 — 2020-01-12
- 0.0.12 — 2019-12-17
- 0.0.11 — 2019-06-01
- 0.0.10 — 2019-04-09
- 0.0.9 — 2019-04-09
- 0.0.8 — 2019-04-09
- 0.0.7 — 2019-04-04
- 0.0.6 — 2019-04-04
- 0.0.4 — 2019-04-04
- 0.0.3 — 2019-04-04
- 0.0.2 — 2019-04-04
- 0.0.1 — 2019-04-04

## README

# Demo for @pscraper/scraper

## Install
```
$ yarn add @pscraper/scraper

or 


$ npm install @pscraper/scraper
```

## Run
```
$ npx @pscraper/scraper --config='./yourConfigName.js'

```

#### `./yourConfigName.js`
 - must have `./`

 ```js
const scrollDown = async function(page){
    await page.evaluate(async () => {
        await new Promise((resolve, reject) => {
          // implement browser javascript 
          window.scrollBy(0, 100);
        })
    });
  }

module.exports = {
  name: `yahoo-${new Date().getTime()}`,
  url: 'https://yahoo.com/',
  isDownloadResource: true, //save to  ./name/file.css
  isDownloadCookies: true,  //save to  ./name/cookies.json
  isReport: true,           //save to  ./name/report.json
  downloadResourceType: ['document','stylesheet','script','image','font','xhr','other'],
  afterPageLoad: scrollDown, 
  afterHtmlLoad: async function(html){
    // console.log(html)
  },
}
```

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