|Perl: the Markov chain saw|
Problem in using Web::Scraper, coming from HTML::TreeBuilder::XPathby sbasbasba (Initiate)
|on Oct 06, 2013 at 00:22 UTC||Need Help??|
sbasbasba has asked for the
wisdom of the Perl Monks concerning the following question:
Hi all, thanks in advance for all the precious knowledge you've been sharing so far!
I am a newbie at Perl, and I am trying to write a script that:
1) searches Google Scholar for some keywords stored in a text file;
2) opens the first "Cited by..." link that appears in the results;
3) scrapes all the following search page (Name, info, number of citations of the papers).
This is what I wrote so far:
The line:my $res = $out->scrape($result, $indi);
however, gives me the following error:
Can't locate object method "new" via package "HTML::TreeBuilder::XPath" at /System/Library/Perl/Extras/5.10.0/Web/Scraper.pm line 115, <F1> line 1.
I have searched the Internet and found no answer, I updated my version of XPath, I tried to use scrape(URI->($indi)); but nothing works. I am quite desperate! I have the feeling that there is a bug in the XPath.pm file, because I have been following exactly the same scraping code that I see in the CPAN guide for WEB::Scraper. Nothing seems to work.
If you could help me, you would have my eternal gratitude.
Thanks a lot in advance!!