Astronomy Picture of the Day

Astronomy Picture Of the Day presents a new astronomical picture every day, with some explanations. I wanted to use these images as my screensaver but the RSS feed didn’t provide the URL to the high resolution version of the images.

This script parses the page to find the title of the picture and the url of the hi-res image and stores the picture in a folder. It also adds the title of the image at the top.
I moved the code to github: https://github.com/chrislad/ImageScrappers

2 Responses to Astronomy Picture of the Day

  1. Matt Melnick says:

    Can you help me get this running on OSX? sorry to be a n00b

    copied it and inserted new dir and font location

    renamed it apod. command
    chmod +x
    made apod dir
    clicked on script
    nothing
    help
    thanks

    -Matt

    • CL says:

      hi Matt,

      You need a couple of things to make it run. First, you need to install Python and the necessary libraries. I’m afraid I’m not familiar with OSX so I can only direct you to http://www.python.org/getit/mac/. It looks like Python might be already installed. Open a terminal and type python –version (i.e. two minuses: – -). If a number appears, Python’s installed.

      Next I’d suggest to rename the script to apod.py and to run it from the command line, with ./apod.py so that you can see what errors are produced.

      Note that you need to change a couple of things in the script, that are specific to your machine:

      • where you want the pictures to be stored, on line 45.
      • and a path to a TTF font of your choice, at line 34. It doesn’t have to be Arial.

      Hope that helps!