Created
December 8, 2009 14:56
-
-
Save lolicsystem/251696 to your computer and use it in GitHub Desktop.
megahit の IV リストから、new のやつだけ抜き出す
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/perl | |
use strict; | |
use warnings; | |
use Web::Scraper; | |
use URI; | |
use YAML::Syck qw/Dump/; | |
my $scraper = scraper { | |
process '//tr//tr', 'tr[]' => scraper { | |
process ' ', "html" => 'HTML'; | |
process 'img', 'img' => '@src'; | |
}; | |
result "tr"; | |
}; | |
my $res = $scraper->scrape(URI->new('http://www.megahit.co.jp/dvd/i-dol_dvdlist0912.htm')); | |
my @result = grep defined $_->{img}, @$res; | |
print Dump \@result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment