by geckzilla » Mon Mar 24, 2014 7:34 pm
You could pull a random APOD using Stuart's JSON database, which could actually be a fun thing for you to learn how to code:
http://asterisk.apod.com/viewtopic.php?f=28&t=33168
Getting the daily, up-to-date APOD is not an easy task to automate, however. You can
generally refer to the image thumbnail by referencing this URL where [yymmdd] is the day's date but this will be a default image of Pluto if it isn't a static image (video, interactive thing, etc).
Code: Select all
http://apod.nasa.gov/apod/calendar/S_[yymmdd].jpg
Other than that, I've written my own APOD description getter that the APOD Bot at the forum here uses to make the daily post but it has errors in it a couple of times a week that I have to manually edit, so it is possible to crudely scrape the HTML. The only other problem you'll have to deal with is copyright and licensing issues. If you just want to show a small image thumbnail and then link to APOD itself, that is reasonable and you don't have to worry about copyrights. If you want to show the entire text and a large image, that's something would advise against, really. That's what APOD itself and all the other mirror sites are for.
You could pull a random APOD using Stuart's JSON database, which could actually be a fun thing for you to learn how to code:
http://asterisk.apod.com/viewtopic.php?f=28&t=33168
Getting the daily, up-to-date APOD is not an easy task to automate, however. You can [i]generally[/i] refer to the image thumbnail by referencing this URL where [yymmdd] is the day's date but this will be a default image of Pluto if it isn't a static image (video, interactive thing, etc).
[code]http://apod.nasa.gov/apod/calendar/S_[yymmdd].jpg[/code]
Other than that, I've written my own APOD description getter that the APOD Bot at the forum here uses to make the daily post but it has errors in it a couple of times a week that I have to manually edit, so it is possible to crudely scrape the HTML. The only other problem you'll have to deal with is copyright and licensing issues. If you just want to show a small image thumbnail and then link to APOD itself, that is reasonable and you don't have to worry about copyrights. If you want to show the entire text and a large image, that's something would advise against, really. That's what APOD itself and all the other mirror sites are for.