X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=get_bleachexile;h=aa13f6b0e05928eab86f20142ae0bbe91ebbe7e4;hb=7072dd6217d2a600f729188624f228b5700bd836;hp=0d457c0d6fe49a75d92e26950f1632894e7322b1;hpb=0bc0d1413c6217be7ff6292595587f377f3f3c2d;p=bin.git diff --git a/get_bleachexile b/get_bleachexile index 0d457c0..aa13f6b 100755 --- a/get_bleachexile +++ b/get_bleachexile @@ -111,7 +111,7 @@ for my $manga (@manga_to_get) { my @chapters = $m->content() =~ m{\s*Chapter\s+\#?\d+\s*}gi; - for my $chapter (sort uniq(@chapters)) { + for my $chapter (uniq(@chapters)) { my ($chapter) = +$chapter; my $chapter_long = $chapter =~ /\./ ? join('.',map {sprintf'%04d',$_} split /\./,$chapter) : sprintf('%04d',$chapter); my $chapter_url = $options{bleachexile}.'/'.lc($manga).'-chapter-'.$chapter.'.html'; @@ -121,7 +121,8 @@ for my $manga (@manga_to_get) { # Find out how many pages there are my @pages = $m->content() =~ m{\s*Page\s+\#?[\d\.\-]+\s*}gi; mkdir("$manga/$chapter_long"); - for my $page (sort uniq(@pages)) { + @pages = uniq(map {+$_} @pages); + for my $page (@pages) { my $page_url = $options{bleachexile}.'/'.lc($manga).'-chapter-'.$chapter.'-page-'.$page.'.html'; print $page_url.qq(\n); mm_get($m,$page_url);