1.1.7 • Published 4 years ago

krabber v1.1.7

Weekly downloads
23
License
MIT
Repository
gitlab
Last release
4 years ago

krabber

Easy to use webscraper using Axios and JSDOM.

Codecov branch Gitlab pipeline status (branch) Libraries.io dependency status for latest release npm

Example

import { Scrape } from 'krabber';

const scrapeConfig = {
    url: 'https://github.com/axios/axios',
    options: {
        headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0' }
    },
    select: {
        numberOfCommits: ({ dom, res, prev, url }) => {
            return dom.querySelector('.commits span.text-emphasized.num').innerHTML.trim();
        }
    }
}

Scrape(scrapeConfig)
    .then((res) => {
        console.log(res.numberOfCommits);
    })

More examples, including pagination handling

Please see the test suite in src/lib/scrape.spec.ts

1.1.7

4 years ago

1.1.5

4 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago