How to display APOD on my personal Website?

Introductions, Rules, Announcements, and Feedback
Post Reply
joelshort
Ensign
Posts: 45
Joined: Wed Jul 24, 2013 1:43 pm

How to display APOD on my personal Website?

Post by joelshort » Mon Mar 24, 2014 5:56 pm

Sorry if this is not the right place to ask this, but I would like to display the APOD on my personal astrophotography website. First, is this legal under the TOS for APOD? Second, is there an easy way to do this? I am not a coder although I have been learning a lot about using code and am comfortable inserting code. I also don't know much about RSS feeds but am I correct in saying that APOD does have an RSS that I could use to achieve what I want to do? Any advice would be much appreciated. I've done a fair amount of searching on this forum and other places and haven't seen a clear way to do this.
Thanks,
joel

User avatar
geckzilla
Ocular Digitator
Posts: 9180
Joined: Wed Sep 12, 2007 12:42 pm
Location: Modesto, CA
Contact:

Re: How to display APOD on my personal Website?

Post 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.
Just call me "geck" because "zilla" is like a last name.

joelshort
Ensign
Posts: 45
Joined: Wed Jul 24, 2013 1:43 pm

Re: How to display APOD on my personal Website?

Post by joelshort » Mon Mar 24, 2014 8:13 pm

geckzilla wrote: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
Thanks very much for the reply. I definitely only want to display a thumbnail and link to the actual APOD site.

Unforunately I don't quite follow this (sorry for being such a noob!). If I reference the above link from say an image placeholder on my site will that pull the thumbnail each day? Or what does a "static image" do?

joelshort
Ensign
Posts: 45
Joined: Wed Jul 24, 2013 1:43 pm

Re: How to display APOD on my personal Website?

Post by joelshort » Mon Mar 24, 2014 8:19 pm

I did come across a google gadget that I think would work ok? But I'm not thrilled with the extra stuff google puts in.

http://www.gmodules.com/ig/creator?synd ... ml&lang=en

User avatar
Chris Peterson
Abominable Snowman
Posts: 18174
Joined: Wed Jan 31, 2007 11:13 pm
Location: Guffey, Colorado, USA
Contact:

Re: How to display APOD on my personal Website?

Post by Chris Peterson » Mon Mar 24, 2014 8:28 pm

joelshort wrote:
geckzilla wrote: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
Thanks very much for the reply. I definitely only want to display a thumbnail and link to the actual APOD site.

Unforunately I don't quite follow this (sorry for being such a noob!). If I reference the above link from say an image placeholder on my site will that pull the thumbnail each day? Or what does a "static image" do?
You need to provide code to replace "yymmdd" with the correct date values (e.g. "140320"). The static image is an alternative for when the APOD isn't actually an image, but a video or Flash script.
Chris

*****************************************
Chris L Peterson
Cloudbait Observatory
https://www.cloudbait.com

User avatar
bystander
Apathetic Retiree
Posts: 21577
Joined: Mon Aug 28, 2006 2:06 pm
Location: Oklahoma

Re: How to display APOD on my personal Website?

Post by bystander » Mon Mar 24, 2014 8:35 pm

There is an official APOD rss feed from the NASA Astrophysics Science Division, but it is 24 hours behind.

http://apod.nasa.gov/apod.rss
Know the quiet place within your heart and touch the rainbow of possibility; be
alive to the gentle breeze of communication, and please stop being such a jerk.
— Garrison Keillor

joelshort
Ensign
Posts: 45
Joined: Wed Jul 24, 2013 1:43 pm

Re: How to display APOD on my personal Website?

Post by joelshort » Mon Mar 24, 2014 9:16 pm

Chris Peterson wrote:You need to provide code to replace "yymmdd" with the correct date values (e.g. "140320"). The static image is an alternative for when the APOD isn't actually an image, but a video or Flash script.
Ah, I see. Now I just have to figure that out. :lol2:

joelshort
Ensign
Posts: 45
Joined: Wed Jul 24, 2013 1:43 pm

Re: How to display APOD on my personal Website?

Post by joelshort » Mon Mar 24, 2014 9:17 pm

bystander wrote:There is an official APOD rss feed from the NASA Astrophysics Science Division, but it is 24 hours behind.

