fixed bug
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user