simple-scrape

0.0.2 • Public • Published

simple-scrape

a simple, promise-based scrape tool for node

examples

import scrape from 'simple-scrape';

async function scrapeUrl(url) {
  let data = await scrape(url)
    .then(doc => doc.set({
      'title': 'title',
      'url': 'td.title > a@href',
      'comments': '.comment > font'
    }));

  console.log('data', data);
}

scrapeUrl('https://news.ycombinator.com/item?id=9901450');

Readme

Keywords

none

Package Sidebar

Install

npm i simple-scrape

Weekly Downloads

5

Version

0.0.2

License

MIT

Last publish

Collaborators

  • cezary