1.0.2 • Published 3 years ago

google-remake v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

google-it Build Status npm version Codecov Coverage Maintainability

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

Example Usage

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

GIF of google-it

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

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

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

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

GIF of opening-in-browser

$ google-it --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')

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)
})
ababacornacorn-globalsacorn-jsxacorn-walkagent-baseajvamex-jest-presetansi-colorsansi-escapesansi-regexansi-stylesanymatchargparseargvargv-toolsaria-queryarr-diffarr-flattenarr-unionarray-backarray-includesarray-uniquearray.prototype.flatarray.prototype.mapasn1assert-plusassign-symbolsast-types-flowastral-regexasynckitatobaws-sign2aws4axobject-querybabel-code-framebabel-eslintbabel-jestbabel-messagesbabel-plugin-dynamic-import-nodebabel-plugin-istanbulbabel-plugin-jest-hoistbabel-plugin-transform-react-remove-prop-typesbabel-preset-amexbabel-preset-current-node-syntaxbabel-preset-jestbabel-runtimebabel-traversebabel-typesbabylonbailbalanced-matchbasebcrypt-pbkdfboolbasebrace-expansionbracesbrowser-process-hrtimebrowser-stdoutbrowserslistbserbuffer-fromcache-basecallsitescamelcasecaniuse-litecapture-exitcaselesschalkchar-regexcharacter-entitiescharacter-entities-legacycharacter-reference-invalidchardetcheerioci-infoclass-utilsclean-regexpcli-cursorcli-spinnerscli-widthcliuiclonecocodecovcollapse-white-spacecollect-v8-coveragecollection-visitcolor-convertcolor-namecolorscombined-streamcommand-line-argscommandercomponent-emitterconcat-mapconfusing-browser-globalscontains-pathconvert-source-mapcopy-descriptorcore-jscore-js-compatcore-js-purecore-util-iscross-spawncss-selectcss-whatcssomcssstyledamerau-levenshteindashdashdata-urlsdebugdecamelizedecimal.jsdecode-uri-componentdeep-isdeepmergedefaultsdefine-propertiesdefine-propertydelayed-streamdetect-newlinediffdiff-sequencesdoctrinedom-serializerdomelementtypedomexceptiondomhandlerdomutilsecc-jsbnelectron-to-chromiumemitteryemoji-regexend-of-streamentitieserror-exes-abstractes-array-method-boxes-properlyes-get-iteratores-to-primitiveescaladeescape-string-regexpescodegeneslinteslint-ast-utilseslint-config-airbnbeslint-config-airbnb-baseeslint-config-amexeslint-import-resolver-nodeeslint-module-utilseslint-plugin-eslint-plugineslint-plugin-importeslint-plugin-jesteslint-plugin-jsx-a11yeslint-plugin-markdowneslint-plugin-reacteslint-plugin-react-hookseslint-plugin-unicorneslint-plugin-you-dont-need-lodash-underscoreeslint-scopeeslint-utilseslint-visitor-keysespreeesprimaesqueryesrecurseestraverseestraverse-fbesutilsexec-shexecaexitexpand-bracketsexpectextendextend-shallowexternal-editorextglobextsprintffast-deep-equalfast-json-stable-stringifyfast-levenshteinfb-watchmanfiguresfile-entry-cachefill-rangefind-replacefind-upflatflat-cacheflattedfor-inforever-agentform-datafragment-cachefs-readdir-recursivefs.realpathfunction-bindfunctional-red-black-treeget-caller-fileget-package-typeget-streamget-valuegetpassglobglob-parentglobalsgraceful-fsgrowlgrowlyhar-schemahar-validatorhashas-ansihas-flaghas-symbolshas-valuehas-valueshehosted-git-infohtml-encoding-snifferhtml-escaperhtmlparser2http-proxy-agenthttp-signaturehttps-proxy-agenthuman-signalsiconv-liteignoreignore-walkimport-freshimport-localimport-modulesimurmurhashinflightinheritsinquirerinvariantip-regexis-accessor-descriptoris-alphabeticalis-alphanumericalis-argumentsis-arrayishis-bufferis-callableis-ciis-data-descriptoris-date-objectis-decimalis-descriptoris-dockeris-extendableis-extglobis-fullwidth-code-pointis-generator-fnis-globis-hexadecimalis-interactiveis-mapis-negative-zerois-numberis-plain-objis-plain-objectis-potential-custom-element-nameis-promiseis-regexis-setis-streamis-stringis-symbolis-typedarrayis-whitespace-characteris-windowsis-word-characteris-wslisarrayisexeisobjectisstreamistanbul-lib-coverageistanbul-lib-instrumentistanbul-lib-reportistanbul-lib-source-mapsistanbul-reportsiterate-iteratoriterate-valuejestjest-changed-filesjest-configjest-diffjest-docblockjest-eachjest-environment-jsdomjest-environment-nodejest-get-typejest-haste-mapjest-jasmine2jest-json-schemajest-leak-detectorjest-matcher-utilsjest-message-utiljest-mockjest-pnp-resolverjest-regex-utiljest-resolvejest-resolve-dependenciesjest-runnerjest-runtimejest-serializerjest-snapshotjest-utiljest-validatejest-watcherjest-workerjs-tokensjs-yamljsbnjsdomjsescjson-parse-even-better-errorsjson-schemajson-schema-traversejson-stable-stringifyjson-stable-stringify-without-jsonifyjson-stringify-safejson5jsonifyjsprimjsx-ast-utilskebab-casekind-ofkleurlevenlevenarylevnlines-and-columnsload-json-filelocate-pathlodashlodash.camelcaselodash.getlodash.kebabcaselodash.snakecaselodash.sortbylodash.upperfirstlodash.ziplog-symbolsloose-envifylru-cachemake-dirmakeerrormap-cachemap-visitmarkdown-escapesmerge-streammicromatchmime-dbmime-typesmimic-fnminimatchmixin-deepmkdirpmsmute-streamnanomatchnatural-comparenice-trynode-fetchnode-int64node-modules-regexpnode-notifiernode-releasesnormalize-package-datanormalize-pathnpm-run-pathnth-checknwsapioauth-signobject-assignobject-copyobject-inspectobject-keysobject-visitobject.assignobject.entriesobject.fromentriesobject.pickobject.valuesonceonetimeoptionatororaos-tmpdirp-each-seriesp-finallyp-limitp-locatep-tryparent-moduleparse-entitiesparse-jsonparse5pascalcasepath-existspath-is-absolutepath-keypath-parsepath-typeperformance-nowpicomatchpifypiratespkg-dirposix-character-classesprelude-lsprettierpretty-formatprocess-nextick-argsprogresspromise.allsettledpromptsprop-typespslpumppunycodeqsrandombytesreact-isread-pkgread-pkg-upreadable-streamregenerateregenerate-unicode-propertiesregenerator-runtimeregenerator-transformregex-notregexppregexpu-coreregjsgenregjsparserremark-parseremove-trailing-separatorrepeat-elementrepeat-stringreplace-extrequestrequest-promise-corerequest-promise-nativerequire-directoryrequire-main-filenameresolveresolve-cwdresolve-fromresolve-urlrestore-cursorretrimrafrsvprun-asyncrxjssafe-buffersafe-regexsafer-buffersanesaxessemverserialize-javascriptset-blockingset-valueshebang-commandshebang-regexshellwordssignal-exitsisteransislashslice-ansisnapdragonsnapdragon-nodesnapdragon-utilsource-mapsource-map-resolvesource-map-supportsource-map-urlspdx-correctspdx-exceptionsspdx-expression-parsespdx-license-idssplit-stringsprintf-jssshpkstack-utilsstate-togglestatic-extendstealthy-requirestream-eventsstring-lengthstring-widthstring.prototype.trimendstring.prototype.trimleftstring.prototype.trimrightstring.prototype.trimstartstring_decoderstrip-ansistrip-bomstrip-eofstrip-final-newlinestrip-json-commentsstubssupports-colorsupports-hyperlinkssymbol-treetableteeny-requestterminal-linktest-excludetest-valuetext-tablethroatthroughtmptmplto-fast-propertiesto-object-pathto-regexto-regex-rangetough-cookietr46trimtrim-trailing-linestroughtslibtunnel-agenttweetnacltype-checktype-detecttype-festtypedarray-to-buffertypicalunheritunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptunifiedunion-valueunist-util-isunist-util-remove-positionunist-util-stringify-positionunist-util-visitunist-util-visit-parentsunset-valueuri-jsurixurlgreyuseutil-deprecateuuidv8-compile-cachev8-to-istanbulvalidate-npm-package-licenseverrorvfilevfile-locationvfile-messagew3c-hr-timew3c-xmlserializerwalkerwcwidthwebidl-conversionswhatwg-encodingwhatwg-mimetypewhatwg-urlwhichwhich-modulewide-alignword-wrapworkerpoolwrap-ansiwrappywritewrite-file-atomicwsx-is-stringxml-name-validatorxmlbuilderxmlcharsxtendy18nyallistyargsyargs-parseryargs-unparser
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago