From: Don Armstrong Date: Wed, 16 Sep 2009 22:38:31 +0000 (+0000) Subject: * only print the chapter link if we haven't yet gotten the manga X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=513a906b9e10ce0d990d4999f3883a600bc8f190;p=bin.git * only print the chapter link if we haven't yet gotten the manga --- diff --git a/get_one_manga b/get_one_manga index 3fd8118..3faf99f 100755 --- a/get_one_manga +++ b/get_one_manga @@ -104,10 +104,10 @@ 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) { - print $chapter_link->url(),qq(\n); my ($chapter) = $chapter_link->url() =~ m/([\d-]+)\/?$/; my $chapter_long = sprintf('%04d',$chapter); if (! -d "$manga/$chapter_long") { + print $chapter_link->url(),qq(\n); mkdir("$manga/$chapter_long"); $m->get($chapter_link->url_abs()); $m->follow_link(text_regex => qr{Begin reading});