473,569 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Noob Question about html


Hi,

I want to write a pearl script that will go out to a web
site and download the page. Then pull certain value pairs
out of it. Basically I want to see graphs of snr etc.

Is grabbing the html possible in perl? I know the parsing
is. Basically I want to see if any of the values change and
it corresponds to cable outages.
example web page to parse
=============== =============== ===
<html>
<head>
<title>Thomso n Cable Modem Diagnostics</title>
<META HTTP-EQUIV="Refresh" CONTENT="5">
</head>
<body link="#FFFFFF" vlink="#FFFFFF" alink="#000000"
bgcolor="#7686B 6">

<table border="0" cellpadding="0" cellspacing="0" width="500">
<tr>
<td width="134" height="58" bgcolor="#394a8 4"
align="center"> <img src="images/thomson.gif" width="103"
height="34"></td>
<td width="506" height="58" bgcolor="#394a8 4"
colspan="4"><fo nt face="Arial"
color="#ffffff" ><big><big>&nbs p; Modem Technical Details
Status Page</big></big><br> <small>&nbsp;&n bsp;&nbsp; This
page will auto-refresh periodically.</small></font></td>
</tr>
<tr>
<td width="134" height="108" bgcolor="#394a8 4"
rowspan="4"><im g src="images/space.gif" width="134"
height="9"><br> <font color="#FFFFFF"
face="Arial"><s mall><small>&nb sp; Status
Code:&nbsp;&nbs p;</small></small><br>
<small><small>& nbsp;&nbsp;Oper ational </small></small><br>
<small><small>& nbsp; Software Version:<br> &nbsp;&nbsp;
ST.23.16.50 <br> &nbsp; Software Model:<br> &nbsp;&nbsp;
0719 <br> &nbsp; Bootloader:<br> &nbsp;&nbsp;
04.01</small></small></font></td>
<td width="506" height="18" colspan="4"><im g
src="images/topcorner.gif" width="506" height="9"><br>
<small><font
face="Arial"><s trong>&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;
Cable Signal Details</strong> </font></small></td>
</tr>
<tr>
<td width="18" height="90"
rowspan="3">&nb sp;&nbsp;&nbsp; </td>
<td width="290" height="9" bgcolor="#FFFFF F"><img
src="images/top1.gif" width="290" height="9"></td>
<td width="180" height="9" bgcolor="#FFFFF F"><img
src="images/top2.gif" width="180" height="9"></td>
<td width="18" height="90" rowspan="3">&nb sp; </td>
</tr>
<tr>
<td width="290" bgcolor="#FFFFF F"><font
face="Arial"><s mall><strong>&n bsp;&nbsp; Forward
Path:</strong><br>
&nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp; Signal Acquired
at 729.025 MHz <br>
&nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp; SNR: 36.1 dB<br>
&nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp; Received Signal
Strength: -0.3 dBmV <br>
&nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;
Micro-Reflections: 22 dBc <br>
&nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp; Modulation: 256
QAM </small><br> <big><big>&nbsp ; </big></big></font></td>
<td width="180" bgcolor="#FFFFF F"><font
face="Arial"><s mall><strong>Re turn Path:</strong><br>
&nbsp;&nbsp;&nb sp;&nbsp; Connection: Acquired <br>
&nbsp;&nbsp;&nb sp;&nbsp; Frequency: 37 MHz <br>
&nbsp;&nbsp;&nb sp;&nbsp; Power Level: 46.2 dBmV <br>
&nbsp;&nbsp;&nb sp;&nbsp; Channel ID: 4 <br>
&nbsp;&nbsp;&nb sp;&nbsp; Modulation: 16 QAM</small><br>
<big><big>&nbsp ; </big></big></font></td>
</tr>
<tr>
<td width="290" height="9" bgcolor="#FFFFF F"><img
src="images/bot1.gif" width="290" height="9"></td>
<td width="180" height="9" bgcolor="#FFFFF F"><img
src="images/bot2.gif" width="180" height="9"></td>
</tr>
<tr>
<td width="134" height="18"
bgcolor="#394a8 4"><small><f ont color="#000000"
face="Arial"><s mall>&nbsp; <a href="diagnosti cs.htm">Back to
Diagnostics</a></small></font></small></td>
<td width="506" height="18"
colspan="4"><sm all><strong><fo nt
face="Arial">&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp; Data
Service Details</font></strong></small></td>
</tr>
<tr>
<td width="134" height="90" bgcolor="#394a8 4"
rowspan="3"></td>
<td width="18" height="90"
rowspan="3">&nb sp;&nbsp;&nbsp; </td>
<td width="470" height="9" bgcolor="#FFFFF F"
colspan="2"><im g src="images/top.gif" width="470"
height="9"></td>
<td width="18" height="90" rowspan="3">&nb sp; </td>
</tr>
<tr>
<td width="470" bgcolor="#FFFFF F"
colspan="2">&nb sp;&nbsp;<font face="Arial"><s mall>&nbsp;
Provisioned Address: Yes<br> &nbsp;&nbsp;&nb sp; Provisioned
Time: Yes<br> &nbsp;&nbsp;&nb sp; Provisioned Configuration:
Yes<br> &nbsp;&nbsp;&nb sp; Registered: Yes<br>
&nbsp;&nbsp;&nb sp; BPI: Enabled</small><br> <big>&nbsp;
</big></font></td>
</tr>
<tr>
<td width="470" height="9" bgcolor="#FFFFF F"
colspan="2"><im g src="images/bot.gif" width="470"
height="9"></td>
</tr>
<tr>
<td width="134" height="52"><im g
src="images/botcorner.gif" width="134" height="52"></td>
<td width="506" height="52" colspan="4"></td>
</tr>

