From cd791a5ea08b77dab37c15efa7e064c07144cb6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Mon, 5 Jan 2015 13:11:13 +0100 Subject: [PATCH] [ted] Add support for embed-ssl.ted.com embedded videos --- youtube_dl/extractor/generic.py | 2 +- youtube_dl/extractor/ted.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 5c41ff517..2d871f8b4 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -926,7 +926,7 @@ def _playlist_from_matches(matches, getter=None, ie=None): # Look for embedded TED player mobj = re.search( - r']+?src=(["\'])(?Phttp://embed\.ted\.com/.+?)\1', webpage) + r']+?src=(["\'])(?Phttps?://embed(?:-ssl)?\.ted\.com/.+?)\1', webpage) if mobj is not None: return self.url_result(mobj.group('url'), 'TED') diff --git a/youtube_dl/extractor/ted.py b/youtube_dl/extractor/ted.py index 944177426..10b3b706a 100644 --- a/youtube_dl/extractor/ted.py +++ b/youtube_dl/extractor/ted.py @@ -13,7 +13,7 @@ class TEDIE(SubtitlesInfoExtractor): _VALID_URL = r'''(?x) (?Phttps?://) - (?Pwww|embed)(?P\.ted\.com/ + (?Pwww|embed(?:-ssl)?)(?P\.ted\.com/ ( (?Pplaylists(?:/\d+)?) # We have a playlist | @@ -98,7 +98,7 @@ def _extract_info(self, webpage): def _real_extract(self, url): m = re.match(self._VALID_URL, url, re.VERBOSE) - if m.group('type') == 'embed': + if m.group('type').startswith('embed'): desktop_url = m.group('proto') + 'www' + m.group('urlmain') return self.url_result(desktop_url, 'TED') name = m.group('name')