Solved

Best Practice for reading HTML from website

Posted on 2011-09-17
5
294 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Form Submit falis 6 26
Javascript to allow login/password authorization 4 31
jquery - show / hide div depending on day and time 19 31
Bad <form> statement? 9 26
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

895 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now