Browse Source

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

'bctid' needs to be changed to '@videoPlayer', and 'bckey' to 'playerKey'.
rtmp_test
Jaime Marquínez Ferrándiz 11 years ago
parent
commit
51040b72ed
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      youtube_dl/extractor/brightcove.py

+ 4
- 2
youtube_dl/extractor/brightcove.py View File

@ -97,8 +97,10 @@ class BrightcoveIE(InfoExtractor):
return None return None
def _real_extract(self, url): 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) mobj = re.match(self._VALID_URL, url)
query_str = mobj.group('query') query_str = mobj.group('query')
query = compat_urlparse.parse_qs(query_str) query = compat_urlparse.parse_qs(query_str)


Loading…
Cancel
Save