Solved

Best Practice for reading HTML from website

Posted on 2011-09-17
5
298 Views
Last Modified: 2012-05-12
Experts,

In my attempt to teach myself more about programming, some of my ideas include creating a Windows based app for a website.
The application I'm going through now has most of the base data and calculations and just needs basic information from the target website (server based random numbers etc)
At the moment i'm going through Google Chrome developer tools to find the element and the getting that into VS2010
'Something like
Dim ele As HtmlElementCollection
ele = .GetElementsByTagName("TABLE")

Open in new window

and then through trial and error getting the Index of the table with the information that i'm wanting.

In short...is there an easier way to:
1. Download a Website Text only without using a browser (WebBrower object or IE)
2. Get the information I want without looking through ~50 elements
3. Send a URL request to the server (http://MyWebsite.net/viewpage.php?page_id=21&pid=155561&end=IVC) without the need to load the page and immediately cancel

Any information would be very helpful

-Bromy2004
0
Comment
Question by:bromy2004
  • 3
  • 2
5 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36555691
I'm not sure I understand.  If you download from a URL, you will get the HTML page from the server.  There is nothing that will get you "Text only".  What you get is what you see in the "View Source" in your browser.
0
 
LVL 10

Author Comment

by:bromy2004
ID: 36555729
Thanks Dave, I thought there would be an option to not download the images.
Any tips for point 2 and 3?
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 36555868
The web page you download has links to the images in <img> tags but does not include them.  Browsers download them separately.  What you get is literally what you see in the "View Source", no more, no less.

Searching is normally done in a loop, going thru the available data until you find what you want.  I don't know of any other way to do it when you don't know where it is.

And I don't understand the third item.  I would let it load to make sure the process got finished on the server.
0
 
LVL 10

Author Closing Comment

by:bromy2004
ID: 36555923
Thank you
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36555941
You're welcome.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question