thibauts / node-google-search-scraper

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

Enhancement to return title, desc & metadata #9

Closed mnazwan closed 6 years ago

mnazwan commented 6 years ago

Add capability to retrieve title, descriptions & metadata (if any) as mentioned in #1 . Backward compatible.


var scraper = require('google-search-scraper');

var options = {
  query: 'nodejs',
  limit: 10
};

scraper.search(options, function(err, url, meta) {
  // This is called for each result
  if(err) throw err;
  console.log(url);
  console.log(meta.title);
  console.log(meta.meta);
  console.log(meta.desc)
});