aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-03-20 16:24:34 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-03-20 16:24:34 +0100
commit2bd9efd4c2227a2a9a93e0f1d15ad8fa89d33867 (patch)
treea43ce72a0a36d7336fee0e7eede4f89cab661bc3 /youtube_dl/extractor/generic.py
parent39a743fb9baa74a5eb7b1e3af5a8bf0c5f93c096 (diff)
parentfc26023120375c1a5ecad248241770f20c60b01e (diff)
Merge remote-tracking branch 'anovicecodemonkey/TEDIEimprovements'
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 5a4933146..273a3e282 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -487,6 +487,13 @@ class GenericIE(InfoExtractor):
if mobj is None:
# Broaden the search a little bit: JWPlayer JS loader
mobj = re.search(r'[^A-Za-z0-9]?file["\']?:\s*["\'](http(?![^\'"]+\.[0-9]+[\'"])[^\'"]+)["\']', webpage)
+
+ # Look for embedded TED player
+ mobj = re.search(
+ r'<iframe[^>]+?src=(["\'])(?P<url>http://embed\.ted\.com/.+?)\1', webpage)
+ if mobj is not None:
+ return self.url_result(mobj.group('url'), 'TED')
+
if mobj is None:
# Try to find twitter cards info
mobj = re.search(r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage)