Beispiel #1
0
        private bool Start(string currentUrl)
        {
            string html = crawler.DownLoad(currentUrl); // 下载页面

            crawler.CrawlUrls[currentUrl] = true;       //将爬取过的链接置为已爬取
            crawler.Count++;
            if (!crawler.CheckHtml(html))
            {
                return(false);
            }
            if (!crawler.Parse(html))//解析,并加入新的链接
            {
                return(false);
            }
            return(false);
        }