Another alternative is to use self.youtube_streams = xmltree.get('youtube', '') in line 73.