Cannot get python to read a CAP file link in an ATOM feed

Brian Kaplan bkaplan1 at gmail.com
Tue Feb 10 16:44:37 EST 2009


Hi List,
I'm trying to get python to parse a CAP file in an ATOM feed from the
National Weather Service.  Here's one states ATOM feed.
http://www.weather.gov/alerts-beta/ky.php?x=0.  If you view the source
of this file, there is a reference to another web feed. For instance,
href="http://www.weather.gov/alerts-beta/wwacapget.php?x=KY20090210210200ILNNPWILNHighWindWarning20090212100000KY"
(note, this latter file changes hourly).  I can retrieve and parse the
first file but cannot get the second file read or parsed as an xml. I
am able to read it into memory using urlopen.  Can python read and
parse as an xml or do I need to read it into memory.  If it is in
memory, is there a similar parsing function.  Thanks  Brian Kaplan



More information about the Python-list mailing list