in reply to Re^3: downloading images from a webpage
in thread downloading images from a webpage

I really screwed up this thread with a lot of newbie mistakes, but I wanted to thank blake for helping me combine a couple of the things I've been trying to do here. I can't seem to do so where his reply was, but I would like him to see that his script improvements worked. Let me also state that I'm as far from national socialism ideologically as I could be: I support civil rights, union rights, democracy, and I'm a pacifist.

$ perl hitler8.pl $ cat hitler8.pl #!/usr/bin/perl -w use strict; use WWW::Mechanize; use LWP::Simple; my $domain = 'http://www.nobeliefs.com/nazis.htm'; my $m = WWW::Mechanize->new; $m->get( $domain); my $counter = 0; my @list = $m->images(); for my $img (@list) { my $url = $img->url_abs(); $counter++; my $filename = "site/image_". "$counter"; getstore($url,$filename) or die "Can't download '$url': $@\n"; } $ cd site/ $ ls image_1 image_15 image_20 image_26 image_31 image_37 image_42 +image_9 image_10 image_16 image_21 image_27 image_32 image_38 image_43 image_11 image_17 image_22 image_28 image_33 image_39 image_5 image_12 image_18 image_23 image_29 image_34 image_4 image_6 image_13 image_19 image_24 image_3 image_35 image_40 image_7 image_14 image_2 image_25 image_30 image_36 image_41 image_8 $ echo "thx all for comments" thx all for comments $