예제 #1
0
        public void NewArrivalTest()
        {
            SneakersnstuffScrapper scraper  = new SneakersnstuffScrapper();
            SearchSettingsBase     settings = new SearchSettingsBase();

            settings.KeyWords = "nike";


            scraper.ScrapeAllProducts(out var lst, ScrappingLevel.PrimaryFields, CancellationToken.None);
            Helpers.Helper.PrintFindItemsResults(lst);
        }
예제 #2
0
        public void FindItemsTest()
        {
            SneakersnstuffScrapper scraper  = new SneakersnstuffScrapper();
            SearchSettingsBase     settings = new SearchSettingsBase();

            //settings.KeyWords = "nike";


            scraper.FindItems(out var lst, settings, CancellationToken.None);
            Helpers.Helper.PrintFindItemsResults(lst);
        }
예제 #3
0
        public void GetProductDetailsTest()
        {
            Product curProduct = new Product(new SneakersnstuffScrapper(), "Unknown",
                                             "https://www.sneakersnstuff.com/en/product/30856/nike-air-safari-se",
                                             420,
                                             "https://www.sneakersnstuff.com/images/205337/large.jpg",
                                             "id");


            SneakersnstuffScrapper scraper = new SneakersnstuffScrapper();

            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);
        }