JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7599
  • Score
    100M100P100Q125277F

A module to search and scrape google.

Package Exports

  • google

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (google) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Node.js - google

This module allows you to search google by scraping the results. It does NOT use the Google Search API. PLEASE DO NOT ABUSE THIS. The intent of using this is convenience vs the cruft that exists in the Google Search API.

Installation

npm install google

Example

This prints out the first 50 search results of the query node.js best practices.

var google = require('google');

var nextCounter = 0;

google('node.js best practices', function(err, next, links){
  if (err) {
      console.error(err);
  } else {
      for (var i = 0; i < links.length; ++i) {
        console.log(links[i].title + ' - ' + links[i].link);
        console.log(links[i].description + "\n");
      }

      if (nextCounter < 4){
      nextCounter += 1;
      next();
      }

  }
});

License

Licensed under MIT. See LICENSE for more details.

Copyright (c) 2012 JP Richardson