Skip to content

Instantly share code, notes, and snippets.

@kenjiskywalker
Created May 1, 2012 00:54
Show Gist options
  • Save kenjiskywalker/2564059 to your computer and use it in GitHub Desktop.
Save kenjiskywalker/2564059 to your computer and use it in GitHub Desktop.
Football Schedule Get Script
#!/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