--- imdb.pl.orig 2007-06-04 12:26:13.000000000 -0400
+++ imdb.pl 2007-06-04 11:49:55.000000000 -0400
@@ -131,19 +131,23 @@
}
# parse director
- my $director = parseBetween($response, ">Director:", "/a>
");
- $director = parseBetween($director, "/\">", "<");
+ # (Note: this takes the 'first' director, may want to include others)
+ my $data = parseBetween($response, ">Director:", "");
+ if (!length($data)) {
+ $data = parseBetween($response, ">Directors:", "");
+ }
+ my $director = join(", ", ($data =~ m/$name_link_pat/g));
# parse writer
# (Note: this takes the 'first' writer, may want to include others)
- my $data = parseBetween($response, ">Writers (WGA):", "");
+ $data = parseBetween($response, ">Writers (WGA):", "");
if (!length($data)) {
$data = parseBetween($response, ">Writer:", "");
}
if (!length($data)) {
$data = parseBetween($response, ">Writers:", "");
}
- my $writer = join(",", ($data =~ m/$name_link_pat/g));
+ my $writer = join(", ", ($data =~ m/$name_link_pat/g));
# parse plot
my $plot = parseBetween($response, ">Plot Outline: ", "");