?
Solved

Best Practice for reading HTML from website

Posted on 2011-09-17
5
Medium Priority
?
308 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 84

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 84

Accepted Solution

by:
Dave Baldwin earned 2000 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 84

Expert Comment

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

864 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