mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-26 10:24:33 +01:00
[generic] Add support for LazyYT embeds (Fixes #4306)
This commit is contained in:
parent
3004ae2c3a
commit
65f3a228b1
@ -445,6 +445,14 @@ class GenericIE(InfoExtractor):
|
|||||||
'title': 'Rosetta #CometLanding webcast HL 10',
|
'title': 'Rosetta #CometLanding webcast HL 10',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
# LazyYT
|
||||||
|
{
|
||||||
|
'url': 'http://discourse.ubuntu.com/t/unity-8-desktop-mode-windows-on-mir/1986',
|
||||||
|
'info_dict': {
|
||||||
|
'title': 'Unity 8 desktop-mode windows on Mir! - Ubuntu Discourse',
|
||||||
|
},
|
||||||
|
'playlist_mincount': 2,
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
def report_following_redirect(self, new_url):
|
def report_following_redirect(self, new_url):
|
||||||
@ -702,6 +710,12 @@ class GenericIE(InfoExtractor):
|
|||||||
return _playlist_from_matches(
|
return _playlist_from_matches(
|
||||||
matches, lambda m: unescapeHTML(m[1]))
|
matches, lambda m: unescapeHTML(m[1]))
|
||||||
|
|
||||||
|
# Look for lazyYT YouTube embed
|
||||||
|
matches = re.findall(
|
||||||
|
r'class="lazyYT" data-youtube-id="([^"]+)"', webpage)
|
||||||
|
if matches:
|
||||||
|
return _playlist_from_matches(matches, lambda m: unescapeHTML(m))
|
||||||
|
|
||||||
# Look for embedded Dailymotion player
|
# Look for embedded Dailymotion player
|
||||||
matches = re.findall(
|
matches = re.findall(
|
||||||
r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/embed/video/.+?)\1', webpage)
|
r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/embed/video/.+?)\1', webpage)
|
||||||
|
Loading…
Reference in New Issue
Block a user