浏览代码

[generic] Fix HTML5 video regexp

Philipp Hagemeister 11 年之前
父节点
当前提交
48a24ab746
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/extractor/generic.py

+ 1 - 1
youtube_dl/extractor/generic.py

@@ -933,7 +933,7 @@ class GenericIE(InfoExtractor):
                 found = filter_video(re.findall(r'<meta.*?property="og:video".*?content="(.*?)"', webpage))
                 found = filter_video(re.findall(r'<meta.*?property="og:video".*?content="(.*?)"', webpage))
         if not found:
         if not found:
             # HTML5 video
             # HTML5 video
-            found = re.findall(r'(?s)<video[^<]*(?:>.*?<source[^>]+)? src="([^"]+)"', webpage)
+            found = re.findall(r'(?s)<video[^<]*(?:>.*?<source[^>]*)?\s+src="([^"]+)"', webpage)
         if not found:
         if not found:
             found = re.search(
             found = re.search(
                 r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
                 r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'