Hi everyone,
I'm currently working on a 'windows forms' project that requires me to get some text from a website and display it within the program.
I have my public sub below, which basically reads the source code of the site in question, converts it to a string from a byte, and displays it in a multi-line textbox on the form.
Public Sub LoadSiteContent(ByVal url As String)
Dim client As New WebClient
Dim html As Byte() = client.DownloadData(url)
Dim webString As String = System.Text.Encoding.UTF8.GetString(html)
TextBox1.Text = webString
End Sub
This sub gets all the source code, whereas I only want a specific paragraph on the site, so is there a way to scale down the string I converted to just that paragraph within the page source? Maybe through using regular expressions or substrings?
I also have this import at the top of my class:
Imports System.Net
Any response is greatly appreciated, thanks.