Sophie

Sophie

distrib > Mageia > 6 > armv7hl > by-pkgid > 1314a49436094a513297e0b988ae34d9 > files > 14

perl-Web-Scraper-0.380.0-3.mga6.noarch.rpm

#!/usr/bin/perl
use strict;
use warnings;
use URI;
use lib "lib";
use Web::Scraper;

my $uri = shift @ARGV or die "URI needed";

my $scraper = scraper {
    process "a[href]", "urls[]" => '@href';
    result 'urls';
};

my $links = $scraper->scrape(URI->new($uri));
use YAML;
warn Dump $links;