aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/extractor/generic.py
diff options
context:
space:
mode:
authortrasssh <94064652+trassshhub@users.noreply.github.com>2022-01-20 00:04:20 +0800
committerGitHub <noreply@github.com>2022-01-19 21:34:20 +0530
commit4259402c56142486e511f452e654a7791c6f5484 (patch)
treee48d46e3d38d91411ef85f561a504d9dd64a0a8a /yt_dlp/extractor/generic.py
parentdfb7f2a25ddaca8d89805497d4505c669908677f (diff)
[Ted] Rewrite extractor (#2359)
Closes #2343 Authored by: pukkandan, trassshhub
Diffstat (limited to 'yt_dlp/extractor/generic.py')
-rw-r--r--yt_dlp/extractor/generic.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.py
index 101258d74..9b62ebfed 100644
--- a/yt_dlp/extractor/generic.py
+++ b/yt_dlp/extractor/generic.py
@@ -115,6 +115,7 @@ from .channel9 import Channel9IE
from .vshare import VShareIE
from .mediasite import MediasiteIE
from .springboardplatform import SpringboardPlatformIE
+from .ted import TedEmbedIE
from .yapfiles import YapFilesIE
from .vice import ViceIE
from .xfileshare import XFileShareIE
@@ -3174,10 +3175,9 @@ class GenericIE(InfoExtractor):
return self.url_result(mobj.group('url'), 'Tvigle')
# Look for embedded TED player
- mobj = re.search(
- r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed(?:-ssl)?\.ted\.com/.+?)\1', webpage)
- if mobj is not None:
- return self.url_result(mobj.group('url'), 'TED')
+ ted_urls = TedEmbedIE._extract_urls(webpage)
+ if ted_urls:
+ return self.playlist_from_matches(ted_urls, video_id, video_title, ie=TedEmbedIE.ie_key())
# Look for embedded Ustream videos
ustream_url = UstreamIE._extract_url(webpage)