From ae559de8acc0f097eda09a238a88892f5e1e8e43 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 2 Nov 2010 23:59:59 +0000 Subject: [PATCH] * tweak bleachexile again --- get_bleachexile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.39.2