diff options
author | Remita Amine <remitamine@gmail.com> | 2017-02-09 16:24:54 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2017-02-09 16:24:54 +0100 |
commit | 37084f6641c07dbe6580b366f330eb4126d18bbe (patch) | |
tree | 65ba76cfb167eddc4cb0d6202fd0d010cb795f41 /youtube_dl/extractor/kaltura.py | |
parent | b04975733c02f3bc0043c02d170bd3a042c67b89 (diff) |
[kaltura] improve embed partner id extraction(fixes #12041)
Diffstat (limited to 'youtube_dl/extractor/kaltura.py')
-rw-r--r-- | youtube_dl/extractor/kaltura.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/youtube_dl/extractor/kaltura.py b/youtube_dl/extractor/kaltura.py index 5ef382f9f..c6483bcf0 100644 --- a/youtube_dl/extractor/kaltura.py +++ b/youtube_dl/extractor/kaltura.py @@ -27,7 +27,7 @@ class KalturaIE(InfoExtractor): (?: (?: # flash player - index\.php/kwidget| + index\.php/(?:kwidget|extwidget/preview)| # html5 player html5/html5lib/[^/]+/mwEmbedFrame\.php ) @@ -94,6 +94,10 @@ class KalturaIE(InfoExtractor): 'params': { 'skip_download': True, }, + }, + { + 'url': 'https://www.kaltura.com/index.php/extwidget/preview/partner_id/1770401/uiconf_id/37307382/entry_id/0_58u8kme7/embed/iframe?&flashvars[streamerType]=auto', + 'only_matching': True, } ] @@ -112,7 +116,7 @@ class KalturaIE(InfoExtractor): re.search( r'''(?xs) (?P<q1>["\']) - (?:https?:)?//cdnapi(?:sec)?\.kaltura\.com/(?:(?!(?P=q1)).)*(?:p|partner_id)/(?P<partner_id>\d+)(?:(?!(?P=q1)).)* + (?:https?:)?//cdnapi(?:sec)?\.kaltura\.com(?:(?!(?P=q1)).)*/(?:p|partner_id)/(?P<partner_id>\d+)(?:(?!(?P=q1)).)* (?P=q1).*? (?: entry_?[Ii]d| @@ -209,6 +213,8 @@ class KalturaIE(InfoExtractor): partner_id = params['wid'][0][1:] elif 'p' in params: partner_id = params['p'][0] + elif 'partner_id' in params: + partner_id = params['partner_id'][0] else: raise ExtractorError('Invalid URL', expected=True) if 'entry_id' in params: |