fetches image search results
currently Google and Flickr
Google
let searchGoogle = require('image-search-results').google;
searchGoogle('cat', 100)
.then((res) => {
console.log(res);
});
Flickr
let flickrConfig = {
"api_key": "FLICKR API KEY",
"secret": "FLICKR API SECRET",
"user_id": "FLICKR USER ID",
"access_token": "FLICKER ACCESS TOKEN",
"access_token_secret": "FLICKR ACCESS TOKEN SECRET"
}
let searchFlickr = require('image-search-results').flickr(flickrConfig);
searchFlickr.then((res) => {
console.log(res);
});
Gives us an array of image urls
[ 'http://www.rd.com/wp-content/uploads/sites/2/2016/04/01-cat-wants-to-tell-you-laptop.jpg',
'https://static.pexels.com/photos/104827/cat-pet-animal-domestic-104827.jpeg',
'https://www.royalcanin.com/~/media/Royal-Canin/Product-Categories/cat-adult-landing-hero.ashx',
'https://cdn.pixabay.com/photo/2014/03/29/09/17/cat-300572_960_720.jpg',
'https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg',
'https://s-media-cache-ak0.pinimg.com/736x/92/9d/3d/929d3d9f76f406b5ac6020323d2d32dc.jpg',
'https://www.petdrugsonline.co.uk/images/page-headers/cats-master-header',
'http://www.rd.com/wp-content/uploads/sites/2/2016/02/06-train-cat-shake-hands.jpg',
'https://i.ytimg.com/vi/cNycdfFEgBc/maxresdefault.jpg',
'http://www.bharatint.com/img/categories/our-cat-shop-image.png',
'http://writm.com/wp-content/uploads/2016/08/Cat-hd-wallpapers.jpg',
'https://www.royalcanin.com/~/media/Royal-Canin/Product-Categories/cat-breed-landing-hero.ashx',
'http://d39kbiy71leyho.cloudfront.net/wp-content/uploads/2016/05/09170020/cats-politics-TN.jpg',
...]