Subject: | Cast format changed... |
Date: | Thu, 11 Oct 2007 00:27:04 +0200 |
To: | bug-IMDB-Film [...] rt.cpan.org |
From: | Matthias Hopf <mat [...] mshopf.de> |
Noticed with current CPAN IMDB::Film (0.30):
Casts have now <a..> tags not only in the actor but also in the cast
field. Some, at least. In these cases, the cast isn't detected any more.
Trivial fix:
------> CUT <-------
--- /var/tmp/IMDB-Film-0.30/lib/IMDB/Film.pm 2007-09-13 08:38:30.000000000 +0200
+++ Film.pm 2007-10-11 00:21:50.000000000 +0200
@@ -643,7 +643,7 @@
if($tag->[1]{href} && $tag->[1]{href} =~ m#(?<!tinyhead)/name/nm(\d+?)/#) {
$person = $parser->get_text;
$id = $1;
- my $text = $parser->get_trimmed_text('a', '/tr');
+ my $text = $parser->get_trimmed_text('/tr');
($role) = $text =~ /.*?\s+(.*)$/;
push @cast, {id => $id, name => $person, role => $role};
}
------> CUT <-------
Thanks
Matthias
--
Matthias Hopf <mhopf@suse.de> __ __ __
Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ mat@mshopf.de
Phone +49-911-74053-715 __) |_| __) |__ labs www.mshopf.de