]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/extractor/rutv.py
[rutv] Recognize live streams (#5584)
[youtube-dl.git] / youtube_dl / extractor / rutv.py
index f737b4e5fad8cd86e28b094abcb4226927083d2a..169f7c0325d3cd92791f63dbea503e312bb31e71 100644 (file)
@@ -162,10 +162,8 @@ class RUTVIE(InfoExtractor):
                         'vbr': int(quality),
                     }
                 elif transport == 'm3u8':
-                    fmt = {
-                        'url': url,
-                        'ext': 'mp4',
-                    }
+                    formats.extend(self._extract_m3u8_formats(url, video_id, 'mp4'))
+                    continue
                 else:
                     fmt = {
                         'url': url
@@ -183,12 +181,15 @@ class RUTVIE(InfoExtractor):
 
         self._sort_formats(formats)
 
+        is_live = video_type == 'live'
+
         return {
             'id': video_id,
-            'title': title,
+            'title': self._live_title(title) if is_live else title,
             'description': description,
             'thumbnail': thumbnail,
             'view_count': view_count,
             'duration': duration,
             'formats': formats,
-        }
\ No newline at end of file
+            'is_live': is_live,
+        }