This is a little ruby soft who aim to download random Unsplash pictures (you can change the query to get whatever you want https://unsplash.com/documentation) All You need after this is to go into "System Preferencies", "Desktop & Screen Saver", then add the image folder, set the interval on whatever you want and it's over :)
Pair this with a little Cron task, Exemple : https://gist.github.com/bde-maze/ae61efda63c49ad76c0788c2c6725f4e
Could be usefull -> HTTparty : https://github.com/jnunemaker/httparty
All credit to Unsplash (https://unsplash.com/) and the photographers
Visit : http://bmazed.me/