aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/ted.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/ted.py')
-rw-r--r--hypervideo_dl/extractor/ted.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/hypervideo_dl/extractor/ted.py b/hypervideo_dl/extractor/ted.py
index b5c7e35..c28a154 100644
--- a/hypervideo_dl/extractor/ted.py
+++ b/hypervideo_dl/extractor/ted.py
@@ -125,8 +125,6 @@ class TedTalkIE(TedBaseIE):
ext_url = external.get('code') if service.lower() == 'youtube' else None
return self.url_result(ext_url or external['uri'])
- self._sort_formats(formats)
-
thumbnail = playerData.get('thumb') or self._og_search_property('image', webpage)
if thumbnail:
# trim thumbnail resize parameters
@@ -215,6 +213,7 @@ class TedPlaylistIE(TedBaseIE):
class TedEmbedIE(InfoExtractor):
_VALID_URL = r'https?://embed(?:-ssl)?\.ted\.com/'
+ _EMBED_REGEX = [rf'<iframe[^>]+?src=(["\'])(?P<url>{_VALID_URL}.+?)\1']
_TESTS = [{
'url': 'https://embed.ted.com/talks/janet_stovall_how_to_get_serious_about_diversity_and_inclusion_in_the_workplace',
@@ -233,10 +232,5 @@ class TedEmbedIE(InfoExtractor):
},
}]
- @classmethod
- def _extract_urls(cls, webpage):
- return [mobj.group('url') for mobj in re.finditer(
- fr'<iframe[^>]+?src=(["\'])(?P<url>{cls._VALID_URL}.+?)\1', webpage)]
-
def _real_extract(self, url):
return self.url_result(re.sub(r'://embed(-ssl)?', '://www', url), TedTalkIE.ie_key())