From 2d17b1c29576a57e7f6201dce4a88222e3730e9a Mon Sep 17 00:00:00 2001 From: Sebastien Date: Mon, 5 Mar 2018 14:18:50 +0100 Subject: [PATCH] Forget to check advertisement on daily madame --- .../java/net/Broken/Commands/Over18/Madame.java | 4 ++-- .../Tools/DayListener/Listeners/DailyMadame.java | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/Broken/Commands/Over18/Madame.java b/src/main/java/net/Broken/Commands/Over18/Madame.java index 16f4123..7694492 100644 --- a/src/main/java/net/Broken/Commands/Over18/Madame.java +++ b/src/main/java/net/Broken/Commands/Over18/Madame.java @@ -32,7 +32,7 @@ public class Madame implements Commande{ String url = redirect.get("http://dites.bonjourmadame.fr/random"); logger.debug("URL: "+url); - if(scanPageForTipeee(url)){ + if(scanPageForTipeee(url, logger)){ logger.debug("Advertisement detected! Retry! ("+url+")"); } else{ @@ -82,7 +82,7 @@ public class Madame implements Commande{ * @throws StringIndexOutOfBoundsException * @throws IOException */ - private boolean scanPageForTipeee(String url) throws StringIndexOutOfBoundsException, IOException{ + public static boolean scanPageForTipeee(String url, Logger logger) throws StringIndexOutOfBoundsException, IOException{ String content = FindContentOnWebPage.getSourceUrl(url); String imgClickLink = content.substring(content.indexOf("photo post")); imgClickLink = imgClickLink.substring(imgClickLink.indexOf("