http://apod.nasa.gov/apod.rss
I saw that RSS feed, but again I have no idea how to implement it. I wouldn't mind if it was 24hrs late.

User avatar
geckzilla
Ocular Digitator
Posts: 9180
Joined: Wed Sep 12, 2007 12:42 pm
Location: Modesto, CA
Contact:

Re: How to display APOD on my personal Website?

Post by geckzilla » Mon Mar 24, 2014 9:40 pm

Well, anyway, as you can see, it's feasible but you've got a bit of learning to do. We can point you to the way but we can't do the work for you!
Just call me "geck" because "zilla" is like a last name.

joelshort
Ensign
Posts: 45
Joined: Wed Jul 24, 2013 1:43 pm

Re: How to display APOD on my personal Website?

Post by joelshort » Mon Mar 24, 2014 9:42 pm

yes of course, I understand. Thanks for the help.

User avatar
MargaritaMc
Look to the Evenstar
Posts: 1836
Joined: Wed Jan 09, 2013 10:14 pm
Location: 28°16'7"N 16°36'20"W

Re: How to display APOD on my personal Website?

Post by MargaritaMc » Tue Mar 25, 2014 6:05 pm

joelshort wrote:
bystander wrote:There is an official APOD rss feed from the NASA Astrophysics Science Division, but it is 24 hours behind.

http://apod.nasa.gov/apod.rss
I saw that RSS feed, but again I have no idea how to implement it. I wouldn't mind if it was 24hrs late.
Just for curiosity, I Googled "how to embed an RSS feed" and found this, if it is any use to you, Joel.

https://www.rssinclude.com/
RSS Widget For Your Website

Basically, an RSSbox is an RSS reader widget - a rectangular area on your website or blog displaying text and images from RSS feeds. When creating a new RSSbox you decide on which type of layout and which RSS feeds to use.
"In those rare moments of total quiet with a dark sky, I again feel the awe that struck me as a child. The feeling is utterly overwhelming as my mind races out across the stars. I feel peaceful and serene."
— Dr Debra M. Elmegreen, Fellow of the AAAS

joelshort
Ensign
Posts: 45
Joined: Wed Jul 24, 2013 1:43 pm

Re: How to display APOD on my personal Website?

Post by joelshort » Tue Mar 25, 2014 6:28 pm

Thanks Debra! That looks like a great solution but the price tag is something I don't want to pay for this type of thing. I found a decent google gadget (see above) that will work ok for what I want to do. I just wish I could get rid of the google logo.

User avatar
geckzilla
Ocular Digitator
Posts: 9180
Joined: Wed Sep 12, 2007 12:42 pm
Location: Modesto, CA
Contact:

Re: How to display APOD on my personal Website?

Post by geckzilla » Tue Mar 25, 2014 8:05 pm

Oh, that's Margarita. The quote in her signature is by Debra, who is a different person. :D
Just call me "geck" because "zilla" is like a last name.

joelshort
Ensign
Posts: 45
Joined: Wed Jul 24, 2013 1:43 pm

Re: How to display APOD on my personal Website?

Post by joelshort » Tue Mar 25, 2014 8:40 pm

geckzilla wrote:Oh, that's Margarita. The quote in her signature is by Debra, who is a different person. :D
oops! :oops:

User avatar
MargaritaMc
Look to the Evenstar
Posts: 1836
Joined: Wed Jan 09, 2013 10:14 pm
Location: 28°16'7"N 16°36'20"W

Re: How to display APOD on my personal Website?

Post by MargaritaMc » Tue Mar 25, 2014 10:56 pm

joelshort wrote:
geckzilla wrote:Oh, that's Margarita. The quote in her signature is by Debra, who is a different person. :D
oops! :oops:
No problem!
I should remember to sign my posts :roll:
Margarita!

PS The quote in my signature file is from Dr Debra Elmegreen's short bio on The Hubble Heritage Project
"In those rare moments of total quiet with a dark sky, I again feel the awe that struck me as a child. The feeling is utterly overwhelming as my mind races out across the stars. I feel peaceful and serene."
— Dr Debra M. Elmegreen, Fellow of the AAAS

Post Reply