diff options
author | Jaime Marquínez Ferrándiz <[email protected]> | 2014-04-12 12:53:48 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <[email protected]> | 2014-04-12 12:53:48 +0200 |
commit | 381640e3acf65e9eac52b6ad47d7f7cad45a7d6d (patch) | |
tree | f4e0019ac71ce04ecd0104682d6e8f50374a0893 | |
parent | 37e341013745e89d38448f3740944fa4a299a145 (diff) | |
download | youtube-dl-381640e3acf65e9eac52b6ad47d7f7cad45a7d6d.tar.gz youtube-dl-381640e3acf65e9eac52b6ad47d7f7cad45a7d6d.zip |
[brightcove] Only use url from meta element if it has the 'playerKey' field (fixes #2738)
-rw-r--r-- | youtube_dl/extractor/brightcove.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index 339d60ff0..3c02c297a 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/youtube_dl/extractor/brightcove.py @@ -140,7 +140,11 @@ class BrightcoveIE(InfoExtractor): url_m = re.search(r'<meta\s+property="og:video"\s+content="(http://c.brightcove.com/[^"]+)"', webpage) if url_m: - return [unescapeHTML(url_m.group(1))] + url = unescapeHTML(url_m.group(1)) + # Some sites don't add it, we can't download with this url, for example: + # http://www.ktvu.com/videos/news/raw-video-caltrain-releases-video-of-man-almost/vCTZdY/ + if 'playerKey' in url: + return [url] matches = re.findall( r'''(?sx)<object |