Chinaunix首页 | 论坛 | 博客
  • 博客访问: 174102
  • 博文数量: 159
  • 博客积分: 7007
  • 博客等级: 准将
  • 技术积分: 1750
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-17 15:05
文章分类

全部博文(159)

文章存档

2010年(39)

2009年(106)

2008年(14)

我的朋友

分类:

2010-01-12 14:52:45

#!/usr/bin/perl

use strict;
use warnings;
use URI;
use Web::Scraper;
use URI::Escape;

my $url = "";
my $worker = scraper {
    process "code", "weathers[]" => "TEXT";
};
print "Starting...\n";
my $result = $worker->scrape( URI->new($url) );

for my $weather ( @{ $result->{weathers} } ) {
   print "$weather\n";
}

阅读(366) | 评论(0) | 转发(0) |
0

上一篇:perl登录网站

下一篇:LWP与WEB的基本使用

给主人留下些什么吧!~~