in reply to Weather RSS image
Looks like there are only 48 images there, and the following code should grab all of them for you.
use LWP::UserAgent; use strict; use warnings; my $ua = LWP::UserAgent->new(); for my $index (0 .. 47, 3200) { print "downloading $index.gif\n"; my $res = $ua->get("http://us.i1.yimg.com/us.yimg.com/i/us/we/52/$ +index.gif"); if ($res->is_success) { open GIF, ">", "weather$index.gif"; binmode(GIF); print GIF $res->content; close(GIF); } }
Update: Added 3200.gif, as ikegami pointed out.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Weather RSS image
by davidrw (Prior) on Nov 09, 2005 at 21:58 UTC | |
by pg (Canon) on Nov 09, 2005 at 22:07 UTC | |
by ikegami (Patriarch) on Nov 09, 2005 at 22:14 UTC | |
by davidrw (Prior) on Nov 09, 2005 at 22:54 UTC | |
Re^2: Weather RSS image
by ikegami (Patriarch) on Nov 09, 2005 at 22:04 UTC |