From: rzhxeo Date: Tue, 5 Nov 2013 01:08:02 +0000 (+0100) Subject: [GenericIE] Also detect youtube if src url of iframe is embedded in ' instaed of " X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=2dcf7d8f99604de9bdfa1b1e12a2bd5840d523d2;p=youtube-dl.git [GenericIE] Also detect youtube if src url of iframe is embedded in ' instaed of " --- diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 2c8fcf5ae..b3fec8e86 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -160,9 +160,9 @@ class GenericIE(InfoExtractor): # Look for embedded YouTube player mobj = re.search( - r']+?src="(https?://(?:www\.)?youtube.com/embed/.+?)"', webpage) + r']+?src=(["\'])(?Phttps?://(?:www\.)?youtube.com/embed/.+?)\1', webpage) if mobj: - surl = unescapeHTML(mobj.group(1)) + surl = unescapeHTML(mobj.group(u'url')) return self.url_result(surl, 'Youtube') # Look for Bandcamp pages with custom domain