DColin
asked on
Reading HTML using System.IO.StreamReader
Hi Experts,
I am reading into my application many pages of HTML so that I can retrieve (scrape) data from them. My problem is that the data I require lies a thousand lines of HTML into the page. Having to read through these unwanted lines of code each time a data scrape is made is slowing things down. Is it possible to make an HTML page request of the server starting at line 1000 for example?
I am reading into my application many pages of HTML so that I can retrieve (scrape) data from them. My problem is that the data I require lies a thousand lines of HTML into the page. Having to read through these unwanted lines of code each time a data scrape is made is slowing things down. Is it possible to make an HTML page request of the server starting at line 1000 for example?
ASKER
Hi wmestrom:
Do you know how I can use your answer with my existing code? Thanks.
Do you know how I can use your answer with my existing code? Thanks.
Dim MyRequest As System.Net.HttpWebRequest
Dim MyResponse As System.Net.HttpWebResponse
Dim MyStream As System.IO.StreamReader
MyRequest = System.Net.WebRequest.Create("http://www.abc.com")
MyResponse = MyRequest.GetResponse()
MyStream = New System.IO.StreamReader(MyResponse.GetResponseStream())
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
GET /somepage HTTP/1.1
Host: www.xyz.org
Range: bytes=123456-
Accept: *.*, */*
Hope this will work for you.
Greets
Willem