Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lolicsystem/251696 to your computer and use it in GitHub Desktop.
Save lolicsystem/251696 to your computer and use it in GitHub Desktop.
megahit の IV リストから、new のやつだけ抜き出す
#!/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