diff options
author | Sergey M․ <dstftw@gmail.com> | 2019-10-10 00:24:03 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2019-10-10 00:24:03 +0700 |
commit | 07b50f616e407c8b7b2c183298acbb58e2ddf09b (patch) | |
tree | 895396684210c9b6ec35226a1c82991c7a18aa27 /youtube_dl | |
parent | 1907f06e7b0689840b75810e5ad2683581f83924 (diff) | |
download | youtube-dl-07b50f616e407c8b7b2c183298acbb58e2ddf09b.tar.xz |
[kaltura] Fix service URL extraction (closes #22658)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/kaltura.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/kaltura.py b/youtube_dl/extractor/kaltura.py index 1c486c038..2d38b758b 100644 --- a/youtube_dl/extractor/kaltura.py +++ b/youtube_dl/extractor/kaltura.py @@ -155,11 +155,11 @@ class KalturaIE(InfoExtractor): embed_info[k] = v.strip() url = 'kaltura:%(partner_id)s:%(id)s' % embed_info escaped_pid = re.escape(embed_info['partner_id']) - service_url = re.search( - r'<script[^>]+src=["\']((?:https?:)?//.+?)/p/%s/sp/%s00/embedIframeJs' % (escaped_pid, escaped_pid), + service_mobj = re.search( + r'<script[^>]+src=(["\'])(?P<id>(?:https?:)?//(?:(?!\1).)+)/p/%s/sp/%s00/embedIframeJs' % (escaped_pid, escaped_pid), webpage) - if service_url: - url = smuggle_url(url, {'service_url': service_url.group(1)}) + if service_mobj: + url = smuggle_url(url, {'service_url': service_mobj.group('id')}) return url def _kaltura_api_call(self, video_id, actions, service_url=None, *args, **kwargs): |