예제 #1
0
        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();
        }
예제 #2
0
        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();
        }
예제 #3
0
        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());
        }
예제 #4
0
        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());
        }