WWW::Mechanize::Plugin::Web::Scraper - Scrape the planet!
use strict; use WWW::Mechanize::Pluggable; my $mech = WWW::Mechanize::Pluggable->new(); $mech->get("http://search.cpan.org/"); $mech->submit_form( form_name => "f", fields => { query => "WWW::Mechanize" } ); my $results = $mech->scrape( "/html/body/h2/a", "results[]", { title => "TEXT", url => '@href' } );
WWW::Mechanize::Plugin::Web::Scraper gives you the scraping power of Web::Scraper in WWW::Mechanize, hence the name ...
WWW::Mechanize::Plugin::Web::Scraper
scrape is the only new method that can be called (as of yet) and accepts process information as described in Web::Scraper. Note that the function process can (and should) be omitted. The scraper will use the current WWW::Mechanize content, so make sure to "browse" to the right page before calling the scrape function.
scrape
Bugs? Most likely you want to pester either Andy (if WWW::Mechanize is broken), Joe (if WWW::Mechanize::Pluggable isn't working as expected) or Tatsuhiko (the Web::Scraper mastermind).
Bugs?
If these three people can't help, it then might be possible that this module is to blame (ok, I admit it, this module probably *is* to blame to begin with). Please be so kind to report it to http://rt.cpan.org/Ticket/Create.html?Queue=WWW-Mechanize-Plugin-Web-Scraper.
Menno Blom, <blom@cpan.org>, http://menno.b10m.net/perl/
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install WWW::Mechanize::Plugin::Web::Scraper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Mechanize::Plugin::Web::Scraper
CPAN shell
perl -MCPAN -e shell install WWW::Mechanize::Plugin::Web::Scraper
For more information on module installation, please visit the detailed CPAN module installation guide.