Web::Scraper - Web Scraping Toolkit inspired by Scrapi
use URI; use Web::Scraper; my $ebay_auction = scraper { process "h3.ens>a", description => 'TEXT', url => '@href'; process "td.ebcPr>span", price => "TEXT"; process "div.ebPicture >a>img", image => '@src'; result 'description', 'url', 'price', 'image'; }; my $ebay = scraper { process "table.ebItemlist tr.single", "auctions[]" => $ebay_auction; result 'auctions'; }; $ebay->scrape( URI->new("http://search.ebay.com/apple-ipod-nano_W0QQssPageNameZWLRS") );
Web::Scraper is a web scraper toolkit, inspired by Ruby's equivalent Scrapi.
THIS MODULE IS IN ITS BETA QUALITY. THE API IS STOLEN FROM SCRAPI BUT MAY CHANGE IN THE FUTURE
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://blog.labnotes.org/category/scrapi/
To install Web::Scraper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Web::Scraper
CPAN shell
perl -MCPAN -e shell install Web::Scraper
For more information on module installation, please visit the detailed CPAN module installation guide.