private void Billie_Click(object sender, EventArgs e) { url = "http://www.billiegoatsoap.com.au/products/"; const string klass = "product-tile-image"; if (productCrawler == null) productCrawler = new BillieGoatSoap(this.Path, klass); toggleStatusOfButton1(); }
private void GetInformation_Click(object sender, EventArgs e) { url = "http://www.kadac.com.au/browser/"; const string klass = "product-item"; if (productCrawler == null) productCrawler = new Boody(this.Path, klass); toggleStatusOfButton1(); }
private void button1_Click(object sender, EventArgs e) { lblInfo.Text = "Crawling..."; var links = new List<string>(); //links.Add("http://www.kadac.com.au/browser/product.php?sku=461225"); foreach (var category in productCrawler.Categories) { links.AddRange(productCrawler.GetProductLinks(url + category).Where(l => !links.Contains(l))); } // links.AddRange(getLinks()); string filename = tbBasePath.Text + tbFilename.Text; if (!string.IsNullOrEmpty(filename)) { var data = new List<Product>(); foreach (var link in links) { var product = productCrawler.GetProductDetails(link); data.Add(product); } exporter.Export<Product>(filename, data); } lblInfo.Text = "Finished!"; productCrawler.Dispose(); productCrawler = null; toggleStatusOfButton1(); }
private void sukin_Click(object sender, EventArgs e) { url = "http://sukinorganics.com/collections/"; const string klass = "product-item"; if (productCrawler == null) productCrawler = new Sukin(this.Path, klass); toggleStatusOfButton1(); }