0.0.2 • Published 9 years ago
simple-scrape v0.0.2
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');