1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-14 06:02:52 +08:00

[generic] embed dailymotion from spi0n.com (fixes #2810)

This commit is contained in:
pulpe 2014-04-26 18:16:39 +02:00
parent 7c360e3a04
commit d196faed26

View File

@ -469,8 +469,13 @@ class GenericIE(InfoExtractor):
matches = re.findall(
r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/embed/video/.+?)\1', webpage)
if matches:
urlrs = [self.url_result(unescapeHTML(tuppl[1]), 'Dailymotion')
for tuppl in matches]
urlrs = []
for tuppl in matches:
unrl = unescapeHTML(tuppl[1])
if unrl.startswith('//'):
unrl = ('http:' if self._downloader.params.get('prefer_insecure', False) else 'https:') + unrl
urlrs.append(self.url_result(unrl, 'Dailymotion'))
return self.playlist_result(
urlrs, playlist_id=video_id, playlist_title=video_title)