Does anybody have some sample code for dealing with incrementing days/months/years in a cover URL?
Here's how the URLs progress for the two recipes I've contributed in this thread:
Sports Illustrated covers (weekly)
http://i.cdn.turner.com/sivault/si_o...1026_large.jpg
http://i.cdn.turner.com/sivault/si_o...1101_large.jpg
Smithsonian covers (monthly):
http://media.smithsonianmag.com/images/200910_cover.jpg
http://media.smithsonianmag.com/images/200911_cover.jpg
Somehow, the code needs to figure out the current date, and try the next likely increment. If failure, decrement 7 days (or 1 month for the monthly magazine).
Since my two home-grown recipes both have this kind of pattern, I presume that others have encountered and solved this problem already. Or is this the exercise that gets me to learn Python?
[EDIT: Ack, the url tags that got automatically inserted for clickability, managed to hide the part of the Sports Illustrated URL which contains year information. Here is what they should look like:
h ttp://i.cdn.turner.com/sivault/si_online/covers/images/2009/1026_large.jpg
h ttp://i.cdn.turner.com/sivault/si_online/covers/images/2009/1101_large.jpg ]