NAME

HTTP::GetImages

DESCRIPTION

Recover and locally store images from the web, including those linked by anchor and image map.

Version 0.2+ also gets images from Anchor elements' and image-map AREA elements' HREF/SRC. attributes.

SYNOPSIS

use HTTP::GetImages;
new HTTP::GetImages (
	'/images/new',
	qw( http://www.google.co.uk http://www.google.com/ )
);

DEPENDENCIES

strict;
Carp;
LWP::UserAgent;
HTTP::Request;
HTML::TokeParser;

PACKAGE GLOBAL VARIABLE

$chat

Set it if you'd like a real-time report to STDERR. Defaults to off.

$EXTENSIONS_RE

A regular expression 'or' list of image extensions to match.

Will be applied at the end of a filename, after a point, and is insensitive to case.

Defaults to (jpg|jpeg|bmp|gif|png|xbm|xmp).

CONSTRUCTOR METHOD new

Besides the class reference, accepts the path to the directory in which to store images (no trailing oblique necessary), the remaining paramters being interpreted as an array of URLs.

Returns a blessed hash, keys of which are:

DONE

a hash keys of which are the original URLs of the images, value being are the local filenames.

FAILED

a hash, keys of which are the failed URLs, values being short reasons.

PRIVATE METHOD _save_img

Accepts the dir in which to store the image, the image's URL (won't store same image twice) and the actual image source.

Returns the path the image was saved at.

SEE ALSO

Every thing and every one listed above under DEPENDENCIES.

AUTHOR

Lee Goddard (LGoddard@CPAN.org) 05/05/2001 16:08

COPYRIGHT

Copyright 2000-2001 Lee Goddard.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 41:

'=item' outside of any '=over'

Around line 62:

You forgot a '=back' before '=head1'

Around line 68:

'=item' outside of any '=over'

Around line 180:

You forgot a '=back' before '=head1'