From: Jaime Marquínez Ferrándiz Date: Wed, 6 Nov 2013 21:03:00 +0000 (+0100) Subject: [brightcove] Support redirected urls from bcove.me (fixes #1732) X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=51040b72edab854aecb436a415e31789a86166ca;p=youtube-dl.git [brightcove] Support redirected urls from bcove.me (fixes #1732) 'bctid' needs to be changed to '@videoPlayer', and 'bckey' to 'playerKey'. --- diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index f0b79898c..0e60271f1 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/youtube_dl/extractor/brightcove.py @@ -97,8 +97,10 @@ class BrightcoveIE(InfoExtractor): 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)