Here’s a Python script that downloads the NASA Picture of the Day and sets it as the background image in Windows:
Sourcecode
Note that you will need to replace “YOUR_API_KEY” in the URL with your own NASA API key, which you can obtain from the NASA API website (https://api.nasa.gov/).
The script first makes a request to the NASA API to retrieve the data for the Picture of the Day. It then parses the data and extracts the URL of the image. The image is then downloaded and saved as image-file. Finally, the script sets the image as the Windows desktop background using the ctypes
library.
Usage
Now, the script will run automatically at the specified time using the Windows Task Scheduler. Note that you may need to configure the task scheduler to run with administrative privileges to allow it to change the desktop background.
Download
You can download the sourcecode and find more details on my github-repository:
https://github.com/smartDevel/set_nasa_pic_as_background
Comments