|
|
@ -14,6 +14,7 @@ from ..utils import (
|
|
|
|
compat_urllib_request,
|
|
|
|
compat_urllib_request,
|
|
|
|
|
|
|
|
|
|
|
|
ExtractorError,
|
|
|
|
ExtractorError,
|
|
|
|
|
|
|
|
unsmuggle_url,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -121,6 +122,8 @@ class BrightcoveIE(InfoExtractor):
|
|
|
|
return None
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
def _real_extract(self, url):
|
|
|
|
|
|
|
|
url, smuggled_data = unsmuggle_url(url, {})
|
|
|
|
|
|
|
|
|
|
|
|
# Change the 'videoId' and others field to '@videoPlayer'
|
|
|
|
# Change the 'videoId' and others field to '@videoPlayer'
|
|
|
|
url = re.sub(r'(?<=[?&])(videoI(d|D)|bctid)', '%40videoPlayer', url)
|
|
|
|
url = re.sub(r'(?<=[?&])(videoI(d|D)|bctid)', '%40videoPlayer', url)
|
|
|
|
# Change bckey (used by bcove.me urls) to playerKey
|
|
|
|
# Change bckey (used by bcove.me urls) to playerKey
|
|
|
@ -131,9 +134,10 @@ class BrightcoveIE(InfoExtractor):
|
|
|
|
|
|
|
|
|
|
|
|
videoPlayer = query.get('@videoPlayer')
|
|
|
|
videoPlayer = query.get('@videoPlayer')
|
|
|
|
if videoPlayer:
|
|
|
|
if videoPlayer:
|
|
|
|
return self._get_video_info(videoPlayer[0], query_str, query,
|
|
|
|
|
|
|
|
# We set the original url as the default 'Referer' header
|
|
|
|
# We set the original url as the default 'Referer' header
|
|
|
|
referer=url)
|
|
|
|
referer = smuggled_data.get('Referer', url)
|
|
|
|
|
|
|
|
return self._get_video_info(
|
|
|
|
|
|
|
|
videoPlayer[0], query_str, query, referer=referer)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
player_key = query['playerKey']
|
|
|
|
player_key = query['playerKey']
|
|
|
|
return self._get_playlist_info(player_key[0])
|
|
|
|
return self._get_playlist_info(player_key[0])
|
|
|
|