Jump to content
  • Advertisement
Sign in to follow this  
Funkymunky

grab an html table off a webbrowser

This topic is 3822 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

One of my joys at work is to develop tools to automate my own tasks and henceforth enhance my own productivity. One such automation task I'd like to do involves grabbing a table from an html document. I'm fairly well versed in the windows API methods of manipulating another program, and while I feel like I could programmatically control the buttons/edit boxes/text labels of a web browser (the stuff at the top), I wouldn't know how to grab the table in its webpage section. The table is larger than the screen, so you have to scroll through to read it all. suggestions?

Share this post


Link to post
Share on other sites
Advertisement
If the web browser is IE, you should be able to do this pretty easily. If you have a handle to the window, you can get a pointer to an IHTMLDocument2 object from it. You then have full DOM access to the webpage and can do whatever you want with it. We do something very similar in one of our apps, except that instead of targeting IE itself, we target the instances of IE that Outlook uses to display its email messages.

Have a look at this KB article: http://support.microsoft.com/kb/q249232/.

Share this post


Link to post
Share on other sites
You can just write your own client to request the webpage. I know how to do this through Python, but Ruby and Perl should be very viable options as well. Once you have the webpage data, then it’s a matter of parsing it as necessary and extracting the relevant content out of it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!