brunoqs / google-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

google-parser

npm version

NPM

Use this library to get a search result from google.

License

MIT

Module load

javascript

let google = require('google-parser');

typescript

import * as google from 'google-parser'

How it works

This module supports only Promise and async / await.

Function list

google.img(search: string, safe: boolean): Promise<IImg[]>

google.jpg(search: string, safe: boolean): Promise<IImg[]>

google.google(search: string, safe: boolean): Promise<ISearch[]|ISearchError>

Add an optional argument for safe search.

Type

interface IImg {
  img: string,
  url: string,
  name: string
}

interface ISearch {
  title: string,
  url: string,
  description: string
}

interface ISearchError {
  error: true,
  reson: "antibot"
}

Return

The return is treated as an object. Please refer to the above type.

Developer

달보드레(dalbodeule)npmjs github

About

License:MIT License


Languages

Language:TypeScript 100.0%