# 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");