jimkang / g-i-s

Another Google Image Search Node module.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filter only the url and put it in a variable

ianmsfvenom opened this issue · comments

there is a way to just list the url and put it in a variable

You can just use .url.

Something like this:

const gis = require('g-i-s');
gis(msg.body.slice(4), searchResult);

function searchResult(error, results) {
    console.log(results);
    var url = results[randomNumber(10)].url;
}