The iPhone makes it really simple to snarf down an image from the web; you can turn a URL into a UIImage
in one line of code. So I'd like to enable my app (an educational puzzle game... my first!) to download some random images to make it more interesting and dynamic.
I thought about using Kodak's image of the day RSS feed, but I'm having quite a time figuring out how to parse it. Rather than being a simple list of image URLs, it seems to reference a bunch of "jhtml" URLs, which run Javascript to display the images in your RSS reader. Is this intentionally obfuscated, or am I missing some basic step to parse this?
I also tried the Astronomy Picture of the Day, via this RSS feed, but it's just the original page's HTML stuffed into CDATA... ugh.
So I guess this is really two questions:
- Is there a simple way to parse these feeds to actually get at the JPG URLs on the iPhone?
- Is there a better source for "picture of the day" type images?
PS: I'm using NSXMLParser, which I learned to use here.