示例#1
0
        protected StatusQueue queueStatus;                 //微博队列引用

        //构造函数,需要传入相应的新浪微博API和主界面
        public RobotBase(SysArgFor robotType)
        {
            crawler = new SinaMBCrawler(robotType);
            api     = GlobalPool.GetAPI(robotType);
            switch (robotType)
            {
            case SysArgFor.USER_INFO:
                if (iMinSleep < GlobalPool.MinSleepMsForUserInfo)
                {
                    iMinSleep = GlobalPool.MinSleepMsForUserInfo;
                }
                break;

            case SysArgFor.USER_TAG:
                if (iMinSleep < GlobalPool.MinSleepMsForUserTag)
                {
                    iMinSleep = GlobalPool.MinSleepMsForUserTag;
                }
                break;

            case SysArgFor.STATUS:
                if (iMinSleep < GlobalPool.MinSleepMsForStatus)
                {
                    iMinSleep = GlobalPool.MinSleepMsForStatus;
                }
                break;

            case SysArgFor.COMMENT:
                if (iMinSleep < GlobalPool.MinSleepMsForComment)
                {
                    iMinSleep = GlobalPool.MinSleepMsForComment;
                }
                break;

            default:
                if (iMinSleep < GlobalPool.MinSleepMsForUserRelation)
                {
                    iMinSleep = GlobalPool.MinSleepMsForUserRelation;
                }
                break;
            }
            AdjustRealFreq();
        }
示例#2
0
        protected StatusQueue queueStatus;                    //微博队列引用

        //构造函数,需要传入相应的新浪微博API和主界面
        public RobotBase(SysArgFor robotType)
        {
            crawler = new SinaMBCrawler(robotType);
            api = GlobalPool.GetAPI(robotType);
            switch (robotType)
            {
                case SysArgFor.USER_INFO:
                    if (iMinSleep < GlobalPool.MinSleepMsForUserInfo) iMinSleep = GlobalPool.MinSleepMsForUserInfo;
                    break;
                case SysArgFor.USER_TAG:
                    if (iMinSleep < GlobalPool.MinSleepMsForUserTag) iMinSleep = GlobalPool.MinSleepMsForUserTag;
                    break;
                case SysArgFor.STATUS:
                    if (iMinSleep < GlobalPool.MinSleepMsForStatus) iMinSleep = GlobalPool.MinSleepMsForStatus;
                    break;
                case SysArgFor.COMMENT:
                    if (iMinSleep < GlobalPool.MinSleepMsForComment) iMinSleep = GlobalPool.MinSleepMsForComment;
                    break;
                default:
                    if (iMinSleep < GlobalPool.MinSleepMsForUserRelation) iMinSleep = GlobalPool.MinSleepMsForUserRelation;
                    break;
            }
            AdjustRealFreq();
        }
示例#3
0
 public SinaMBCrawler(SysArgFor crawlerType)
 {
     api = GlobalPool.GetAPI(crawlerType);
 }
示例#4
0
 public SinaMBCrawler(SysArgFor crawlerType)
 {
     api = GlobalPool.GetAPI(crawlerType);
 }