Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

VS 2010 How do I filter through downloaded source for particular information?

$
0
0
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:

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

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>