root/lang/perl/misc/fooo_name.pl @ 461

Revision 461, 384 bytes (checked in by otsune, 6 years ago)

lang/perl/plagger/lib/Plagger/Plugin/Filter/FLVInfo.pm: fix typo POD
lang/perl/misc/fooo_name.pl: scrape fooo.name URI

Line 
1#!/usr/bin/perl
2use strict;
3use Web::Scraper;
4use URI;
5
6my $account_name = shift or die "usage: fooo_name.pl accountname\n";
7my $stuff   = URI->new("http://fooo.name/accounts/$account_name");
8my $scraper = scraper {
9    process '//div[@class="margin_m"]/span/a[1]', 'link[]' => '@href';
10};
11my $result = $scraper->scrape($stuff);
12
13for my $l (@{$result->{link}}) {
14    print "$l\n";
15};
Note: See TracBrowser for help on using the browser.