]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[GenericIE] Also detect youtube if src url of iframe is embedded in ' instaed of "
authorrzhxeo <rzhxeot7z81b4700@mailcatch.com>
Tue, 5 Nov 2013 01:08:02 +0000 (02:08 +0100)
committerrzhxeo <rzhxeot7z81b4700@mailcatch.com>
Tue, 5 Nov 2013 01:08:02 +0000 (02:08 +0100)
youtube_dl/extractor/generic.py

index 2c8fcf5ae5df24a1dedc5e461feb5ac2300688a6..b3fec8e863b6a50b86d69a30c0dc446d09492bc8 100644 (file)
@@ -160,9 +160,9 @@ class GenericIE(InfoExtractor):
 
         # Look for embedded YouTube player
         mobj = re.search(
-            r'<iframe[^>]+?src="(https?://(?:www\.)?youtube.com/embed/.+?)"', webpage)
+            r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?: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