I know this has probably been answered before but I am have difficulty find exactly what I need. This is ultimately what I would like to achieve. I have a form with the Inet control added as well as a web browser. I have it load up a specific URL, then save to .html. What I would like is for it to specifically parse out the Product names as listed below.
http://krasikart.no-ip.org/parse.jpg
Just the product names. I then want to add them to a listbox for ease of copying. Can anyone help me in the right direction? This is the code I have currently.
Thanks for any help you can offer!Code:Private Sub Command1_Click() Dim URL() As Byte 'set protocol to HTTP Inet1.Protocol = icHTTP Inet1.URL = WebBrowser1.LocationURL ' Retrieve the HTML data into a byte array. URL() = Inet1.OpenURL(Inet1.URL, icByteArray) ' Create a file for the data. Open "google.htm" For Binary Access Write As #1 Put #1, , URL() urlbox.Text = WebBrowser1.LocationURL Close #1 End Sub Private Sub gotourl_Click() WebBrowser1.Navigate urlbox.Text End Sub Private Sub parse_Click() Text1.Text = WebBrowser1.Document.body.innerText List1.AddItem Text1.Text End Sub




Reply With Quote