httpwebrequest response omits part of html page source

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lifeform23
    New Member
    • Jun 2015
    • 1

    httpwebrequest response omits part of html page source

    I am writing a program to take stock option data from the Yahoo Finance web site. The page returned using the pagesource function in a browser has all the data in it, but the data returned by VB.NET leaves out the data I am looking for. This used to work and then this problem cropped up.
    Any suggestions as to how to resolve this problem would be appreciated.
    Here is my code:
    Code:
    Dim Source_code As String = ""
            Try
    
                Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(web_page_URL)
                Dim response As System.Net.HttpWebResponse = request.GetResponse()
    
                Dim stream As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
    
                Net.ServicePointManager.UseNagleAlgorithm = False
    
                Source_code = stream.ReadToEnd() 'gives less content than pagesource in browser
    Last edited by Rabbit; Jun 22 '15, 10:05 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
Working...