]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[kaltura] Improve widget ID extraction (closes #11480)
authorYen Chi Hsuan <yan12125@gmail.com>
Tue, 20 Dec 2016 10:45:52 +0000 (18:45 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Tue, 20 Dec 2016 10:45:52 +0000 (18:45 +0800)
ChangeLog
youtube_dl/extractor/generic.py
youtube_dl/extractor/kaltura.py

index 3ed5da7fed8d669ce9666d205d1f5c0dbaecf567..da0d37f80a6a848c3f5edb75a81f15a31c0a68f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+version <unreleased>
+
+Extractors
+* [kaltura] Fix wrong widget ID in some cases (#11480)
+
+
 version 2016.12.18
 
 Core
index 3949c8bf7d5f3088b076b78f321fb6657075aded..a6a5f193e54a5d36180691bcd64818b5a543b59b 100644 (file)
@@ -972,6 +972,20 @@ class GenericIE(InfoExtractor):
                 'skip_download': True,
             }
         },
+        {
+            # Kaltura embedded, some fileExt broken (#11480)
+            'url': 'http://www.cornell.edu/video/nima-arkani-hamed-standard-models-of-particle-physics',
+            'info_dict': {
+                'id': '1_sgtvehim',
+                'ext': 'mp4',
+                'title': 'Our "Standard Models" of particle physics and cosmology',
+                'description': 'md5:67ea74807b8c4fea92a6f38d6d323861',
+                'timestamp': 1321158993,
+                'upload_date': '20111113',
+                'uploader_id': 'kps1',
+            },
+            'add_ie': ['Kaltura'],
+        },
         # Eagle.Platform embed (generic URL)
         {
             'url': 'http://lenta.ru/news/2015/03/06/navalny/',
index 91bc3a0a7c0af4690cf1a16713de1e76bccaa67a..c0ddad6f9629b054f3e0064a9b3d60dc0f41dcf0 100644 (file)
@@ -107,7 +107,7 @@ class KalturaIE(InfoExtractor):
                         (?P<q1>['\"])wid(?P=q1)\s*:\s*
                         (?P<q2>['\"])_?(?P<partner_id>(?:(?!(?P=q2)).)+)(?P=q2),.*?
                         (?P<q3>['\"])entry_?[Ii]d(?P=q3)\s*:\s*
-                        (?P<q4>['\"])(?P<id>(?:(?!(?P=q4)).)+)(?P=q4),
+                        (?P<q4>['\"])(?P<id>(?:(?!(?P=q4)).)+)(?P=q4)(?:,|\s*\})
                 """, webpage) or
             re.search(
                 r'''(?xs)
@@ -266,6 +266,9 @@ class KalturaIE(InfoExtractor):
             # skip for now.
             if f.get('fileExt') == 'chun':
                 continue
+            if not f.get('fileExt') and f.get('containerFormat') == 'qt':
+                # QT indicates QuickTime; some videos have broken fileExt
+                f['fileExt'] = 'mov'
             video_url = sign_url(
                 '%s/flavorId/%s' % (data_url, f['id']))
             # audio-only has no videoCodecId (e.g. kaltura:1926081:0_c03e1b5g