X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=get_bleachexile;h=aa13f6b0e05928eab86f20142ae0bbe91ebbe7e4;hb=07b73066dd1384d18778a90dcd85f03b5df1e54c;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{}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{}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);