You are not logged in.

#1 2007-12-26 00:46:15

Registered: 2007-06-25
Posts: 211

Downloading Images from APOD with BASH

So far, I have managed to successfully download the latest picture from the APOD website (Astronomy Picture of the Day).  However, I do not know how I would manage to extract the description below the image. For example,

The provided script downloads the latest image and saves it as apod.jpg
(improvements to the script are welcome)

DATE='/bin/date +%y%m%d'
wget`$DATE`.html -O- 2> /dev/null |
grep -m 1 jpg | 
sed -e 's/<//' -e 's/>//' -e 's/.*=//' -e 's/"//g' -e 's/^/http:\/\/\/apod\//' |
wget -i- -O apod.jpg

How would I download the accompanying description (using BASH if applicable)?


#2 2012-10-05 09:25:41

Registered: 2012-02-15
Posts: 1

Re: Downloading Images from APOD with BASH

Just want to thank you for this. It still works! I am thinking of trying to pull the description text and overlay it using imagemagick.


Board footer

Powered by FluxBB