# @pscraper/cmd

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

## Install

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

## 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 | 0 |
| Unpacked size | 807 B |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | wahengchang |
| Maintainers | wahengchang |

## Links

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

## Recent versions

- 0.0.15 (latest) — 2020-01-12
- 0.0.14 — 2020-01-12
- 0.0.13 — 2020-01-12
- 0.0.5 — 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/cmd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
