From ef553e1ec55b9ce9be6631d34a4ff49ef97b68fd Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Tue, 22 May 2018 11:19:27 -0400 Subject: [PATCH] Can now include comments in url files --- src/main/java/com/rarchives/ripme/App.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/App.java b/src/main/java/com/rarchives/ripme/App.java index d58f5d4d..dac3980a 100644 --- a/src/main/java/com/rarchives/ripme/App.java +++ b/src/main/java/com/rarchives/ripme/App.java @@ -221,8 +221,12 @@ public class App { String url; BufferedReader br = new BufferedReader(new FileReader(filename)); while ((url = br.readLine()) != null) { - // loop through each url in the file and proces each url individually. - ripURL(url.trim(), cl.hasOption("n")); + if (url.startsWith("//") || url.startsWith("#")) { + logger.debug("Skipping over line \"" + url + "\"because it is a comment"); + } else { + // loop through each url in the file and process each url individually. + ripURL(url.trim(), cl.hasOption("n")); + } } } catch (FileNotFoundException fne) { logger.error("[!] File containing list of URLs not found. Cannot continue.");