Coder Social home page Coder Social logo

findium's Introduction

findium NPM version NPM Travis

A simple library for converting google search results to JSON output.

Install

npm install -g findium

CLI usage

Basic usage:

findium --query="simple search"

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

findium --query="simple search" -o results.json -n

Find and open the first 5 results in a browser:

findium --query="simple search" -O 5

Find and show only URLs:

findium --query="simple search" --only-urls

CLI options

  • --query: the query that should be sent to the Google search
  • --include-sites: option to limit results to comma-separated list of sites
  • --exclude-sites: option to exclude results that appear in comma-separated list of sites
  • --limit: number of search results to be returned
  • --only-urls: only display the URLs, instead of the titles and snippets
  • --output: name of the JSON file to save results to
  • --htmlFileOutputPath: name of the HTML file to save results to
  • --no-display: prevent results from terminal output. Should only be used when saving results to a file
  • --open: opens the first X number of results in the browser after finishing query

Use as a library

npm install --save findium

const findium = require('findium')

findium({query: 'simple search'}).then(results => {
    // access to results object here
}).catch(e => {
    // any possible errors (like no Internet connection)
})

// with axios request options
const options = {
    'proxy': {
        host: '127.0.0.1',
        port: 9000
    }
};
findium({options, query: 'simple search'}).then(results => {
    // access to results object here
}).catch(e => {
    // any possible errors (like no Internet connection)
})

License

The findium is open-sourced software licensed under the MIT license.

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.