ElementTree findall() returning empty list

The problem is that findall only searches the immediate descendants of an element if it is given a tag name. You need to give it an XPath expression that will find track anywhere in the tree beneath it. So the following should work, for example:

api_results = ElementTree.parse(response).findall('.//track')

Leave a Comment