[ted] Fix hls audio/video-only formats
[youtube-dl] / youtube_dl / extractor / ted.py
index 2c8acfef6a95af6c4ee69574a79c50133cbb83fb..c788feb5dab8d2fd36941612966f89f63e76c22e 100644 (file)
@@ -10,6 +10,7 @@ from ..utils import int_or_none
 
 
 class TEDIE(InfoExtractor):
+    IE_NAME = 'ted'
     _VALID_URL = r'''(?x)
         (?P<proto>https?://)
         (?P<type>www|embed(?:-ssl)?)(?P<urlmain>\.ted\.com/
@@ -197,7 +198,10 @@ class TEDIE(InfoExtractor):
                 hls_formats = self._extract_m3u8_formats(
                     resources.get('stream'), video_name, 'mp4', m3u8_id=format_id)
                 for f in hls_formats:
-                    f['acodec'] = 'none'
+                    if not f.get('height'):
+                        f['vcodec'] = 'none'
+                    else:
+                        f['acodec'] = 'none'
                 formats.extend(hls_formats)
 
         audio_download = talk_info.get('audioDownload')