Web::Scraper::LibXML - Drop-in replacement for Web::Scraper to use LibXML
use Web::Scraper::LibXML; # same as Web::Scraper my $scraper = scraper { ... };
Web::Scraper::LibXML is a drop-in replacement for Web::Scraper to use the fast libxml-based HTML tree builder.
This is almost identical to HTML::TreeBuilder::LibXML's replace_original installer, like:
use HTML::TreeBuilder::LibXML; HTML::TreeBuilder::LibXML->replace_original();
which overrides HTML::TreeBuilder::XPath's new() constructor so that ALL of your code using HTML::TreeBuilder::XPath is now switched to libxml based parser.
This module, instead, gives you more control over which TreeBuilder to use, depending on the site etc.
Web::Scraper HTML::TreeBuilder::LibXML
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.