download nirayama.pl
Language: Perl
LOC: 18
Project Info
test-akihito-project - This is Test Project(test-akihito-project)
Server: Google
Type: svn
...ito‑project\trunk\perl\bot\
   author.pl
   flickr.pl
   ikea-xpath.pl
   ikea.pl
   japanese_kotowaza.pl
   nirayama.pl
   nitori.pl
   webscpaper_filter.pl

#!/usr/bin/perl

use Web::Scraper;
use URI;
use YAML;
use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
$ua->proxy('http', 'http://proxy.internal:8080');
$Web::Scraper::UserAgent = $ua;

my $url = 'http://www6.shizuokanet.ne.jp/takan/local1.htm'; 

my $scraper = scraper {
   process 'title','title[]' => 'TEXT'; 
#   process '//h3/following-sibling::p','description[]' => 'TEXT';
   process '//body/h3','language[]' => 
       scraper {
            process '//h3','name[]'     => 'TEXT';
      };
   result qw/title description language/
}->scrape(URI->new($url));

print YAML::Dump($scraper);

__END__

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us