public string LogStatusCodeSummary(CrawlerReport report) { var statusCodeSummary = new StringBuilder(); Console.WriteLine("----------------------------"); Console.WriteLine("Status Code Summary"); Console.WriteLine("----------------------------"); _queryBuilder = new CrawlerQueryManager(report); var statusCodeUrls = _queryBuilder.GetUrlsByStatusCode(); foreach (var item in statusCodeUrls) { LogToConsoleAndStringBuilder(statusCodeSummary, string.Format("{0,20} - {1,5:N0}", item.Key, item.Count())); } return statusCodeSummary.ToString(); }
public string LogBrokenLinks(CrawlerReport report) { var brokenLinksSummary = new StringBuilder(); Console.WriteLine("----------------------------"); Console.WriteLine("Broken Links"); Console.WriteLine("----------------------------"); _queryBuilder = new CrawlerQueryManager(report); var urls = _queryBuilder.GetBrokenLinks(); foreach (var item in urls) { LogToConsoleAndStringBuilder(brokenLinksSummary, item.Url.AbsoluteUri); } return brokenLinksSummary.ToString(); }
public string LogStatusCodeSummary(CrawlerReport report) { var statusCodeSummary = new StringBuilder(); Console.WriteLine("----------------------------"); Console.WriteLine("Status Code Summary"); Console.WriteLine("----------------------------"); _queryBuilder = new CrawlerQueryManager(report); var statusCodeUrls = _queryBuilder.GetUrlsByStatusCode(); foreach (var item in statusCodeUrls) { LogToConsoleAndStringBuilder(statusCodeSummary, string.Format("{0,20} - {1,5:N0}", item.Key, item.Count())); } return(statusCodeSummary.ToString()); }
public string LogBrokenLinks(CrawlerReport report) { var brokenLinksSummary = new StringBuilder(); Console.WriteLine("----------------------------"); Console.WriteLine("Broken Links"); Console.WriteLine("----------------------------"); _queryBuilder = new CrawlerQueryManager(report); var urls = _queryBuilder.GetBrokenLinks(); foreach (var item in urls) { LogToConsoleAndStringBuilder(brokenLinksSummary, item.Url.AbsoluteUri); } return(brokenLinksSummary.ToString()); }