Skip Menu |

This queue is for tickets about the IMDB-Film CPAN distribution.

Report information
The Basics
Id: 83186
Status: new
Priority: 0/
Queue: IMDB-Film

People
Owner: Nobody in particular
Requestors: craig [...] sandcube.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.53
Fixed in: (no value)



Subject: No Plot
It looks like IMDB changed their layout and added a blank <p> tag before the plot. The parser just checks the first <p> tag for the plot, so it's not returning anything. I also added a next-tag check to avoid grabbing the description from the "related movie" area when there is no plot (such as the movie "Cold War"). I'm not fluent with HTML::TokeParser but I changed the plot parsing section, in the "rating "subroutine in Film.pm to this: unless($self->{_plot}) { while(my $tag = $parser->get_tag('p')) { last if $tag->[1]{'itemprop'} && $tag-> [1]{'itemprop'} eq "description"; } my $plot = $parser->get_trimmed_text('/p'); my $nextTag = $parser->get_tag('div'); if (! ($nextTag->[0] eq "div" && $nextTag->[1]-> {'class'} && $nextTag->[1]->{'class'} eq "rec-jaw-lower") ) { $self->{_plot} = $plot; } } ..And it now returns the plot (or no plot if a plot is not available)