Skip to content

laza-niaina/google-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Node

GitHub license

Installation

Clone and import this repo in your project

git clone https://github.com/laza-niaina/google-node

Usage

Google WebSearch :

const { PageSearch } = require("./google-node");
const pages = new PageSearch("Elon musk");
async function WebSearch() {
	console.log(await pages.getResults());
}
WebSearch()

Google ImageSearch (Not working):

const {ImageSearch}=
require("./google-node");
const images= new ImageSearch("Mark Zuck")
async function searchImage() {
	console.log(await images.getFirstResults());
}
searchImage()

Google NewsSearch :

const { NewsSearch } = require("./google-node");
const news = new NewsSearch("Wang Xiaoyan");
async function searchNews() {
	 console.log(`${JSON.stringify(await news.getResults())}`);
}
searchNews()

Google FileSearch :

const { FileSearch } = require("./google-node");
const files = new FileSearch("Père riche", "pdf");
async function searchFile() {
  console.log(await files.getResults());
}
searchFile();

Google Translate :

const { GoogleTranslate } = require("./google-node");
const translator = new GoogleTranslate();
async function translate() {
  const exp = "こんにちは世界";
  const translated_text = await translator.translate(exp, "auto", "en");
  console.log(translated_text);
}
translate();

Note

A full example can be found here

License

MIT

To do

  • Add Google Lens
  • DONATE ME

    Buy Me A Coffee

    BTC :

    15WdpVafhFUBSiH9AKxZgKWAiocGVk3CxC

    ETH :

    0xCB260c63A68c00b3d580DEA1D9bb7401f856a03C

    LTC :

    MPXZMTjpSunvDJRXoTa7bLHtdd3HAWpV6i

    USDT (TRC20) :

    TTMhTopaNo5agXDqchcv1F1op27KxftNky

    About

    A Node.js wrapper for GoogleSearch API that is not officially supported.

    Topics

    Resources

    License

    Stars

    Watchers

    Forks

    Packages

    No packages published