[brightcove] Only use url from meta element if it has the 'playerKey' field (fixes...
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 12 Apr 2014 10:53:48 +0000 (12:53 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 12 Apr 2014 10:53:48 +0000 (12:53 +0200)
youtube_dl/extractor/brightcove.py

index 339d60ff0f52ed31edcb77aa1b2e1d4994266a91..3c02c297a58a32cf536e8ccc972dea68021f650b 100644 (file)
@@ -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