Image::GrabPerl extension for Grabbing images off the Internet | |
Download |
Image::Grab Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Mark A. Hershberger
- Publisher web site:
- http://search.cpan.org/~mahex/
Image::Grab Tags
Image::Grab Description
Perl extension for Grabbing images off the Internet Image::Grab is a Perl module that offers a simple way to get images with URLs that are either not predictable or are "hidden" by some method.SYNOPSIS # If you call grab without instantiating an Image::Grab, then you # can pass grab args and it will instantiate one for you and return # whatever the image is. use Image::Grab qw(grab); # $image should contain GIF data after this. $image = grab(URL=>'http://www.example.com/test.gif'); use Image::Grab; $pic = new Image::Grab; # You can also pass new arguments: use Image::Grab; $pic = Image::Grab->new(SEARCH_URL=>'http://www.example.com/', REGEXP =>'.*.gif'); # The simplest OO case of a grab use Image::Grab; $pic->url('http://www.example.com/someimage.jpg') $pic->grab; # Now to save the image to disk open(IMAGE, ">image.jpg") || die"image.jpg: $!"; binmode IMAGE; # for MSDOS derivations. print IMAGE $pic->image; close IMAGE; # A slightly more complicated case use Image::Grab; $pic->regexp('.*logo.*.gif'); $pic->search_url('http://www.example.com'); $pic->grab; # Get a weather forecast use Image::Grab; $pic->regexp('msy.*.gif'); $pic->search_url('http://www.example.com/weather/msy/content.shtml'); $pic->grab; Requirements: · Perl
Image::Grab Related Software