From 513a906b9e10ce0d990d4999f3883a600bc8f190 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 16 Sep 2009 22:38:31 +0000 Subject: [PATCH] * only print the chapter link if we haven't yet gotten the manga --- get_one_manga | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}); -- 2.39.5