There's a batch of really gorgeous images released under the Creative Commons license at http://draves.org/pix/kdn/; the following code fetches all of them (slowly) at their maximum resolution.
Max resolution is big - 2 to 8 MB each. These are seriously detailed pictures. I added a 5-minute pause between fetches to be polite.
use strict;
use WWW::Mechanize;
my $mech = new WWW::Mechanize;
my $image_mech = new WWW::Mechanize;
my $base = "http://draves.org/pix/frame3.cgi?dir=kdn&file=acanthametra/big%20two%20spike%20 star%20copy.png&zoom=0";
my $current = $base;
$mech->get($current);
while (1) {
my ($image) = (($mech->content) =~/img .* src="([^"]+)/s);
$image=~ s//%20/g;
$image_mech->get("http://draves.org/pix/$image");
print $image,"\n";
my ($dir,$name) = ($image =~ m{^(.*/)(.*)$});
system "mkdir -p $dir";
open PIX, ">$image" or die "Can't open $image: $!";
print PIX $image_mech->content;
close PIX;
sleep 300;
$mech->follow_link('text'=>'next');
last unless $mech->success;
}
Strictly utilitarian, but it gets the job done, and lets me have truly bizarro desktop graphics, thich is nice. I'm realizing that the 'next' link will probably crap out when it gets to the last page, but that's not a big deal since I want to stop at that point anyway.
Mech images (Score:2)
--
xoa
Re:Mech images (Score:1)
Have I exposed a bug?
Re:Mech images (Score:2)
--
xoa