]> git.donarmstrong.com Git - bin.git/commitdiff
update get_one_manga
authorDon Armstrong <don@donarmstrong.com>
Tue, 3 Nov 2009 21:28:40 +0000 (21:28 +0000)
committerDon Armstrong <don@donarmstrong.com>
Tue, 3 Nov 2009 21:28:40 +0000 (21:28 +0000)
get_one_manga

index 3cd7b121ab589bf000efcd2870ce692b1767b667..6920c04835dd17e7c47c2ac55955ac467b73a995 100755 (executable)
@@ -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");