Giter Club home page Giter Club logo

google-it's Introduction

google-it-reborn Build Status npm version Codecov Coverage Maintainability

Fork made of the original Google-It
A simple library to convert Google search results to JSON output, with an interactive display option coming in the near future.

Install

$ npm install --save -g google-it-reborn

Example Usage

$ google-it-reborn --query="Latvian unicorn"

GIF of google-it

Prevent display in the terminal, and save results to a JSON file:

$ google-it-reborn --query="PWAs with react-router and redux" -o results.json -n

GIF of google-it w/o display, results saved to file

$ google-it-reborn --query="open whisper systems" -O 5

GIF of opening-in-browser

$ google-it-reborn --query="mechanical turk" --only-urls

Screenshot of only-urls option

Command Line Arguments

  • query - the query that should be sent to the Google search
  • output - name of the JSON file to save results to
  • no-display - prevent results from appearing in the terminal output. Should only be used with --output (-o) command when saving results to a file
  • save - name of the html file if you want to save the actual response from the html request (useful for debugging purposes)
  • limit - number of search results to be returned
  • only-urls - only display the URLs, instead of the titles and snippets
  • verbose - console.log useful statements to show what's currently taking place
  • interactive - once results are returned, show them in an interactive prompt where user can scroll through them
  • bold-matching-text - only takes effect when interactive (-i) flag is set as well, will bold test in results that matched the query
  • includeSites - option to limit results to comma-separated list of sites
  • excludeSites - option to exclude results that appear in comma-separated list of sites
  • open - opens the first X number of results in the browser after finishing query
  • disableConsole - intended to be used with programmatic use, so that the color-coded search results are not displayed in the terminal (via console.log) when not wanted.

Programmatic Use in NodeJS environment

  • something like:
const  googleIt = require('google-it-reborn')

googleIt({'query': 'covfefe irony'}).then(results => {
  // access to results object here
}).catch(e => {
  // any possible errors that might have occurred (like no Internet connection)
})

// with request options
const options = {
  'proxy': 'http://localhost:8118'
};
googleIt({options, 'query': 'covfefe irony'}).then(results => {
  // access to results object here
}).catch(e => {
  // any possible errors that might have occurred (like no Internet connection)
})

google-it's People

Contributors

patneedham avatar greenkeeper[bot] avatar dependabot[bot] avatar hawkeye64 avatar mohamed3on avatar t-rekttt avatar vladimirmikulic avatar connorlanglois avatar kua-as-exe avatar 92bondstreet avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.