diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-12-19 20:44:30 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-12-19 20:44:30 +0100 |
commit | 1f9da9049b5b6dcede3d274acd58aa1b6dea5d2c (patch) | |
tree | fa28fa75ba3dd6216902726cfe3f6208ac707533 /youtube_dl/extractor/generic.py | |
parent | c0d0b01f0e12ce23f7a751ef05e52dabd3e4c1e7 (diff) |
[generic] Support YouTube swf embed (Fixes #2010)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r-- | youtube_dl/extractor/generic.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 3c56daa02..75cb96eb7 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -233,8 +233,11 @@ class GenericIE(InfoExtractor): return self.url_result(surl, 'Vimeo') # Look for embedded YouTube player - matches = re.findall( - r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?youtube\.com/embed/.+?)\1', webpage) + matches = re.findall(r'''(?x) + (?:<iframe[^>]+?src=|embedSWF\(\s*) + (["\'])(?P<url>(?:https?:)?//(?:www\.)?youtube\.com/ + (?:embed|v)/.+?) + \1''', webpage) if matches: urlrs = [self.url_result(unescapeHTML(tuppl[1]), 'Youtube') for tuppl in matches] |