The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::scrape - simple HTML scraping

ABSTRACT

This is a simple module to extract data from HTML by specifying CSS3 or XPath selectors.

SYNOPSIS

    use App::scrape 'scrape';
    use LWP::Simple 'get';
    use Data::Dumper;

    my $html = get('http://perlmonks.org');
    my @posts = scrape(
        $html,
        ['a','a@href'],
        {
            absolute => [qw[href src rel]],
            base => 'http://perlmonks.org',
        },
    );
    print Dumper \@posts;

    my @posts = scrape(
        $html,
        {
          title => 'a',
          url   => 'a@href',
        },
        {
            absolute => [qw[href src rel]],
            base => 'http://perlmonks.org',
        },
    );
    print Dumper \@posts;

DESCRIPTION

This module implements yet another scraping engine to extract data from HTML.

This engine does not (yet) support nested data structures. For an engine that supports nesting, see Web::Scraper.

SEE ALSO

Web::Scraper - the scraper inspiring this module

REPOSITORY

The public repository of this module is http://github.com/Corion/App-scrape.

SUPPORT

The public support forum of this program is http://perlmonks.org/.

AUTHOR

Max Maischein corion@cpan.org

COPYRIGHT (c)

Copyright 2011-2011 by Max Maischein corion@cpan.org.

LICENSE

This module is released under the same terms as Perl itself.