|
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 |
|---|
| 2 | use strict; |
|---|
| 3 | use Web::Scraper; |
|---|
| 4 | use URI; |
|---|
| 5 | |
|---|
| 6 | my $account_name = shift or die "usage: fooo_name.pl accountname\n"; |
|---|
| 7 | my $stuff = URI->new("http://fooo.name/accounts/$account_name"); |
|---|
| 8 | my $scraper = scraper { |
|---|
| 9 | process '//div[@class="margin_m"]/span/a[1]', 'link[]' => '@href'; |
|---|
| 10 | }; |
|---|
| 11 | my $result = $scraper->scrape($stuff); |
|---|
| 12 | |
|---|
| 13 | for my $l (@{$result->{link}}) { |
|---|
| 14 | print "$l\n"; |
|---|
| 15 | }; |
|---|