]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[brightcove] Support redirected urls from bcove.me (fixes #1732)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 6 Nov 2013 21:03:00 +0000 (22:03 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 6 Nov 2013 21:03:00 +0000 (22:03 +0100)
'bctid' needs to be changed to '@videoPlayer', and 'bckey' to 'playerKey'.

youtube_dl/extractor/brightcove.py

index f0b79898c0426610256f103bf49c94c60092d823..0e60271f15935f035096cb4d8d67acd5a46c405f 100644 (file)
@@ -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)