]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[kaltura] Add subtitles support when entry_id is unknown beforehand (Closes #10279)
authorSergey M․ <dstftw@gmail.com>
Sun, 21 Aug 2016 01:26:45 +0000 (08:26 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 21 Aug 2016 01:28:36 +0000 (08:28 +0700)
youtube_dl/extractor/kaltura.py

index 66c7b36bca1ce26295ddc836cc412106b8436b11..a8ce6dda2f55da27a80f9de7e6b0b7fc6cb8afc0 100644 (file)
@@ -196,6 +196,17 @@ class KalturaIE(InfoExtractor):
                     reference_id)['entryResult']
                 info, flavor_assets = entry_data['meta'], entry_data['contextData']['flavorAssets']
                 entry_id = info['id']
+                # Unfortunately, data returned in kalturaIframePackageData lacks
+                # captions so we will try requesting the complete data using
+                # regular approach since we now know the entry_id
+                try:
+                    _, info, flavor_assets, captions = self._get_video_info(
+                        entry_id, partner_id)
+                except ExtractorError:
+                    # Regular scenario failed but we already have everything
+                    # extracted apart from captions and can process at least
+                    # with this
+                    pass
             else:
                 raise ExtractorError('Invalid URL', expected=True)
             ks = params.get('flashvars[ks]', [None])[0]