[Tutor] How to?
Robin B. Lake
rbl@hal.cwru.edu
Wed, 17 May 2000 12:03:59 -0400 (EDT)
I've RTFM, but can't quite see how to do this in Python. Could do it
in UNIX sed, but can't get the Python twist to it yet.
I have a file of HTML, with lines like:
<TR ALIGN=left VALIGN=top><TD><A HREF="RMP_DTL$FAC.QueryView?P_FACILITY_ID=14206">14206</A><TD>1000 0015 0034<TD>ALASKA NITROGEN PRODUCS LLC<TD>KENAI<TD>AK<TD>25-JUN-1999
I want to extract the value following the FACILITY_ID= section of the string,
that is 14206 for this line. I'll then use that to create a
urllib.openurl command with params = urllib.urlencode({'P_FACILITY_ID':that-value})
and get the next lower level of information.
Thanks for any help or suggestions.
Cheers,
Rob Lake
rbl@hal.cwru.edu