Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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());
        }
Exemplo n.º 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());
        }