Ticket #3567: patch.txt

File patch.txt, 1.3 KB (added by aprotim@…, 13 years ago)
Line 
1--- imdb.pl.orig        2007-06-04 12:26:13.000000000 -0400
2+++ imdb.pl     2007-06-04 11:49:55.000000000 -0400
3@@ -131,19 +131,23 @@
4    }
5 
6    # parse director
7-   my $director = parseBetween($response, ">Director:</h5>", "/a><br/>");
8-   $director = parseBetween($director, "/\">", "<");
9+   # (Note: this takes the 'first' director, may want to include others)
10+   my $data = parseBetween($response, ">Director:</h5>", "</div>");
11+   if (!length($data)) {
12+         $data = parseBetween($response, ">Directors:</h5>", "</div>");
13+   }
14+   my $director = join(", ", ($data =~ m/$name_link_pat/g));
15 
16    # parse writer
17    # (Note: this takes the 'first' writer, may want to include others)
18-   my $data = parseBetween($response, ">Writers <a href=\"/wga\">(WGA)</a>:</h5>", "</div>");
19+   $data = parseBetween($response, ">Writers <a href=\"/wga\">(WGA)</a>:</h5>", "</div>");
20    if (!length($data)) {
21          $data = parseBetween($response, ">Writer:</h5>", "</div>");
22    }
23    if (!length($data)) {
24          $data = parseBetween($response, ">Writers:</h5>", "</div>");
25    }
26-   my $writer = join(",", ($data =~ m/$name_link_pat/g));
27+   my $writer = join(", ", ($data =~ m/$name_link_pat/g));
28 
29    # parse plot
30    my $plot = parseBetween($response, ">Plot Outline:</h5> ", "</div>");