

# change the app id to what you get once registeringĪppid="fYFXXzZMnXm7MQXXqXX1OpXhrAdXXXZd9qA84XXX" # you can choose to download the daily picture In case of not getting an image the script will take a random image from the directory.Copying the image to a directory on your PC.Turning the returned JSON into data that Python can use.Don't use the above id since it's only for demonstration purposes.The app id that you'll get is going to be similar to this one: fY2SW6ZMnXXXXXXXVl31OpXXX8dcbMZXXXX8TG34 To consume it you need to register at: were you'll find a unique identifier, app id, which identifies the app to the service provider. From which we will extract the URL of the image that we are going to copy to a folder on our Linux system. The script downloads the daily pictures from NASA's API. Here I share my way of making the task work. The solution that I came up with is a short Bash script that downloads the daily picture from NASA's API as well as running the script with the crontab utility on my computer. I also wanted the computer to do the boring stuff for me.
#NASA PICTURE OF THE DAY APP UPDATE#
I wanted to set these pictures as the background for my Linux computer and also to update the display on a daily basis. You can see for yourself in their archive Astronomy Picture of the Day.Īnother example, is this stunning picture from the 31th of July 2020: NASA provides astonishing astronomy pictures on a daily basis.

Download NASA's astronomy picture of the day and set as background on a Linux machine Download NASA's astronomy picture of the day and set as background on a Linux machine
