Tool to read contents of a web page

  • Thread starter sganesh88
  • Start date
  • Tags
    Web
In summary: If you're using a web development framework such as Ruby on Rails then you might be able to use a gem or plugin to do this for you. alternatively, you could use a web scraping library such as scraper.py or BeautifulSoup.
  • #1
sganesh88
286
0
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.
 
Computer science news on Phys.org
  • #2
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
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
You can use "wget" to get the html page.
wget http://thepage.com
After that, follow the usualname's sugestions.
 
  • #6
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.
 

1. What is a "tool to read contents of a web page"?

A tool to read contents of a web page is a software or program that allows users to extract and view the information on a webpage in a structured format.

2. Why would someone need to use a tool to read contents of a web page?

There are various reasons why someone may need to use a tool to read contents of a web page. Some common reasons include data extraction for research or analysis purposes, web scraping for competitive intelligence, or accessibility purposes for individuals with visual impairments.

3. How does a tool to read contents of a web page work?

A tool to read contents of a web page uses various techniques such as HTML parsing, DOM traversal, or regular expressions to extract and organize the information from a webpage. It may also use APIs or other methods to retrieve data from the website's servers.

4. Are there any limitations to using a tool to read contents of a web page?

Yes, there can be limitations to using a tool to read contents of a web page. Some websites may have measures in place to prevent web scraping and may block or limit access to their data. Additionally, some tools may only work with certain types of websites or may not be able to handle complex web pages with dynamic content.

5. Are there any ethical concerns with using a tool to read contents of a web page?

Yes, there can be ethical concerns with using a tool to read contents of a web page. It is important to make sure that the data being extracted is done so ethically and in compliance with any terms of service or legal restrictions set by the website. Additionally, it is important to use the data responsibly and not infringe on any intellectual property rights.

Similar threads

Replies
7
Views
236
  • Programming and Computer Science
Replies
1
Views
497
  • Programming and Computer Science
Replies
15
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
22
Views
1K
  • Computing and Technology
Replies
9
Views
2K
  • Computing and Technology
Replies
10
Views
8K
  • Programming and Computer Science
Replies
5
Views
1K
  • STEM Career Guidance
Replies
15
Views
2K
  • Programming and Computer Science
Replies
1
Views
983
  • Programming and Computer Science
Replies
14
Views
2K
Back
Top