예제 #1
0
 public ThinkDocumentParser(ILogger <ThinkDocumentParser> logger, IOptions <ThinkCrawlConfiguration> thinkCrawlOpt)
 {
     _logger = logger;
     _thinkCrawlConfiguration = thinkCrawlOpt.Value;
 }
예제 #2
0
 public static IServiceCollection AddThinkCrawler(this IServiceCollection services, ThinkCrawlConfiguration thinkCrawlConfiguration, CrawlConfiguration crawlConfiguration = null)
 {
     services.AddScoped(s => thinkCrawlConfiguration);
     return(services);
 }
예제 #3
0
        public ThinkWebCrawler(ILogger <WebCrawler> logger, CrawlConfiguration crawlConfiguration, IThreadManager threadManager, ICrawlDecisionMaker crawlDecisionMaker, ICrawlScheduler crawlScheduler, IPageRequester pageRequester, IDocumentParser hyperLinkParser, IRateLimiter rateLimiter, IOptions <ThinkCrawlConfiguration> thinkCrawlOpt) : base(logger, crawlConfiguration, threadManager, crawlDecisionMaker, crawlScheduler, pageRequester, hyperLinkParser, rateLimiter)
        {
            _thinkCrawlConfiguration = thinkCrawlOpt.Value;

            Check();
        }