Created
May 1, 2012 00:54
-
-
Save kenjiskywalker/2564059 to your computer and use it in GitHub Desktop.
Football Schedule Get Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Web::Scraper; | |
use URI; | |
my $scraper = scraper{ | |
# process 'tag' , 'scala' or 'hairetsu[]' => 'get data style'; | |
process 'td', 'schedule[]'=>'TEXT'; | |
# return data; | |
result 'schedule'; | |
}; | |
my $uri = new URI('http://www.jsports.co.jp/football/'); | |
my $res = $scraper->scrape($uri); | |
my $sche = ''; | |
for my $data (@$res){ | |
$sche = $sche.$data."\n"; | |
} | |
binmode(STDOUT,"utf8"); | |
print $sche; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment