[generic] Capture <audio> tags in addition to <video> tags
authorfelix <felix.von.s@posteo.de>
Thu, 3 Sep 2015 05:13:05 +0000 (07:13 +0200)
committerSergey M․ <dstftw@gmail.com>
Sat, 5 Sep 2015 15:53:10 +0000 (21:53 +0600)
youtube_dl/extractor/generic.py

index 953ec32c3f506ad8674a2c44a0a650a13cc56bf4..ec748ed9f4c7b81f4e49270a9857ba429a2cd108 100644 (file)
@@ -1797,7 +1797,7 @@ class GenericIE(InfoExtractor):
                 found = filter_video(re.findall(r'<meta.*?property="og:video".*?content="(.*?)"', webpage))
         if not found:
             # HTML5 video
-            found = re.findall(r'(?s)<video[^<]*(?:>.*?<source[^>]*)?\s+src=["\'](.*?)["\']', webpage)
+            found = re.findall(r'(?s)<(?:video|audio)[^<]*(?:>.*?<source[^>]*)?\s+src=["\'](.*?)["\']', webpage)
         if not found:
             REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
             found = re.search(