예제 #1
0
        public StorageCache(ISpider spider)
        {
            _pipeline = BaseEntityDbPipeline.GetPipelineFromAppConfig() as BaseEntityDbPipeline;

            if (_pipeline == null)
            {
                throw new SpiderException("Can not get StorageCache's pipeline.");
            }
            _pipeline.AddEntity(EntityDefine.Parse <CrawlCache>());
            _pipeline.InitPipeline(spider);

            _spider = spider;
        }
예제 #2
0
 protected override IPipeline GetDefaultPipeline()
 {
     return(BaseEntityDbPipeline.GetPipelineFromAppConfig());
 }