]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/extractor/nova.py
[nova:embed] Fix extraction (closes #23672)
[youtube-dl.git] / youtube_dl / extractor / nova.py
index 80186ec50cef0e580e1e07104006f8e3f89fa799..aefd8eab150fe81b4a3febcdaf0c0c94d0529b23 100644 (file)
@@ -35,7 +35,7 @@ class NovaEmbedIE(InfoExtractor):
 
         bitrates = self._parse_json(
             self._search_regex(
-                r'(?s)bitrates\s*=\s*({.+?})\s*;', webpage, 'formats'),
+                r'(?s)(?:src|bitrates)\s*=\s*({.+?})\s*;', webpage, 'formats'),
             video_id, transform_source=js_to_json)
 
         QUALITIES = ('lq', 'mq', 'hq', 'hd')
@@ -43,6 +43,13 @@ class NovaEmbedIE(InfoExtractor):
 
         formats = []
         for format_id, format_list in bitrates.items():
+            if format_id == 'hls':
+                m3u8_url = url_or_none(format_list)
+                if not m3u8_url:
+                    continue
+                formats.extend(self._extract_m3u8_formats(
+                    m3u8_url, video_id, ext='mp4', m3u8_id='hls', fatal=False))
+
             if not isinstance(format_list, list):
                 continue
             for format_url in format_list: