[generic] Prevent <video> search from skipping over empty sources (#3546)
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 27 Aug 2014 00:09:59 +0000 (02:09 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 27 Aug 2014 00:09:59 +0000 (02:09 +0200)
youtube_dl/extractor/generic.py

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