Socket
Socket
Sign inDemoInstall

google-sr

Package Overview
Dependencies
22
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    google-sr

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


Version published
Weekly downloads
100
increased by4.17%
Maintainers
1
Install size
2.99 MB
Created
Weekly downloads
 

Readme

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

Last updated on 01 Apr 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc