in reply to Question: how to check remote image property
You can have a look at WWW::Mechanize and $mech->find_image() who returns a WWW::Mechanize::Image object
Update: #!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; use Data::Dumper; my $url = q{http://perlmonks.org/}; my $m = WWW::Mechanize->new(); $m->get($url); print Dumper $_ for @{ $m->images };
Output: $VAR1 = bless( { 'width' => '468', 'base' => bless( do{\(my $o = 'http://perlmonks.org/' +)}, 'URI::http' ), 'alt' => 'Beefy Boxes and Bandwidth Generously Provid +ed by pair Networks', 'name' => undef, 'url' => 'http://promote.pair.com/i/pair-banner-curre +nt.gif', 'tag' => 'img', 'height' => '60' }, 'WWW::Mechanize::Image' ); $VAR1 = bless( { 'width' => '74', 'base' => bless( do{\(my $o = 'http://perlmonks.org/' +)}, 'URI::http' ), 'alt' => 'Ovid', 'name' => undef, 'url' => 'http://perlmonks.org/images/usermonkpics/ov +idmonk.gif', 'tag' => 'img', 'height' => '91' }, 'WWW::Mechanize::Image' );
hth,
PooLpi
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Question: how to check remote image property
by Your Mother (Archbishop) on Apr 07, 2008 at 20:39 UTC |