]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[kaltura] Add explicit port to regexes
authorSergey M․ <dstftw@gmail.com>
Thu, 9 Feb 2017 18:24:14 +0000 (01:24 +0700)
committerSergey M․ <dstftw@gmail.com>
Thu, 9 Feb 2017 18:24:14 +0000 (01:24 +0700)
They should not match e.g. cdnapi.kaltura.computernetworks.com/...

youtube_dl/extractor/kaltura.py

index c6483bcf02216e3c3ee86d10bbec82d0a6449692..54374ea7671396f5f2cf8f7fe1b2aab0b24ec78b 100644 (file)
@@ -23,7 +23,7 @@ class KalturaIE(InfoExtractor):
                 (?:
                     kaltura:(?P<partner_id>\d+):(?P<id>[0-9a-z_]+)|
                     https?://
-                        (:?(?:www|cdnapi(?:sec)?)\.)?kaltura\.com/
+                        (:?(?:www|cdnapi(?:sec)?)\.)?kaltura\.com(?::\d+)?/
                         (?:
                             (?:
                                 # flash player
@@ -98,6 +98,10 @@ class KalturaIE(InfoExtractor):
         {
             '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,
+        },
+        {
+            'url': 'https://www.kaltura.com:443/index.php/extwidget/preview/partner_id/1770401/uiconf_id/37307382/entry_id/0_58u8kme7/embed/iframe?&flashvars[streamerType]=auto',
+            'only_matching': True,
         }
     ]
 
@@ -116,7 +120,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(?::\d+)?/(?:(?!(?P=q1)).)*\b(?:p|partner_id)/(?P<partner_id>\d+)(?:(?!(?P=q1)).)*
                     (?P=q1).*?
                     (?:
                         entry_?[Ii]d|