5.0.0 • Published 1 year ago

raspar v5.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
1 year ago

raspar

A simple to use Promise-based web scraper with local caching.

Tests NPM Version Latest Documentation

Usage

import fetch from 'raspar';

const contents = await fetch('http://www.google.com/humans.txt');

console.log(contents);

Options

import fetch from 'raspar';

const options = {
  cacheDirectory: 'temp/cache/',
  requestOptions: {
    headers: {
      'User-Agent': 'request'
    },
    method: 'POST'
  },
  ttl: 1800
};

const contents = await fetch('http://www.google.com/humans.txt', options);

console.log(contents);
NameDescriptionDefault Value
cacheDirectoryDirectory to store cache.temp/cache/
requestOptionsRequest options object. Read more github.com/node-fetch/node-fetch{}
ttlTTL (Time to live) in seconds.1800
5.0.0

1 year ago

4.0.0

1 year ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.0

5 years ago

2.0.0

6 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago