0.0.2 • Published 9 years ago

simple-scrape v0.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

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');