Esempio n. 1
0
        public static WebSetting GetWebSetting(string siteName)
        {
            WebSetting w = new WebSetting();

            w.SiteName   = GetConfig(siteName, "SiteName");
            w.CrawlOrNot = GetConfig(siteName, "CrawlOrNot");

            string CrawNewsCountStr = GetConfig(siteName, "CrawNewsCount");

            w.CrawNewsCount = string.IsNullOrEmpty(CrawNewsCountStr) ? 0 : Convert.ToInt32(CrawNewsCountStr);

            string CrawCommentsCountStr = GetConfig(siteName, "CrawCommentsCount");

            w.CrawCommentsCount = string.IsNullOrEmpty(CrawCommentsCountStr) ? 0 : Convert.ToInt32(CrawCommentsCountStr);
            w.FileNameHeadPart  = GetConfig(siteName, "FileNameHeadPart");
            w.FileExtension     = GetConfig(siteName, "FileExtension");

            return(w);
        }
Esempio n. 2
0
 public Crawler_QQ()
 {
     webSetting = MyConfigHandler.GetWebSetting(siteName);
 }