473,503 Members | 1,638 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>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>&nbsp; Modem Technical Details
Status Page</big></big><br> <small>&nbsp;&nbsp;&nbsp; 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>&nbsp; Status
Code:&nbsp;&nbsp;</small></small><br>
<small><small>&nbsp;&nbsp;Operational </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"><img
src="images/topcorner.gif" width="506" height="9"><br>
<small><font
face="Arial"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;
Cable Signal Details</strong> </font></small></td>
</tr>
<tr>
<td width="18" height="90"
rowspan="3">&nbsp;&nbsp;&nbsp; </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">&nbsp; </td>
</tr>
<tr>
<td width="290" bgcolor="#FFFFFF"><font
face="Arial"><small><strong>&nbsp;&nbsp; Forward
Path:</strong><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Signal Acquired
at 729.025 MHz <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SNR: 36.1 dB<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Received Signal
Strength: -0.3 dBmV <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Micro-Reflections: 22 dBc <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Modulation: 256
QAM </small><br> <big><big>&nbsp; </big></big></font></td>
<td width="180" bgcolor="#FFFFFF"><font
face="Arial"><small><strong>Return Path:</strong><br>
&nbsp;&nbsp;&nbsp;&nbsp; Connection: Acquired <br>
&nbsp;&nbsp;&nbsp;&nbsp; Frequency: 37 MHz <br>
&nbsp;&nbsp;&nbsp;&nbsp; Power Level: 46.2 dBmV <br>
&nbsp;&nbsp;&nbsp;&nbsp; Channel ID: 4 <br>
&nbsp;&nbsp;&nbsp;&nbsp; Modulation: 16 QAM</small><br>
<big><big>&nbsp; </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>&nbsp; <a href="diagnostics.htm">Back to
Diagnostics</a></small></font></small></td>
<td width="506" height="18"
colspan="4"><small><strong><font
face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp; </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">&nbsp; </td>
</tr>
<tr>
<td width="470" bgcolor="#FFFFFF"
colspan="2">&nbsp;&nbsp;<font face="Arial"><small>&nbsp;
Provisioned Address: Yes<br> &nbsp;&nbsp;&nbsp; Provisioned
Time: Yes<br> &nbsp;&nbsp;&nbsp; Provisioned Configuration:
Yes<br> &nbsp;&nbsp;&nbsp; Registered: Yes<br>
&nbsp;&nbsp;&nbsp; BPI: Enabled</small><br> <big>&nbsp;
</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>

=================================
Jun 8 '06 #1
2 3530
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
2106
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"; ?> ...
7
2299
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...
2
980
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...
2
1354
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...
2
2834
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 ...
3
1615
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...
2
1913
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...
2
1031
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...
1
2510
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...
0
7086
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...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
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...
0
7462
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
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 ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
382
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.