1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 17:22:31 +01:00

[brightcove] Support redirected urls from bcove.me (fixes #1732)

'bctid' needs to be changed to '@videoPlayer', and 'bckey' to 'playerKey'.
This commit is contained in:
Jaime Marquínez Ferrándiz 2013-11-06 22:03:00 +01:00
parent 4f045eef8f
commit 51040b72ed

View File

@ -97,8 +97,10 @@ def _extract_brightcove_url(cls, webpage):
return None
def _real_extract(self, url):
# Change the 'videoId' or 'videoID' field to '@videoPlayer'
url = re.sub(r'(?<=[?&])videoI(d|D)', '%40videoPlayer', url)
# Change the 'videoId' and others field to '@videoPlayer'
url = re.sub(r'(?<=[?&])(videoI(d|D)|bctid)', '%40videoPlayer', url)
# Change bckey (used by bcove.me urls) to playerKey
url = re.sub(r'(?<=[?&])bckey', 'playerKey', url)
mobj = re.match(self._VALID_URL, url)
query_str = mobj.group('query')
query = compat_urlparse.parse_qs(query_str)