simple-scrape

a simple, promise-based scrape tool for node

Usage no npm install needed!

<script type="module">
  import simpleScrape from 'https://cdn.skypack.dev/simple-scrape';
</script>

README

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