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); }
public Crawler_QQ() { webSetting = MyConfigHandler.GetWebSetting(siteName); }