Exemple #1
0
        public BaseLinksScrapper(WebScrapperBaseSiteEntity requestScrapperSettings,
                                 BaseLogger logger,
                                 AkeneoBaseWriter akeneo,
                                 IBaseShopifyProcessor shopifyProcessor)
        {
            Akeneo = akeneo;
            Akeneo.OnProductListeningFinished += OnServiceCallback;

            Shopify = shopifyProcessor;
            Shopify.OnShopifyIndexationFinished += OnServiceCallback;

            Services = new List <IBaseService>();
            Services.Add(Shopify);
            Services.Add(Akeneo);

            ValidationService = new WebScrapperLinksValidator();

            InstanceStatus = WebScrapperBaseStatuses.InstanceNotLaunched;

            _l = logger;
            requestScrappingSite = requestScrapperSettings;

            LinksPool         = new List <string>();
            IndexedLinks      = new List <string>();
            TurnableLinksList = new List <string>();
            InvokeOnInstanceStatusUpdating(WebScrapperBaseStatuses.InstanceLaunching);
        }
        public ShopifyLinksScrapper(WebScrapperBaseSiteEntity requestScrapperSettings,
                                    BaseLogger logger,
                                    AkeneoBaseWriter akeneo,
                                    IBaseShopifyProcessor shopifyProcessor,
                                    IBaseProxyService ps,
                                    ShareAsaleService _s)
        {
            _ps = ps;
            _ps.OnProxyCallback += OnProxyServiceCallback;

            ShareSale = _s;

            Services             = new List <IBaseService>();
            requestScrappingSite = requestScrapperSettings;
            _l      = logger;
            _writer = new FilesWriter();

            Akeneo = akeneo;
            Akeneo.OnProductListeningFinished += OnServiceCallback;

            Shopify = shopifyProcessor;
            Shopify.OnShopifyIndexationFinished += OnServiceCallback;

            InstanceStatus = WebScrapperBaseStatuses.InstanceNotLaunched;

            Services.Add(shopifyProcessor);
            Services.Add(akeneo);

            GenerateSitemapFileName();

            linksPool = new List <string>();
            InvokeOnInstanceStatusUpdating(WebScrapperBaseStatuses.InstanceLaunching);
        }