擅长:python、mysql、java
<p>您需要通过向<code>findall()</code>方法添加参数来指定命名空间。试试这个:</p>
<pre><code>import requests
import xml.etree.ElementTree as ET
r = requests.get("http://www.volcano.si.edu/news/WeeklyVolcanoRSS.xml")
tree = ET.fromstring(r.text.encode('utf-8'))
namespaces = {'georss' : 'http://www.georss.org/georss'}
for pt in tree.findall('.//georss:point', namespaces=namespaces):
print (pt.text)
</code></pre>