fixed bug

This commit is contained in:
Sem van der Hoeven
2020-03-03 18:55:29 +01:00
parent 996e6abc4b
commit 5f79fb06f7
2 changed files with 2 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ public class Main {
boolean save = getChoice(scanner.nextLine());
System.out.print("Do you want to enable debug mode? (Y/N) : ");
boolean debug = getChoice(scanner.nextLine());
if (debug) System.out.println("[INFO] - Debug mode enabled");
WebCrawler crawler = new WebCrawler(amount,save,debug);
crawler.search(startUrl,word);
}

View File

@@ -74,7 +74,7 @@ public class WebCrawler {
int counter = 0;
while (this.pagesVisited.size() < amountOfPages) {
String curUrl;
CrawlBranch branch = new CrawlBranch();
CrawlBranch branch = new CrawlBranch(debug);
if (this.pagesPending.isEmpty()) {
curUrl = url;
this.pagesVisited.add(url);