</table>
</body>
</html>

=============== =============== ===
Jun 8 '06 #1
2 3532
In article <0t************ *************** ***@comcast.com >, no one
<no****@NoWhere .Com> wrote:
Hi,

I want to write a pearl script that will go out to a web
site and download the page. Then pull certain value pairs
out of it. Basically I want to see graphs of snr etc.

Is grabbing the html possible in perl? I know the parsing
is. Basically I want to see if any of the values change and
it corresponds to cable outages.


See the Perl FAQ entries "How do I fetch an HTML file?" and "How do I
remove HTML from a string?".

If you have Perl installed:

perldoc -q HTML

FYI: this newsgroup is defunct; use comp.lang.perl. misc in the future.
Jun 9 '06 #2
no one wrote:
Is grabbing the html possible in perl?
You could do it exactly the way it is described in the FAQ:
"How do I fetch an HTML file?"
I know the parsing is.


True, but I hope you intend to do it the right way and not by using some
"smart" use of REs? See FAQ
"How do I remove HTML from a string?"
for a few examples of why contrary to popular believe parsing HTML is not
trivial.

jue
Jun 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
2114
by: dogu | last post by:
I'm missing something and need a push in the right direction. If I create a php file with the following content, and call it via a browser, it works as expected. <?php echo "hello world"; ?> If I embed the same thing in a simple HTML file, I get nothing. <html> <body>
7
2304
by: CJM | last post by:
I'm finally taking my first few steps with ASP.NET, and I'm just workign my way through some of the basics. As a vehicle for my learning, I'm re-writing a simple report page for on of my ASP applications. I have two tables on this page. One is where the user requests a report for a given ID number, the second is the table of result....
2
984
by: ToChina | last post by:
Hi, I have a simple web page which has a file upload section, where the user can select a file, hit the upload button, and then view details about the file, which appear underneath the upload section. The information about the file will be returned as XHTML, therefore I want a control on the web form which is just a container for HTML so...
2
1361
by: Nonee | last post by:
Hello- I am writing a program that loads a tv guide listing into a control. I looked at the datagridview control but it doesn't seem to have the ability to overlap columns. Basically, I would like a control to list the tv channel on the left side, the time at each half hour at the top of each column, and then of course all of the listing...
2
2844
by: Link360 | last post by:
Im a complete noob and im proud of it. I am excited in learning everything about the C++ language. Right now im trying to make tic-tac-toe. Go ahead laugh. here is what i have so far #include<iostream> #include<stdlib.h> using namespace std; int main() {int h,h2,tmp; h=10;
3
1623
by: Mr. Roper | last post by:
I'm pretty weak when it comes to Java script, hopefully someone will take mercy on my sole and explain this to me. How come on the following HTML page, when I have my first script tag commented out, my button calls my OnClick function. However if I uncomment the first script tag, I get the following error: Button1_onclick is not defined ...
2
1923
by: Carnell, James E | last post by:
I am thinking about purchasing a book, but wanted to make sure I could get through the code that implements what the book is about (Artificial Intelligence a Modern Approach). Anyway, I'm not a very good programmer and OOP is still sinking in, so please don't answer my questions like I really know anything. MY QUESTION: What is a slot? In...
2
1035
by: kj | last post by:
I'm a Python noob, and haven't yet figured out my way around the Python documentation. For example, suppose I learn about some great module foo.bar.baz, and when I run the python interpreter and type "import foo.bar.baz", lo and behold, it is already installed on our system, which means that (knowing that our system is pretty bare-bones as...
1
2520
by: Fluffy654 | last post by:
First off I am a complete noob when it comes to doing anything with servers. I'm just beginning to learn today because I need to start adding SSI to my websites. I apologise in advance if I am making a really obvious mistake. To test this, I have successfully installed apache and have read the official documentation on how to get SSI...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.