浏览代码

[brightcove] match only video elements with data-video-id attribute

Remita Amine 8 年之前
父节点
当前提交
ffbc8386b9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/extractor/brightcove.py

+ 1 - 1
youtube_dl/extractor/brightcove.py

@@ -522,7 +522,7 @@ class BrightcoveNewIE(InfoExtractor):
         # [2] looks like:
         # [2] looks like:
         for video, script_tag, account_id, player_id, embed in re.findall(
         for video, script_tag, account_id, player_id, embed in re.findall(
                 r'''(?isx)
                 r'''(?isx)
-                    (<video\s+[^>]+>)
+                    (<video\s+[^>]*data-video-id=['"]?[^>]+>)
                     (?:.*?
                     (?:.*?
                         (<script[^>]+
                         (<script[^>]+
                             src=["\'](?:https?:)?//players\.brightcove\.net/
                             src=["\'](?:https?:)?//players\.brightcove\.net/