Programatically opening a web page - then extracting some info from the page

I would like to create a simple windows application that will once every hour-or-so will open a web browser to a specific page, and capture and store to a variable a specific value from the page.

The value is found in the page's source as part of an image link(SRC), but not shown on the page itself.

Any suggestions to point me in the right direction?
(Specifically opening the web page programatically and the extraction of the value within the page's source)

Dale MassicottePresidentAsked:
Who is Participating?
prakash_prkConnect With a Mentor Commented:
the following function reads all the html content from the URL

if u had some name or id for your variable you can get the URL using Regual expressions.


    Public Function GetHTML(ByVal Url As String) As String
            Dim request As HttpWebRequest = DirectCast(WebRequest.Create(Url), HttpWebRequest)
            Dim response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)

            Dim htmlContentStream As New StreamReader(response.GetResponseStream())
            GetHTML = htmlContentStream.ReadToEnd()


        Catch ex As Exception
        End Try
    End Function

sara110Connect With a Mentor Commented:
I am not sure , I understand you correctly or not, but it seems that you want to open a webpage in regular time, then you could use a timer and a line process.
and then another timer kill this process when it finished its work
but it is better that you open another form and close it instead of using a web page, but I am not sure what your project is exactly
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.