# slurper

> Download an image by specifying it's id

Latest version **1.0.0** (published 2015-01-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install slurper
pnpm add slurper
yarn add slurper
bun add slurper
```

Provides the command `slurper`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-01-18 |
| First published | 2014-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Geir Gåsodden |
| Maintainers | zrrrzzt |

## Links

- npm: https://www.npmjs.com/package/slurper
- Repository: http://github.com/zrrrzzt/slurper
- Homepage: https://github.com/zrrrzzt/slurper
- Issues: http://github.com/zrrrzzt/slurper/issues
- npm.io page: https://npm.io/package/slurper

## Dependencies (4)

- [cheerio](https://npm.io/package/cheerio.md) ^0.18.0
- [request](https://npm.io/package/request.md) ^2.51.0
- [minimist](https://npm.io/package/minimist.md) ^1.1.0
- [valid-url](https://npm.io/package/valid-url.md) ^1.0.9

## Recent versions

- 1.0.0 (latest) — 2015-01-18
- 0.0.5 — 2014-05-24
- 0.0.4 — 2014-03-10
- 0.0.3 — 2014-03-08
- 0.0.2 — 2014-03-07
- 0.0.1 — 2014-03-05

## README

#Slurper [![Build Status](https://travis-ci.org/zrrrzzt/slurper.svg?branch=master)](https://travis-ci.org/zrrrzzt/slurper)

Node module/CLI app for downloading an image from by specifying it's id.

##Installation

```
$ npm install slurper
```

To install globally use ```-g```

```
$ npm install -g slurper
```

##Usage - module

Pass an options object.

**url** - Url for page with the image (required)

**id** - Id for the image element (required)

**fileName** - Filename for the downloaded image (required)

```
'use strict';

var slurper = require('slurper');
var options = {
  url: 'http://www.dagbladet.no/tegneserie/lunch/',
  id: '#lunch-stripe',
  fileName: 'lunch.gif'
};

slurper(options, function(error, data){
  if(error){
    console.error(error);
  } else {
    console.log(data.message);
  }
});
```

Returned data

```
{
  message: 'File downloaded'
}
```

##Usage - CLI

```
sluper <url> --id=#id-for-image --filename=filename.gif
```

Example

```
$ slurper 'http://www.dagbladet.no/tegneserie/lunch/' --id='#lunch-stripe' --filename='lunch.gif'
```

Saves the image as lunch.gif and outputs

```
File download
```

###Version

```
$ slurper -v
```

###Help

```
$ slurper -h
```

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