From: anovicecodemonkey Date: Wed, 19 Mar 2014 14:26:32 +0000 (+1030) Subject: [generic] Add support for embeded TED videos X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=8d7c0cca138c38c178d1b5518a46ca1f0ef18871;p=youtube-dl.git [generic] Add support for embeded TED videos --- 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']+?src=(["\'])(?Phttp://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'