예제 #1
0
        public static bool InsertArticleURL(bool isFull = false)
        {
            List <string>     articleUrlList = new List <string>();
            IEnumerable <int> articleIds     = BaseDataDAL.GetArticleID(isFull);

            if (articleIds != null)
            {
                foreach (var article in articleIds.Where(q => q > 0))
                {
                    articleUrlList.Add(string.Format("http://www.tuhu.cn/Community/detail/{0}.aspx", article));
                }
            }
            if (isFull)
            {
                InsertURLToDB(new List <string> {
                    "http://www.tuhu.cn/Community/", "http://www.tuhu.cn/Community/Discovery.aspx", "http://www.tuhu.cn/Community/Discovery.aspx?tagId=1", "http://www.tuhu.cn/Community/Discovery.aspx?tagId=1344",
                    "http://www.tuhu.cn/Community/Discovery.aspx?tagId=6", "http://www.tuhu.cn/Community/Discovery.aspx?tagId=21", "http://www.tuhu.cn/Community/Discovery.aspx?tagId=61", "http://www.tuhu.cn/Community/Discovery.aspx?tagId=4"
                }, "DiscoveryList");
            }
            return(InsertURLToDB(articleUrlList, "DiscoveryDetail"));
        }