#!/usr/bin/perl
#--- main
$y = 2014;
while($y>=2008){
$m = 12;
while($m>=1){
getDqn($y, $m);
$m--;
}
$y--;
}
exit;
sub getDqn{
sleep 1;
my $command = sprintf("wget -q -O - http://ro-blog.livedoor.biz/archives/%04d-%02d.html?p=1", $y, $m);
open(my $fh, "$command |");
while(<$fh>){
print "TITLE: $1\n" if(/dc:title="([^"]+)"/);
print "URL: $1\n" if(/dc:identifier="([^"]+)"/);
print "DATE: $1\n\n" if(/dc:date="([^"]+)"/);
}
close($fh);
}
|