public async Task <CrawlResult> CrawlAsync()
        {
            IXmlConfigReader  xmlConfigReader = new XmlConfigReader(ConfigXMLFileName, ConfigXSDFileName, TargetNamespace);
            Config            config          = xmlConfigReader.ReadConfig();
            ISimpleWebCrawler webCrawler      = new SimpleWebCrawler(config.Depth);

            return(await webCrawler.PerformCrawlingAsync(new List <string>(config.RootUrls)));
        }
Пример #2
0
        static void Main(string[] args)
        {
            SetAllowUnsafeHeaderParsing20();
            ISimpleWebCrawler crawler = new SimpleWebCrawler(2);
            CrawlResult       res     = crawler.PerformCrawlingAsync(new [] { "http://oz.by/books/more10480814.html" }).Result;

            res = res;
            Thread.Sleep(20000);
            res = res;
        }