Solved

Best Practice for reading HTML from website

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

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 82

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 82

Expert Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Code enhancement 5 13
Flexbox in CSS3 2 27
HTML CSS 7 19
Using Classic ASP inside HTML pages 2 0
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

762 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

22 Experts available now in Live!

Get 1:1 Help Now