Web site

  • Thread starter Thread starter Lance Geeck
  • Start date Start date
L

Lance Geeck

Is there an example someplace of how I can turn a web site into a string of text so I can parse it?

I am trying to extract a returned value from an existing website that I have no control over. Specifically http://www.ffiec.gov/ratespread/default.aspx

I am trying to pull the rate spread field.

Thanks
Lance
 
Check out this article:
http://www.devcity.net/net/article.aspx?alias=screen_scrape
Not too long ago, if you wanted some particular information off of a particular web site, you'd have to snake the HTML off a page and incorporate it into yours. Whether you did that manually via cut and paste or with a homegrown process was up to you - usually it involved some pain and misery to get it right.

Even today, as we teeter on the 'new age' of web services, we still have problems getting what we want from our favorite web pages - maybe we need some information that isn't exposed via a web service, and until the Frito chomping, Jolt drinking programmer that wrote the page shuts off 'Star Trek', gets up off the sofa and writes a web service, we'll have to do their job for them.

The idea of screen scraping isn't new, in fact, many unsavory types use some sort of screen scraping to retrieve email addresses and harvest images from unsuspecting sites. Actually, this is common practice on the web - one that is nefarious and ill received by most of the Internet community.

No, I'm not going to show you how to screen scrape email addresses off of pages, so don't ask me - instead, we'll do a little constructive scraping in order to put more content out on the web.


--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Lance Geeck" <[email protected]> schreef in bericht Is there an example someplace of how I can turn a web site into a string of text so I can parse it?

I am trying to extract a returned value from an existing website that I have no control over. Specifically http://www.ffiec.gov/ratespread/default.aspx

I am trying to pull the rate spread field.

Thanks
Lance
 
* "Lance Geeck said:
Is there an example someplace of how I can turn a web site into a string of text so I can parse it?

\\\
Import System.IO
Import System.Net

..
..
..

Public Function LoadTextFile(ByVal Url As String) As String
Dim wrq As WebRequest = WebRequest.Create(Url)
Dim wrp As HttpWebResponse = _
DirectCast(wrq.GetResponse(), HttpWebResponse)
Dim sr As StreamReader = _
New StreamReader(wrp.GetResponseStream)
Dim Text As String = sr.ReadToEnd()
sr.Close()
wrp.Close()
Return Text
End Function
///
 
Back
Top