[nhk] extract rtmpt format
authorRemita Amine <remitamine@gmail.com>
Sun, 21 Apr 2019 12:25:04 +0000 (13:25 +0100)
committerRemita Amine <remitamine@gmail.com>
Sun, 21 Apr 2019 12:25:04 +0000 (13:25 +0100)
youtube_dl/extractor/nhk.py

index 727302560285b4e468a885deaec808c226af2881..241412f9849645674c5369e4a5d46a6ca0709358 100644 (file)
@@ -69,12 +69,13 @@ class NhkVodIE(InfoExtractor):
             info['formats'] = self._extract_m3u8_formats(
                 'https://nhks-vh.akamaihd.net/i%s/master.m3u8' % audio_path,
                 episode_id, 'm4a', m3u8_id='hls', fatal=False)
-            info['formats'].append({
-                'ext': 'flv',
-                'format_id': 'flv',
-                'url': 'rtmp://flv.nhk.or.jp/ondemand/mp4:flv' + audio_path,
-                'vcodec': 'none',
-            })
+            for proto in ('rtmpt', 'rtmp'):
+                info['formats'].append({
+                    'ext': 'flv',
+                    'format_id': proto,
+                    'url': '%s://flv.nhk.or.jp/ondemand/mp4:flv%s' % (proto, audio_path),
+                    'vcodec': 'none',
+                })
             for f in info['formats']:
                 f['language'] = lang
         return info