Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-sr

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-sr

Yet another library to do google a search, easy and simple

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Google-sr

Yet another library to do google searches.

Below is a simple example of using this package

Usage

with .then

Without safe mode
const search = require('google-sr');

search('node.js', { safe: false }).then(r => console.log(r))
With safe mode
const search = require('google-sr');

search('node.js').then(r => console.log(r))

With async/await

const search = require('google-sr');

const res = await search('node.js')

// search('node.js', { safe: false }) for without safe mode

console.log(res)

Available options

  • Page - default:- 1
  • Selectors - DescriptionSelector, linkSelector, TitleSelector
  • safe - default:- true

selectors default -

  • DescriptionSelector - #main > div > div > div > div:not(.v9i61e) > div.AP7Wnd

  • linkSelector - div.ZINbbc > div:nth-child(1) > a

  • TitleSelector - div.ZINbbc > div:nth-child(1) > a > h3

  • selectors MUST be in the object options.selectors ex- options.selectors.DescriptionSelector = 'some-selector'

Support

Join my discord server for support: discord

Keywords

FAQs

Package last updated on 15 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc