diff options
author | anovicecodemonkey <anovicecodemonkey13435@mailinator.com> | 2014-03-20 00:56:32 +1030 |
---|---|---|
committer | anovicecodemonkey <anovicecodemonkey13435@mailinator.com> | 2014-03-20 00:56:32 +1030 |
commit | 8d7c0cca138c38c178d1b5518a46ca1f0ef18871 (patch) | |
tree | f385bcde9dc5965ad7963ec187f1455eac269c1a | |
parent | cc88b90ec8a0acb9d69d411c59b34237cdb9eb7b (diff) |
[generic] Add support for embeded TED videos
-rw-r--r-- | youtube_dl/extractor/generic.py | 7 |
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) |