Skip to content

Commit

Permalink
[brightcove] Only use url from meta element if it has the 'playerKey'…
Browse files Browse the repository at this point in the history
… field (fixes #2738)
  • Loading branch information
jaimeMF committed Apr 12, 2014
1 parent 37e3410 commit 381640e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion youtube_dl/extractor/brightcove.py
Expand Up @@ -140,7 +140,11 @@ def _extract_brightcove_urls(cls, webpage):

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
Expand Down

0 comments on commit 381640e

Please sign in to comment.