[brightcove] Allow whitespace around attribute names in embedded code
[youtube-dl] / youtube_dl / extractor / brightcove.py
index a2db705b0959ec2a9b6a74a7c5cfb1610b1ddd25..3f017a2b1a87232db4fb6e475df6c3b4162a3db7 100644 (file)
@@ -277,7 +277,7 @@ class BrightcoveLegacyIE(InfoExtractor):
             return list(filter(None, [
                 cls._build_brighcove_url_from_js(custom_bc)
                 for custom_bc in matches]))
-        return [url for _, url in re.findall(
+        return [src for _, src in re.findall(
             r'<iframe[^>]+src=([\'"])((?:https?:)?//link\.brightcove\.com/services/player/(?!\1).+)\1', webpage)]
 
     def _real_extract(self, url):
@@ -522,7 +522,7 @@ class BrightcoveNewIE(InfoExtractor):
         # [2] looks like:
         for video, script_tag, account_id, player_id, embed in re.findall(
                 r'''(?isx)
-                    (<video\s+[^>]+>)
+                    (<video\s+[^>]*\bdata-video-id\s*=\s*['"]?[^>]+>)
                     (?:.*?
                         (<script[^>]+
                             src=["\'](?:https?:)?//players\.brightcove\.net/