By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,140 Members | 1,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,140 IT Pros & Developers. It's quick & easy.

httpwebrequest response omits part of html page source

P: 1
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:
Expand|Select|Wrap|Line Numbers
  1. Dim Source_code As String = ""
  2.         Try
  4.             Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(web_page_URL)
  5.             Dim response As System.Net.HttpWebResponse = request.GetResponse()
  7.             Dim stream As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
  9.             Net.ServicePointManager.UseNagleAlgorithm = False
  11.             Source_code = stream.ReadToEnd() 'gives less content than pagesource in browser
Jun 22 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.