On Tue Sep 19 09:56:25 2006, PURDY wrote:
Show quoted text> On Tue Sep 19 09:41:42 2006, PURDY wrote:
> > I have version 0.0103 installed.
> >
> > Anyway, it looks like MSN changed their results page because
the 'h5'
Show quoted text> > look_down isn't finding a match, which results in this error:
> >
> > Can't call method "as_text" on an undefined value at
> > /usr/local/share/perl/5.8.4/WWW/Search/MSN.pm line 118.
>
> I took a look at the results page and the 'h5' element is still
there
Show quoted text> and fits the pattern that should be found. So this might be a
problem
Show quoted text> w/ MSN rejecting our search. Here's a simple test script:
>
> ----
> use WWW::Search;
>
> my $msn_searcher = WWW::Search->new( 'MSN' );
> $msn_searcher->maximum_to_retrieve( 20 );
> $msn_searcher->gui_query( 'restaurant sales' );
> my $count = 1;
> while( my $result = $msn_searcher->next_result() ) {
> print "$count) " . $result->url;
> $count++;
> }
> ----
>
> $ perl ./msn_search.pl
> Can't call method "as_text" on an undefined value at
> /usr/local/share/perl/5.8.4/WWW/Search/MSN.pm line 118.
>
The problem was that the <h5 tag was moved to a different <div>. I now
corrected it and released WWW-Search-MSN version 0.0104 to the CPAN,
which should fix it.
Thanks for reporting it!
Regards,
Shlomi Fish