aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-11-06 22:03:00 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-11-06 22:03:00 +0100
commit51040b72edab854aecb436a415e31789a86166ca (patch)
treec6f7d43a3c2cad23d406e06cea0f0234e484d636 /youtube_dl
parent4f045eef8fe63bcb925faaa5108a42d00b83f93a (diff)
downloadyoutube-dl-51040b72edab854aecb436a415e31789a86166ca.zip
youtube-dl-51040b72edab854aecb436a415e31789a86166ca.tar.gz
youtube-dl-51040b72edab854aecb436a415e31789a86166ca.tar.bz2
[brightcove] Support redirected urls from bcove.me (fixes #1732)
'bctid' needs to be changed to '@videoPlayer', and 'bckey' to 'playerKey'.
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/brightcove.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py
index f0b7989..0e60271 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)