|
-
Jun 19th, 2007, 12:41 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2005] Reading Web Page and Write to Text File
I've seen this done before, without a webcontrol (browser) which is handy because some of the pages get load errors, which will prevent automated downloads.
Here's what I'm trying to accomplish: For a series of web pages (several hundred, I think), download the source code for the page and store it onto a text file for later processing. This means I probably need to wait for the HTML source code to download prior to getting the next page.
Each web page can be uniquely numbered based on its URL. It can be in either HTML or (preferably) just the text from the page.
Isn't there a URLDownload function in .net? Can't seem to find it in the documentation or this forum. Help?
-
Jun 19th, 2007, 12:43 PM
#2
Re: [2005] Reading Web Page and Write to Text File
the WebClient has a DownloadString method:
VB.Net Code:
Dim wc As New Net.WebClient
Dim html As String = wc.DownloadString("www.google.com")
-
Jun 19th, 2007, 01:41 PM
#3
Thread Starter
Hyperactive Member
Re: [2005] Reading Web Page and Write to Text File
Pretty easy when ya know the secret. Thank you. I do appreciate it.
Is there a way (since that one was answered so easily) to do it with just the page's text (without the HTML?
I feel like I'm asking for the moon now, but others may want to do this too (ok, it sounded good to me!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|