Subject: | bug in IMDB::Film constructor |
I used:
my $film = new IMDB::Film(crit => 'Dinosaur Planet (2003)',
debug => 1,
query => 'tt',
);
and i got:
[DEBUG] CRIT: Dinosaur Planet (2003) at ./convert line 192
[DEBUG] Retrieving page from internet ... at ./convert line 192
[DEBUG] URL is [http://www.imdb.com/find?tt=on;mx=20;q=Dinosaur Planet
(2003)]... at ./convert line 192
[DEBUG] Go to search page ... at ./convert line 192
[DEBUG] CRIT: 0389605 at ./convert line 192
[DEBUG] Retrieving page from internet ... at ./convert line 192
[DEBUG] URL is [http://www.imdb.com/tt0389605]... at ./convert line 192
[CRITICAL] Cannot retrieve url [http://www.imdb.com/tt0389605] at
./convert line 192
it is looks like IMDB use http://www.imdb.com/title/tt0389605 URL
instead old http://www.imdb.com/tt0389605
my patch for that:
--- /usr/lib/perl5/site_perl/5.8.8/IMDB/BaseClass.pm 2007-03-20
07:02:06.000000000 +0200
+++ BaseClass.pm 2007-03-20 08:58:18.435000000 +0200
@@ -369,7 +369,7 @@ sub _content {
$self->_show_message("Retrieving page
from internet ...", 'DEBUG');
my $url = 'http://'.$self->_host().'/'.
- ( $crit =~ /^\d+$/ ?
$self->_query() : $self->_search() ).$crit;
+ ( $crit =~ /^\d+$/ ?
'title/'.$self->_query() : $self->_search() ).$crit;
$page =
$self->_get_page_from_internet($url);
$self->status(FROM_INTERNET);
}