Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shershen08/first-image-search-load

Simple module that loads the first image from Google image search on query
https://github.com/shershen08/first-image-search-load

Last synced: about 3 hours ago
JSON representation

Simple module that loads the first image from Google image search on query

Awesome Lists containing this project

README

        

## Description

Simple module that loads the first image from Google image search on query

Module usues url : ```https://www.google.nl/search?tbm=isch&q=```
Request returns A+ promises, thanks to [q](https://github.com/kriskowal/q) module.

Npm package [first-image-search-load](https://www.npmjs.com/package/first-image-search-load), to install:
```npm i first-image-search-load```

## API

```saveFirstImage(queryString, fileNameAndPath)``` - Saves the first image to disk as a file

```getFirstImageURL(queryString)``` - Returns URL of the first image in the search results

```getImagesArray(queryString)``` - Returns array of URLs of the images in the search results

## Dependencies
- [cheerio](https://github.com/cheeriojs/cheerio)
- [request](http://github.com/request/request)
- [q](https://github.com/kriskowal/q)