From b90f5fc03f8e4a10db9e7dedc7c0544eb72939db Mon Sep 17 00:00:00 2001 From: mattn Date: Thu, 27 Oct 2011 19:30:57 +0900 Subject: scraping.perl --- template/scraping.perl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 template/scraping.perl (limited to 'template') diff --git a/template/scraping.perl b/template/scraping.perl new file mode 100644 index 0000000..ffb696d --- /dev/null +++ b/template/scraping.perl @@ -0,0 +1,16 @@ +use strict; +use warnings; +use utf8; +use Web::Scraper; +use URI; + +my $scraper = scraper { + process '{{_cursor_}}', 'data' => 'TEXT'; + result 'data'; +}; +$scraper->user_agent->env_proxy; + +use YAML::Syck; +for (@{$scraper->scrape( URI->new('') )}) { + print $_->{data}, "\n"; +} -- cgit v1.2.3-54-g00ecf