Retrieve IMDB Cover Images with Perl

Last updated: Aug 29, 2008

In response to David’s post on PHP IMDB Information Grabber, I thought I would extend his idea and grab the cover image for the movie and save it.

So basically you give this script the IMDB number OR the actual movie title and it will go out and try to find it and download the image that IMDB has on file and store it on your hard drive. By default the file will be downloaded into the current directory.


use IMDB::Film;
use LWP::Simple;

my $imdbNumber = $ARGV[0];
my $film = new IMDB::Film(crit => $imdbNumber);

my $title = $film->title();
my $file = "$title.jpg";

my $cover = $film->cover();


The usage is really simple…

perl 0112573

Where the number is the IMDB number of that particular title. You can also use the actual movie title.

perl Goonies

This will fetch the cover image and download it to the current directory.

Need to print shipping labels on your site?

Checkout my product RocketShipIt for simple easy-to-use developer tools for UPS™ FedEx™ USPS™ and more.

Get notified on new posts or other things I'm working on