Skip to content

Commit 8474bac

Browse files
committed
add link and log
1 parent f9dad72 commit 8474bac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

WebCrawler/Model/Crawler.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class Crawler
2323
private static List<string> _exceptions = new List<string>();
2424
private bool isCurrentPage = true;
2525
private static List<string> urlsWithTopics = new List<string>();
26-
private int linkID;
27-
private int parentID;
26+
private static List<Link> links = new List<Link>();
27+
private static List<Log> log = new List<Log>();
2828

2929
//Constructor
3030
public Crawler(IRepos externalUrlRepository, IRepos otherUrlRepository, IRepos failedUrlRepository, IRepos currentPageUrlRepository)
@@ -47,9 +47,6 @@ public void InitializeCrawl()
4747
//Initialisting the reporting
4848
public void InitilizeCreateReport()
4949
{
50-
Data data = new Data();
51-
data.AddLink(name, url, linkID, parentID);
52-
5350
//var stringBuilder = Reporting.CreateReport(_externalUrlRepository, _otherUrlRepository, _failedUrlRepository, _currentPageUrlRepository, _pages, _exceptions);
5451

5552
//Logging.Logging.WriteReportToDisk(stringBuilder.ToString());
@@ -72,6 +69,9 @@ private void CrawlPage(string url)
7269
page.Url = url;
7370

7471
_pages.Add(page);
72+
links.Add(url);
73+
log.Add("New Log Entry: "+url);
74+
7575

7676
//AddUrlToList(topic);
7777

0 commit comments

Comments
 (0)