projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3093468
)
[generic] support HTML5 video
author
Philipp Hagemeister
<phihag@phihag.de>
Wed, 21 Aug 2013 02:32:22 +0000
(
04:32
+0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Wed, 21 Aug 2013 02:32:22 +0000
(
04:32
+0200)
youtube_dl/extractor/generic.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/generic.py
b/youtube_dl/extractor/generic.py
index 1c468f8f6bff0e36b425f0c5dda85d360ff8fc79..da016f7ee86635c114bb4328742971c8082e5491 100644
(file)
--- a/
youtube_dl/extractor/generic.py
+++ b/
youtube_dl/extractor/generic.py
@@
-149,6
+149,9
@@
class GenericIE(InfoExtractor):
# We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
if m_video_type is not None:
mobj = re.search(r'<meta.*?property="og:video".*?content="(.*?)"', webpage)
+ if mobj is None:
+ # HTML5 video
+ mobj = re.search(r'<video[^<]*>.*?<source .*?src="([^"]+)"', webpage, flags=re.DOTALL)
if mobj is None:
raise ExtractorError(u'Invalid URL: %s' % url)