Closed jaequery closed 6 years ago
Should be possible with a few more cheerio calls. I'll accept pull requests in this respect. Though for backward compatibility the callback signature would ideally be updated in this way :
scraper.search(options, function(err, url, meta) {
if(err) throw err;
console.log(meta);
});
meta
being an object containing the title, desc, date, ... properties.
Would be nice to have the total number of results per specific query as well.
In my opinion the number of search results, being an approximation and having no relation to actually retrievable results, doesn't add much value. But i guess is could be easily extracted and output on stderr, so as not to clobber the results output.
Personally, would really benefit from this feature being in place! Thanks mnazwan for opening the enhancement!
Merged and published to npm.
Works great, thanks so much!
it'd been real nice if it returned more than just the url, like title/description/date. is that even possible?