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.

#!/usr/bin/perl

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();
getstore($cover,$file);

Usage

The usage is really simple…

perl imdbCover.pl 0112573

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

perl imdbCover.pl 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

Share: