summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Rowlands <peter@pmrowla.com>2016-05-08 10:33:17 +0900
committerPeter Rowlands <peter@pmrowla.com>2016-05-08 10:33:17 +0900
commit93fdb1417766015ddadcd13a709cdfae4de5e246 (patch)
treed01c9f9d30007993fb6b5409410e388871d12156
parent370d4eb8ad3d9d092fc5eb116509eaf4a3e83177 (diff)
downloadyoutube-dl-93fdb1417766015ddadcd13a709cdfae4de5e246.tar.gz
youtube-dl-93fdb1417766015ddadcd13a709cdfae4de5e246.tar.xz
youtube-dl-93fdb1417766015ddadcd13a709cdfae4de5e246.zip
don't use selection by attribute
-rw-r--r--youtube_dl/extractor/afreecatv.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/afreecatv.py b/youtube_dl/extractor/afreecatv.py
index 527386be3..0fcbea0d1 100644
--- a/youtube_dl/extractor/afreecatv.py
+++ b/youtube_dl/extractor/afreecatv.py
@@ -95,8 +95,10 @@ class AfreecaTVIE(InfoExtractor):
         thumbnail = xpath_text(video_xml, './track/titleImage', 'thumbnail')
 
         entries = []
-        for i, video_file in enumerate(video_xml.findall('./track/video/file[@key]')):
-            video_key = self.parse_video_key(video_file.get('key'))
+        for i, video_file in enumerate(video_xml.findall('./track/video/file')):
+            video_key = self.parse_video_key(video_file.get('key', ''))
+            if not video_key:
+                continue
             entries.append({
                 'id': '%s_%s' % (video_id, video_key.get('part', i + 1)),
                 'title': title,