N
no one
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>Thomson Cable Modem Diagnostics</title>
<META HTTP-EQUIV="Refresh" CONTENT="5">
</head>
<body link="#FFFFFF" vlink="#FFFFFF" alink="#000000"
bgcolor="#7686B6">
<table border="0" cellpadding="0" cellspacing="0" width="500">
<tr>
<td width="134" height="58" bgcolor="#394a84"
align="center"><img src="images/thomson.gif" width="103"
height="34"></td>
<td width="506" height="58" bgcolor="#394a84"
colspan="4"><font face="Arial"
color="#ffffff"><big><big> Modem Technical Details
Status Page</big></big><br> <small> This
page will auto-refresh periodically.</small></font></td>
</tr>
<tr>
<td width="134" height="108" bgcolor="#394a84"
rowspan="4"><img src="images/space.gif" width="134"
height="9"><br> <font color="#FFFFFF"
face="Arial"><small><small> Status
Code: </small></small><br>
<small><small> Operational </small></small><br>
<small><small> Software Version:<br>
ST.23.16.50 <br> Software Model:<br>
0719 <br> Bootloader:<br>
04.01</small></small></font></td>
<td width="506" height="18" colspan="4"><img
src="images/topcorner.gif" width="506" height="9"><br>
<small><font
face="Arial"><strong>
Cable Signal Details</strong> </font></small></td>
</tr>
<tr>
<td width="18" height="90"
rowspan="3"> </td>
<td width="290" height="9" bgcolor="#FFFFFF"><img
src="images/top1.gif" width="290" height="9"></td>
<td width="180" height="9" bgcolor="#FFFFFF"><img
src="images/top2.gif" width="180" height="9"></td>
<td width="18" height="90" rowspan="3"> </td>
</tr>
<tr>
<td width="290" bgcolor="#FFFFFF"><font
face="Arial"><small><strong> Forward
Path:</strong><br>
Signal Acquired
at 729.025 MHz <br>
SNR: 36.1 dB<br>
Received Signal
Strength: -0.3 dBmV <br>
Micro-Reflections: 22 dBc <br>
Modulation: 256
QAM </small><br> <big><big> </big></big></font></td>
<td width="180" bgcolor="#FFFFFF"><font
face="Arial"><small><strong>Return Path:</strong><br>
Connection: Acquired <br>
Frequency: 37 MHz <br>
Power Level: 46.2 dBmV <br>
Channel ID: 4 <br>
Modulation: 16 QAM</small><br>
<big><big> </big></big></font></td>
</tr>
<tr>
<td width="290" height="9" bgcolor="#FFFFFF"><img
src="images/bot1.gif" width="290" height="9"></td>
<td width="180" height="9" bgcolor="#FFFFFF"><img
src="images/bot2.gif" width="180" height="9"></td>
</tr>
<tr>
<td width="134" height="18"
bgcolor="#394a84"><small><font color="#000000"
face="Arial"><small> <a href="diagnostics.htm">Back to
Diagnostics</a></small></font></small></td>
<td width="506" height="18"
colspan="4"><small><strong><font
face="Arial"> Data
Service Details</font></strong></small></td>
</tr>
<tr>
<td width="134" height="90" bgcolor="#394a84"
rowspan="3"></td>
<td width="18" height="90"
rowspan="3"> </td>
<td width="470" height="9" bgcolor="#FFFFFF"
colspan="2"><img src="images/top.gif" width="470"
height="9"></td>
<td width="18" height="90" rowspan="3"> </td>
</tr>
<tr>
<td width="470" bgcolor="#FFFFFF"
colspan="2"> <font face="Arial"><small>
Provisioned Address: Yes<br> Provisioned
Time: Yes<br> Provisioned Configuration:
Yes<br> Registered: Yes<br>
BPI: Enabled</small><br> <big>
</big></font></td>
</tr>
<tr>
<td width="470" height="9" bgcolor="#FFFFFF"
colspan="2"><img src="images/bot.gif" width="470"
height="9"></td>
</tr>
<tr>
<td width="134" height="52"><img
src="images/botcorner.gif" width="134" height="52"></td>
<td width="506" height="52" colspan="4"></td>
</tr>
</table>
</body>
</html>
=================================
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>Thomson Cable Modem Diagnostics</title>
<META HTTP-EQUIV="Refresh" CONTENT="5">
</head>
<body link="#FFFFFF" vlink="#FFFFFF" alink="#000000"
bgcolor="#7686B6">
<table border="0" cellpadding="0" cellspacing="0" width="500">
<tr>
<td width="134" height="58" bgcolor="#394a84"
align="center"><img src="images/thomson.gif" width="103"
height="34"></td>
<td width="506" height="58" bgcolor="#394a84"
colspan="4"><font face="Arial"
color="#ffffff"><big><big> Modem Technical Details
Status Page</big></big><br> <small> This
page will auto-refresh periodically.</small></font></td>
</tr>
<tr>
<td width="134" height="108" bgcolor="#394a84"
rowspan="4"><img src="images/space.gif" width="134"
height="9"><br> <font color="#FFFFFF"
face="Arial"><small><small> Status
Code: </small></small><br>
<small><small> Operational </small></small><br>
<small><small> Software Version:<br>
ST.23.16.50 <br> Software Model:<br>
0719 <br> Bootloader:<br>
04.01</small></small></font></td>
<td width="506" height="18" colspan="4"><img
src="images/topcorner.gif" width="506" height="9"><br>
<small><font
face="Arial"><strong>
Cable Signal Details</strong> </font></small></td>
</tr>
<tr>
<td width="18" height="90"
rowspan="3"> </td>
<td width="290" height="9" bgcolor="#FFFFFF"><img
src="images/top1.gif" width="290" height="9"></td>
<td width="180" height="9" bgcolor="#FFFFFF"><img
src="images/top2.gif" width="180" height="9"></td>
<td width="18" height="90" rowspan="3"> </td>
</tr>
<tr>
<td width="290" bgcolor="#FFFFFF"><font
face="Arial"><small><strong> Forward
Path:</strong><br>
Signal Acquired
at 729.025 MHz <br>
SNR: 36.1 dB<br>
Received Signal
Strength: -0.3 dBmV <br>
Micro-Reflections: 22 dBc <br>
Modulation: 256
QAM </small><br> <big><big> </big></big></font></td>
<td width="180" bgcolor="#FFFFFF"><font
face="Arial"><small><strong>Return Path:</strong><br>
Connection: Acquired <br>
Frequency: 37 MHz <br>
Power Level: 46.2 dBmV <br>
Channel ID: 4 <br>
Modulation: 16 QAM</small><br>
<big><big> </big></big></font></td>
</tr>
<tr>
<td width="290" height="9" bgcolor="#FFFFFF"><img
src="images/bot1.gif" width="290" height="9"></td>
<td width="180" height="9" bgcolor="#FFFFFF"><img
src="images/bot2.gif" width="180" height="9"></td>
</tr>
<tr>
<td width="134" height="18"
bgcolor="#394a84"><small><font color="#000000"
face="Arial"><small> <a href="diagnostics.htm">Back to
Diagnostics</a></small></font></small></td>
<td width="506" height="18"
colspan="4"><small><strong><font
face="Arial"> Data
Service Details</font></strong></small></td>
</tr>
<tr>
<td width="134" height="90" bgcolor="#394a84"
rowspan="3"></td>
<td width="18" height="90"
rowspan="3"> </td>
<td width="470" height="9" bgcolor="#FFFFFF"
colspan="2"><img src="images/top.gif" width="470"
height="9"></td>
<td width="18" height="90" rowspan="3"> </td>
</tr>
<tr>
<td width="470" bgcolor="#FFFFFF"
colspan="2"> <font face="Arial"><small>
Provisioned Address: Yes<br> Provisioned
Time: Yes<br> Provisioned Configuration:
Yes<br> Registered: Yes<br>
BPI: Enabled</small><br> <big>
</big></font></td>
</tr>
<tr>
<td width="470" height="9" bgcolor="#FFFFFF"
colspan="2"><img src="images/bot.gif" width="470"
height="9"></td>
</tr>
<tr>
<td width="134" height="52"><img
src="images/botcorner.gif" width="134" height="52"></td>
<td width="506" height="52" colspan="4"></td>
</tr>
</table>
</body>
</html>
=================================