Пример #1
0
        public static void Run()
        {
            NCrawlerModule.Setup();
            Console.Out.WriteLine("Advanced crawl demo");

            using (Crawler c = new CustomCrawler(new Uri("http://ncrawler.codeplex.com"),
                                                 new HtmlDocumentProcessor(), // Process html
                                                 new DumperStep())
            {
                MaximumThreadCount = 10,
                MaximumCrawlDepth = 2,
                ExcludeFilter = Program.ExtensionsToSkip,
            })
            {
                // Begin crawl
                c.Crawl();
            }
        }
Пример #2
0
        public static void Run()
        {
            NCrawlerModule.Setup();
            Console.Out.WriteLine("Advanced crawl demo");

            using (Crawler c = new CustomCrawler(new Uri("http://ncrawler.codeplex.com"),
                new HtmlDocumentProcessor(), // Process html
                new DumperStep())
                {
                    MaximumThreadCount = 10,
                    MaximumCrawlDepth = 2,
                    ExcludeFilter = Program.ExtensionsToSkip,
                })
            {
                // Begin crawl
                c.Crawl();
            }
        }