Browse Source

Merge pull request #1724 from rzhxeo/generic_youtube

[GenericIE] Also detect youtube if src url of iframe is embedded in ' instead of "
rtmp_test
Jaime Marquínez Ferrándiz 11 years ago
parent
commit
7f34001d57
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      youtube_dl/extractor/generic.py

+ 2
- 2
youtube_dl/extractor/generic.py View File

@ -160,9 +160,9 @@ class GenericIE(InfoExtractor):
# Look for embedded YouTube player # Look for embedded YouTube player
mobj = re.search( 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: if mobj:
surl = unescapeHTML(mobj.group(1))
surl = unescapeHTML(mobj.group(u'url'))
return self.url_result(surl, 'Youtube') return self.url_result(surl, 'Youtube')
# Look for Bandcamp pages with custom domain # Look for Bandcamp pages with custom domain


Loading…
Cancel
Save