Win32::IE::Image - Mimic WWW::Mechanize::Image
use Win32::OLE; use Win32::IE::Image; my $agent = Win32::OLE->new( 'InternetExplorer.Application' ); $agent->Navigate( $uri ); # extract the images and wrap them as Win32::IE::Image my $doc = $agent->Document; my @images; for ( my $i=0; $i < $doc->images->lenght; $i++ ) { push @images, Win32::IE::Image->new( $doc->images( $i ) ); } # print the information from the images: foreach my $img ( @images ) { printf "%s as %s\n", $img->url, $img->alt||""; }
The Win32::IE::Image object is a thin wrapper around the DOM-object supplied by the InternetExplorer.Application. It is implemented as a blessed reference to the Win32::OLE-DOM object.
Win32::IE::Image
Create a new object, that implements url, base, tag, height, width, alt and name
Return the SRC attribute from the IMG tag.
Return 'IMG' for images.
Return the value width attrubite.
width
Return the value height attrubite.
height
Return the value alt attrubite.
alt
Copyright MMIV, Abe Timmerman <abeltje@cpan.org>. All rights reserved
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install Win32::IE::Mechanize, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::IE::Mechanize
CPAN shell
perl -MCPAN -e shell install Win32::IE::Mechanize
For more information on module installation, please visit the detailed CPAN module installation guide.