mirror of
https://github.com/l1ving/youtube-dl
synced 2024-11-22 16:42:53 +08:00
[generic] Add support for <embed YouTube
This commit is contained in:
parent
23566e0d78
commit
2b88feedf7
@ -260,7 +260,24 @@ class GenericIE(InfoExtractor):
|
|||||||
'uploader': 'Spi0n',
|
'uploader': 'Spi0n',
|
||||||
},
|
},
|
||||||
'add_ie': ['Dailymotion'],
|
'add_ie': ['Dailymotion'],
|
||||||
}
|
},
|
||||||
|
# YouTube embed
|
||||||
|
{
|
||||||
|
'url': 'http://www.badzine.de/ansicht/datum/2014/06/09/so-funktioniert-die-neue-englische-badminton-liga.html',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'FXRb4ykk4S0',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'The NBL Auction 2014',
|
||||||
|
'uploader': 'BADMINTON England',
|
||||||
|
'uploader_id': 'BADMINTONEvents',
|
||||||
|
'upload_date': '20140603',
|
||||||
|
'description': 'md5:9ef128a69f1e262a700ed83edb163a73',
|
||||||
|
},
|
||||||
|
'add_ie': ['Youtube'],
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
def report_download_webpage(self, video_id):
|
def report_download_webpage(self, video_id):
|
||||||
@ -478,8 +495,13 @@ class GenericIE(InfoExtractor):
|
|||||||
|
|
||||||
# Look for embedded YouTube player
|
# Look for embedded YouTube player
|
||||||
matches = re.findall(r'''(?x)
|
matches = re.findall(r'''(?x)
|
||||||
(?:<iframe[^>]+?src=|embedSWF\(\s*)
|
(?:
|
||||||
(["\'])(?P<url>(?:https?:)?//(?:www\.)?youtube\.com/
|
<iframe[^>]+?src=|
|
||||||
|
<embed[^>]+?src=|
|
||||||
|
embedSWF\(?:\s*
|
||||||
|
)
|
||||||
|
(["\'])
|
||||||
|
(?P<url>(?:https?:)?//(?:www\.)?youtube\.com/
|
||||||
(?:embed|v)/.+?)
|
(?:embed|v)/.+?)
|
||||||
\1''', webpage)
|
\1''', webpage)
|
||||||
if matches:
|
if matches:
|
||||||
|
Loading…
Reference in New Issue
Block a user