diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-03-20 16:24:34 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-03-20 16:24:34 +0100 |
commit | 2bd9efd4c2227a2a9a93e0f1d15ad8fa89d33867 (patch) | |
tree | a43ce72a0a36d7336fee0e7eede4f89cab661bc3 /youtube_dl/extractor/ted.py | |
parent | 39a743fb9baa74a5eb7b1e3af5a8bf0c5f93c096 (diff) | |
parent | fc26023120375c1a5ecad248241770f20c60b01e (diff) |
Merge remote-tracking branch 'anovicecodemonkey/TEDIEimprovements'
Diffstat (limited to 'youtube_dl/extractor/ted.py')
-rw-r--r-- | youtube_dl/extractor/ted.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/ted.py b/youtube_dl/extractor/ted.py index 3968b718e..aab026936 100644 --- a/youtube_dl/extractor/ted.py +++ b/youtube_dl/extractor/ted.py @@ -11,7 +11,7 @@ from ..utils import ( class TEDIE(SubtitlesInfoExtractor): - _VALID_URL = r'''(?x)http://www\.ted\.com/ + _VALID_URL = r'''(?x)http://(?P<type>www|embed)\.ted\.com/ ( (?P<type_playlist>playlists(?:/\d+)?) # We have a playlist | @@ -48,6 +48,9 @@ class TEDIE(SubtitlesInfoExtractor): def _real_extract(self, url): m = re.match(self._VALID_URL, url, re.VERBOSE) + if m.group('type') == 'embed': # if the _VALID_URL is an embed + desktop_url = re.sub("embed", "www", url) + return self.url_result(desktop_url, 'TED') # pass the desktop version to the extractor name = m.group('name') if m.group('type_talk'): return self._talk_info(url, name) |