There's a site: http://www.speedtrap.org/speedtraps/ste.asp?state=AK&city=all that I want to get the speed trap info off of, it is in the form of an HTML table:
<table border="1" width="100%" cellpadding="1" cellspacing="1"><br>
<tr>
<td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2
+">Jurisdiction
(city, county, etc.):</font></td>
<td width="66%" bgcolor="#FFFFFF"><font size="5" face="Arial
+"><b><font size="3">Anchorage, Alaska</font></b></font></td>
</tr>
<tr>
<td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2
+">Speed
Trap Location:</font></td>
<td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="-
+1">Minnesota Parkway</font></td>
</tr>
<tr>
<td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2
+">Nearest
Reference Point:</font></td>
<td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="-
+1">12th Avenue</font></td>
</tr>
<tr>
<td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2
+">GPS Coordinates:</font></td>
<td width="66%" bgcolor="#FFFFFF">
n/a
</td>
</tr>
<tr>
<td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2
+">Time of
Day:</font></td>
<td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="-
+1">Any time of day</font></td>
</tr>
<tr>
<td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2
+">Level
of Enforcement:</font></td>
<td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="-
+1">Some</font></td>
</tr>
<tr>
<td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2
+">Type of
Enforcement:</font></td>
<td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="-
+1">Radar</font></td>
</tr>
<tr>
<td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2
+">Date:</font></td>
<td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="-
+1">4/2004</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2">Before entering downtown on Minnesota, an of
+ficer will be waiting on 11th ave. when you come around the corner in
+to a 25mph speedlimit from a 45mph.This is the place I received my on
+ly ticket in five years and it was for 21mph over. </td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6ECF0"><a href="comments.asp?stat
+e=AK&city=all&st=20945"><font color="#2F2CFF">Click here to view the
+1 comment about this speed trap.</font></a></td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6ECF0">
<a href="comment.asp?state=AK&city=all&st=20945"><font
+ color="#2F2CFF">Agree/Disagree? Add your comment.</font></a>
</td>
</tr>
</table>
There are many records on many different pages that I want to archive. I want automate a script to put all of the records on a page into a comma delimited text file. I don't know where to start. Can someone give me some direction on this?
Thanks Adam
20041010 Janitored by Corion: Put Table HTML into CODE tags
janitored by ybiC: Balanced <readmore> tags around codeblock
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|