From: Philipp Hagemeister Date: Thu, 19 Dec 2013 19:44:30 +0000 (+0100) Subject: [generic] Support YouTube swf embed (Fixes #2010) X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=1f9da9049b5b6dcede3d274acd58aa1b6dea5d2c;p=youtube-dl [generic] Support YouTube swf embed (Fixes #2010) --- 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']+?src=(["\'])(?P(?:https?:)?//(?:www\.)?youtube\.com/embed/.+?)\1', webpage) + matches = re.findall(r'''(?x) + (?:]+?src=|embedSWF\(\s*) + (["\'])(?P(?:https?:)?//(?:www\.)?youtube\.com/ + (?:embed|v)/.+?) + \1''', webpage) if matches: urlrs = [self.url_result(unescapeHTML(tuppl[1]), 'Youtube') for tuppl in matches]