mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 21:59:17 +00:00
[GenericIE] Also detect youtube if src url of iframe is embedded in ' instaed of "
This commit is contained in:
parent
19b0668251
commit
2dcf7d8f99
|
@ -160,9 +160,9 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
# 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…
Reference in a new issue