eBay::API::Simple::HTML
my $call = ebay::API::Simple::HTML->new(); $call->execute( 'http://www.timkeefer.com/blog/view/portfolio' ); if ( $call->has_error() ) { die "Call Failed:" . $call->errors_as_string(); } # getters for the response DOM or Hash my $dom = $call->response_dom(); my $hash = $call->response_hash(); # collect all h2 nodes my @h2 = $dom->getElementsByTagName('h2'); foreach my $n ( @h2 ) { print $n->findvalue('text()') . "\n"; }
Constructor for the HTML API call
my $call = ebay::API::Simple::HTML->new(); $call->execute( 'http://www.timkeefer.com/blog/view/portfolio' );
Calling this method will make build and execute the api request.
$url = page to fetch $call->execute( 'http://www.timkeefer.com' );
Custom response_hash method, uses the output from LibXML to generate the hash instead of the raw response body.
Custom response_dom method, provides a more relaxed parsing to better handle HTML.
This methods supplies an empty request body for the HTML API call
This methods supplies the headers for the HTML API call
This method creates the request object and returns to the parent class
Tim Keefer <tim@timkeefer.com>
Tim Keefer 2009
To install eBay::API::SimpleBase, copy and paste the appropriate command in to your terminal.
cpanm
cpanm eBay::API::SimpleBase
CPAN shell
perl -MCPAN -e shell install eBay::API::SimpleBase
For more information on module installation, please visit the detailed CPAN module installation guide.