Santaslittlehelper
New member
- Joined
- Dec 15, 2012
- Messages
- 2
- Programming Experience
- 3-5
How do I filter through downloaded source for particular information?
So far I have wrote a program to download a webpage's source, now I would like to search through this data and pick out particular information. In this case I would like whenever information is between <b> and </b> to be added to a list item. My code so far is below:
So far I have wrote a program to download a webpage's source, now I would like to search through this data and pick out particular information. In this case I would like whenever information is between <b> and </b> to be added to a list item. My code so far is below:
Public Class NameList Dim thread As System.Threading.Thread Dim sourcecode As String Sub GetSource() Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://www.websiteidliketouse.co.uk") Dim response As System.Net.HttpWebResponse = request.GetResponse() Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream()) sourcecode = sr.ReadToEnd() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click thread = New System.Threading.Thread(AddressOf GetSource) thread.Start() End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click End Sub End Class
Last edited by a moderator: