Exemplo n.º 1
0
        public void NewArrivalTest()
        {
            SnkrsScrapper      scraper  = new SnkrsScrapper();
            SearchSettingsBase settings = new SearchSettingsBase();

            settings.KeyWords = "nike";


            scraper.ScrapeAllProducts(out var lst, ScrappingLevel.PrimaryFields, CancellationToken.None);
            Helpers.Helper.PrintFindItemsResults(lst);
        }
Exemplo n.º 2
0
        public void FindItemsTest()
        {
            SnkrsScrapper      scraper  = new SnkrsScrapper();
            SearchSettingsBase settings = new SearchSettingsBase();

            settings.KeyWords = "nike";


            scraper.FindItems(out var lst, settings, CancellationToken.None);
            Helpers.Helper.PrintFindItemsResults(lst);
        }
Exemplo n.º 3
0
        public void GetProductDetailsTest()
        {
            Product curProduct = new Product(new SnkrsScrapper(), "Unknown",
                                             "https://www.snkrs.com/en/nike/m2k-tekno-blackoff-white-8222.html",
                                             420,
                                             "https://media.snkrs.com/43202-thickbox/m2k-tekno-blackoff-white.jpg",
                                             "id");


            SnkrsScrapper scraper = new SnkrsScrapper();

            ProductDetails details = scraper.GetProductDetails(curProduct.Url, CancellationToken.None);

            Debug.WriteLine(details.Name);
            Debug.WriteLine(details.Price);
            Debug.WriteLine(details.Currency);
            Debug.WriteLine(details.ImageUrl);
            Debug.WriteLine(details.StoreName);
            Debug.WriteLine(details.Url);

            Helper.PrintGetDetailsResult(details.SizesList);
        }