[afreecatv] Fix extraction (closes #15755)
[youtube-dl] / youtube_dl / extractor / afreecatv.py
index 148a0999c1e60431a7f933c15ce1645f804ffb42..fe499a35a5a2376adec605e19a73e7d072d15510 100644 (file)
@@ -200,7 +200,7 @@ class AfreecaTVIE(InfoExtractor):
             raise ExtractorError(
                 '%s said: %s' % (self.IE_NAME, flag), expected=True)
 
-        video_element = video_xml.findall(compat_xpath('./track/video'))[1]
+        video_element = video_xml.findall(compat_xpath('./track/video'))[-1]
         if video_element is None or video_element.text is None:
             raise ExtractorError('Specified AfreecaTV video does not exist',
                                  expected=True)