使用NOAA 休息网站上给出的示例 url:
http://graphical.weather.gov/xml/sample_products/browser_interface/ndfdXMLclient.php?listZipCodeList=20910+25414
下面的代码:
import feedparser
d = feedparser.parse('http://graphical.weather.gov/xml/sample_products/browser_interface/ndfdXMLclient.php?listZipCodeList=20910+25414')
print d
输出:
{'feed': {'dwml': {'xsi:nonamespaceschemalocation': u'http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd', 'nonamespaceschemalocation': u'http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd', 'version': u'1.0'}}, 'status': 200, 'version': u'', 'encoding': u'us-ascii', 'bozo': 0, 'headers': {'content-length': '294', 'expires': 'Wed, 10 Apr 2013 18:16:54 GMT', 'server': 'Apache/2.2.15 (Red Hat)', 'connection': 'close', 'cache-control': 'max-age=180', 'date': 'Wed, 10 Apr 2013 18:13:54 GMT', 'content-type': 'text/xml'}, 'href': u'http://graphical.weather.gov/xml/sample_products/browser_interface/ndfdXMLclient.php?listZipCodeList=20910+25414', 'namespaces': {u'xsi': u'http://www.w3.org/2001/XMLSchema-instance', u'xsd': u'http://www.w3.org/2001/XMLSchema'}, 'entries': []}
<latLonList>
失踪了。我在 xml 中看到它,为什么它不在 feedparser 字典中?