projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3004ae2
)
[generic] Add support for LazyYT embeds (Fixes #4306)
author
Philipp Hagemeister
<phihag@phihag.de>
Tue, 25 Nov 2014 13:34:19 +0000
(14:34 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Tue, 25 Nov 2014 13:34:19 +0000
(14:34 +0100)
youtube_dl/extractor/generic.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/generic.py
b/youtube_dl/extractor/generic.py
index 128715caf091e07b28d8b6641c8faef0917a07fe..6a95e2952a63a2960d795a6c6b538c9d4b6fe2b6 100644
(file)
--- a/
youtube_dl/extractor/generic.py
+++ b/
youtube_dl/extractor/generic.py
@@
-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(
matches, lambda m: unescapeHTML(m[1]))
return _playlist_from_matches(
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
matches = re.findall(
r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/embed/video/.+?)\1', webpage)
# Look for embedded Dailymotion player
matches = re.findall(
r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/embed/video/.+?)\1', webpage)