diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-01 06:53:25 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-02 01:08:16 +0530 |
commit | bfd973ece3369c593b5e82a88cc16de80088a73e (patch) | |
tree | 6a61140e44f412d16ece6794b5b3e4ead4905b3c /yt_dlp/extractor/ted.py | |
parent | 1e8fe57e5cd0f33f940df87430d75e1230ec5b7a (diff) | |
download | hypervideo-pre-bfd973ece3369c593b5e82a88cc16de80088a73e.tar.lz hypervideo-pre-bfd973ece3369c593b5e82a88cc16de80088a73e.tar.xz hypervideo-pre-bfd973ece3369c593b5e82a88cc16de80088a73e.zip |
[extractors] Use new framework for existing embeds (#4307)
`Brightcove` is difficult to migrate because it's subclasses may depend
on the signature of the current functions. So it is left as-is for now
Note: Tests have not been migrated
Diffstat (limited to 'yt_dlp/extractor/ted.py')
-rw-r--r-- | yt_dlp/extractor/ted.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/yt_dlp/extractor/ted.py b/yt_dlp/extractor/ted.py index b5c7e35ac..0e09ec757 100644 --- a/yt_dlp/extractor/ted.py +++ b/yt_dlp/extractor/ted.py @@ -215,6 +215,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 +234,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()) |