]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/zee5.py
[youtube] Fix format sorting when using alternate clients
[yt-dlp.git] / yt_dlp / extractor / zee5.py
index 34861f0d2e4c9a9002a313757f951742d86dad0f..e12c4e59b0e65eceeec77944a62ac44706b0a2ad 100644 (file)
@@ -22,7 +22,7 @@ class Zee5IE(InfoExtractor):
                         zee5:|
                         (?:https?://)(?:www\.)?zee5\.com/(?:[^#?]+/)?
                         (?:
-                            (?:tvshows|kids)(?:/[^#/?]+){3}
+                            (?:tvshows|kids|zee5originals)(?:/[^#/?]+){3}
                             |movies/[^#/?]+
                         )/(?P<display_id>[^#/?]+)/
                      )
@@ -37,7 +37,7 @@ class Zee5IE(InfoExtractor):
             'title': 'Krishna - The Birth',
             'duration': 4368,
             'average_rating': 4,
-            'description': str,
+            'description': compat_str,
             'alt_title': 'Krishna - The Birth',
             'uploader': 'Zee Entertainment Enterprises Ltd',
             'release_date': '20060101',
@@ -58,7 +58,7 @@ class Zee5IE(InfoExtractor):
             'title': 'Episode 1 - The Test Of Bramha',
             'duration': 1336,
             'average_rating': 4,
-            'description': str,
+            'description': compat_str,
             'alt_title': 'Episode 1 - The Test Of Bramha',
             'uploader': 'Green Gold',
             'release_date': '20090101',
@@ -95,16 +95,16 @@ def _real_extract(self, url):
         m3u8_url = try_get(
             json_data,
             (lambda x: x['hls'][0], lambda x: x['video_details']['hls_url']),
-            str)
+            compat_str)
         formats = self._extract_m3u8_formats(
-            'https://zee5vodnd.akamaized.net' + m3u8_url.replace('/drm1/', '/hls1/') + token_request['video_token'],
-            video_id, fatal=False)
+            'https://zee5vodnd.akamaized.net' + m3u8_url.replace('/drm', '/hls', 1) + token_request['video_token'],
+            video_id, 'mp4', fatal=False)
         mpd_url = try_get(
             json_data,
             (lambda x: x['video'][0], lambda x: x['video_details']['url']),
-            str)
+            compat_str)
         formats += self._extract_mpd_formats(
-            'https://zee5vodnd.akamaized.net' + mpd_url + token_request['video_token'],
+            'https://zee5vod.akamaized.net' + mpd_url,
             video_id, fatal=False)
 
         self._sort_formats(formats)
@@ -136,7 +136,7 @@ class Zee5SeriesIE(InfoExtractor):
                      (?:
                         zee5:series:|
                         (?:https?://)(?:www\.)?zee5\.com/(?:[^#?]+/)?
-                        (?:tvshows|kids)(?:/[^#/?]+){2}/
+                        (?:tvshows|kids|zee5originals)(?:/[^#/?]+){2}/
                      )
                      (?P<id>[^#/?]+)/?(?:$|[?#])
                      '''