public List <IW2S_WX_level1link> GetLinkTitleList(ObjectId prijid)
        {
            lock (taskToken)
            {
                try
                {
                    //var builder = Builders<IW2S_level1link>.Filter;
                    //var filter = builder.Eq(x => x.ProjectId, prijid);
                    //// filter &= builder.Lte(x => x.LastBotEndAt, dt);
                    //var col = MongoDBHelper.Instance.GetIW2S_level1links();
                    //var result = col.Find(filter);//

                    MongoDBClass <IW2S_WX_level1link> helper = new MongoDBClass <IW2S_WX_level1link>();
                    var queryTask = new QueryDocument {
                        { "ProjectId", prijid }
                    };
                    List <IW2S_level1link> list = new List <IW2S_level1link>();
                    FieldsDocument         fd   = new FieldsDocument();
                    fd.Add("Title", 1);
                    MongoCollection <IW2S_WX_level1link> col = new MongoDBClass <IW2S_WX_level1link>().GetMongoDB().GetCollection <IW2S_WX_level1link>("IW2S_WX_level1link");
                    var TaskList = col.Find(queryTask).SetFields(fd);

                    if (TaskList != null)
                    {
                        Console.WriteLine("成功获取全部数据标题");
                    }
                    return(TaskList.ToList());
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Get keywordList task error: {0}".FormatStr(ex.Message));
                    return(null);
                }
            }
        }
        public static void Setdate()
        {
            while (true)
            {
                MongoDBClass <IW2S_level1link> helper = new MongoDBClass <IW2S_level1link>();
                var queryTask = new QueryDocument {
                    { "AlternateFields", "0" }
                };
                List <IW2S_level1link> list = new List <IW2S_level1link>();
                FieldsDocument         fd   = new FieldsDocument();
                fd.Add("_id", 1);
                fd.Add("LinkUrl", 1);
                fd.Add("Html", 1);
                MongoCollection <IW2S_level1link> col = new MongoDBClass <IW2S_level1link>().GetMongoDB().GetCollection <IW2S_level1link>("IW2S_level1link");
                var TaskList = col.Find(queryTask).SetFields(fd).SetLimit(1).ToList();
                if (TaskList.Count > 0)
                {
                    try
                    {
                        // Pattern p = Pattern.compile("(20\\d{2}[-/]\\d{1,2}[-/]\\d{1,2})|(20\\d{2}年\\d{1,2}月\\d{1,2}日)", Pattern.CASE_INSENSITIVE|Pattern.MULTILINE);
                        // public string PublishTime { get; set; }
                        //public string AlternateFields { get; set; }
                        foreach (var item in TaskList)
                        {
                            Regex reg = new Regex("(20\\d{2}[-/]\\d{1,2}[-/]\\d{1,2})|(20\\d{2}年\\d{1,2}月\\d{1,2}日)");
                            Match m   = reg.Match(item.Html);
                            //MatchCollection cols = reg.Matches(item.Html);
                            string time = "";
                            if (m.Groups.Count > 0)
                            {
                                time = m.Groups[0].Value;
                            }


                            var update = new UpdateDocument {
                                { "$set", new QueryDocument {
                                      { "PublishTime", time }, { "AlternateFields", "1" }
                                  } }
                            };
                            var result = MongoDBHelper.Instance.GetIW2S_level1links().UpdateOne(new QueryDocument {
                                { "_id", item._id }
                            }, update);
                        }
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e.Message);
                    }
                }
                else
                {
                    Console.WriteLine("已经完成!");
                }
            }
        }