This is a syntax issue. next()
returns the value of the entity (in this case the integer duration value), and not a dictionary, so you can’t subscript it (appending ["entities"]
, for example will not work). You can remove next()
to get more values.