[generic] Improve kaltura embed detection (2)
authorSergey M․ <dstftw@gmail.com>
Mon, 9 Nov 2015 14:49:42 +0000 (20:49 +0600)
committerSergey M․ <dstftw@gmail.com>
Mon, 9 Nov 2015 14:49:42 +0000 (20:49 +0600)
youtube_dl/extractor/generic.py

index 5f61ab26fe1a550c84081aec82f7f33d7e98dfa7..d0b486d2a03a5e1dcd0ae0f0703246907d1550a6 100644 (file)
@@ -1672,7 +1672,7 @@ class GenericIE(InfoExtractor):
             return self.url_result(mobj.group('url'), 'Zapiks')
 
         # Look for Kaltura embeds
-        mobj = (re.search(r"(?s)kWidget\.(?:thumb)?[Ee]mbed\(\{.*?'wid'\s*:\s*'_?(?P<partner_id>[^']+)',.*?'entry_id'\s*:\s*'(?P<id>[^']+)',", webpage) or
+        mobj = (re.search(r"(?s)kWidget\.(?:thumb)?[Ee]mbed\(\{.*?'wid'\s*:\s*'_?(?P<partner_id>[^']+)',.*?'entry_?[Ii]d'\s*:\s*'(?P<id>[^']+)',", webpage) or
                 re.search(r'(?s)(?P<q1>["\'])(?:https?:)?//cdnapi(?:sec)?\.kaltura\.com/.*?(?:p|partner_id)/(?P<partner_id>\d+).*?(?P=q1).*?entry_?[Ii]d\s*:\s*(?P<q2>["\'])(?P<id>.+?)(?P=q2)', webpage))
         if mobj is not None:
             return self.url_result('kaltura:%(partner_id)s:%(id)s' % mobj.groupdict(), 'Kaltura')