コード例 #1
0
        /// <summary>
        /// 清除重复文字的推
        /// </summary>
        public static void ClearGarbTweet()
        {
            var grabusers =
                db.getAllWaitRecognizer()
                .GroupBy(r => r.Tweet)
                .Where(grp => grp.Select(r => r.UID).Distinct().Count() > 1)
                .SelectMany(grp => grp)
                .ToList();

            //db.addBandIDs(grabusers.Select(u => u.UID).Distinct().ToList());

            grabusers.ForEach(u => db.removeWaitRecognizer(u));
        }
コード例 #2
0
        public static void Download(params WaitRecognizer[] defs)
        {
            var db     = new SelfieBotDB();
            var stored = db.getAllWaitRecognizer().Select(nr => nr.TID).Distinct();

            foreach (var def in defs.Where(d => !stored.Contains(d.TID)))
            {
                if (dl(def))
                {
                    db.addWaitRecognizer(def);
                }
            }
        }