From: Don Armstrong Date: Tue, 3 Nov 2009 21:28:40 +0000 (+0000) Subject: update get_one_manga X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=04d45ac7cc9cd1a978eee4ceae3cdf4633184c06;p=bin.git update get_one_manga --- diff --git a/get_one_manga b/get_one_manga index 3cd7b12..6920c04 100755 --- a/get_one_manga +++ b/get_one_manga @@ -104,8 +104,8 @@ for my $manga (@manga_to_get) { # figure out where to start getting stuff my @chapter_links = $m->find_all_links(url_abs_regex => qr{\Q$manga\E\/\d+}); for my $chapter_link (reverse @chapter_links) { - my ($chapter) = $chapter_link->url() =~ m/([\d-]+)\/?$/; - my $chapter_long = sprintf('%04d',$chapter); + my ($chapter) = $chapter_link->url() =~ m/([\d.-]+)\/?$/; + my $chapter_long = $chapter =~ /\./ ? join('.',map {sprintf'%04d',$_} split /\./,$chapter) : sprintf('%04d',$chapter); if (! -d "$manga/$chapter_long") { print $chapter_link->url(),qq(\n); mkdir("$manga/$chapter_long");