I'm in the process of making my own Discord bot and I have no previous experience with JS. I'm making a feature that downloads and posts an image from this website: http://random.dog
I have successfully downloaded images from elsewhere when I know the exact link to the picture. Here's the relevant part of my code:
var download = function(uri, filename, callback){
request(uri).pipe(fs.createWriteStream(filename)).on('close', callback);}
download('http://random.dog/14769-27888-18622.jpg', 'dog.png',
I'm using this request module https://www.npmjs.com/package/reques , is it possible to get images without the exact URL, with that module?