thibauts / node-google-search-scraper

Google search scraper with captcha solving support
MIT License
89 stars 40 forks source link

return more than just url? #1

Closed jaequery closed 6 years ago

jaequery commented 9 years ago

it'd been real nice if it returned more than just the url, like title/description/date. is that even possible?

thibauts commented 9 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.

teckays commented 8 years ago

Would be nice to have the total number of results per specific query as well.

thibauts commented 8 years ago

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.

perryjm commented 6 years ago

Personally, would really benefit from this feature being in place! Thanks mnazwan for opening the enhancement!

thibauts commented 6 years ago

Merged and published to npm.

perryjm commented 6 years ago

Works great, thanks so much!