Tool to read contents of a web page

  • Thread starter sganesh88
  • Start date
  • #1
289
0

Main Question or Discussion Point

I need a tool which can read some specific data from a website.
Based on the data retrived i will make some calculations.
Is there a tool that can read a HTML page and retrive some values displayed in it?
The data are shown in table format in that website.
This website is probe which displays some memory usage of a server.
We take some statistics from this page and make calculations like taking average etc.
This task is now being done manually for evry 30 minutes.
We need to automate it.
 

Answers and Replies

  • #2
595
0
I'm not familiar offhand with any programs that are specifically made to do this. Usually Perl or Javascript get put into service for this kind of thing, especially since the desired data is well hidden in the actual page formatting tags. You might search for HTML parsers to see if there are any helper functions you could use.
 
  • #3
662
2
You can parse the html page using something like python. If it's a reasonably straightforward layout then you can use even simpler tools like grep, sed or awk.

Just have a look at the html page in a text editor, see if the location of the table is easy to locate (near its title for instance), then write a small script to retrieve the required values.

If you're on windows then I suppose you could use VisualBasic or even a VBA macro in Office, but it's easier in linux/unix.
 
  • #4
403
1
You can use "wget" to get the html page.
wget http://thepage.com
After that, follow the usualname's sugestions.
 
  • #6
minger
Science Advisor
1,495
2
There is a PHP function which can read the contents of a pages' HTML and put each line into an array. You could read the HTML line-by-line searching for keywords. It could all be done in PHP and use a refresh script to perform it at each interval.

There are other options as well.
 

Related Threads on Tool to read contents of a web page

  • Last Post
Replies
2
Views
1K
Replies
4
Views
2K
  • Last Post
Replies
19
Views
3K
Replies
6
Views
3K
Replies
5
Views
827
  • Last Post
Replies
20
Views
2K
  • Last Post
Replies
4
Views
2K
Replies
2
Views
5K
  • Last Post
Replies
4
Views
479
Top