From bfd973ece3369c593b5e82a88cc16de80088a73e Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 1 Aug 2022 06:53:25 +0530 Subject: [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 --- yt_dlp/extractor/megatvcom.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'yt_dlp/extractor/megatvcom.py') diff --git a/yt_dlp/extractor/megatvcom.py b/yt_dlp/extractor/megatvcom.py index ec481d016..54c7b7f9f 100644 --- a/yt_dlp/extractor/megatvcom.py +++ b/yt_dlp/extractor/megatvcom.py @@ -104,7 +104,7 @@ class MegaTVComEmbedIE(MegaTVComBaseIE): IE_NAME = 'megatvcom:embed' IE_DESC = 'megatv.com embedded videos' _VALID_URL = r'(?:https?:)?//(?:www\.)?megatv\.com/embed/?\?p=(?P\d+)' - _EMBED_RE = re.compile(rf''']+?src=(?P<_q1>["'])(?P{_VALID_URL})(?P=_q1)''') + _EMBED_REGEX = [rf''']+?src=(?P<_q1>["'])(?P{_VALID_URL})(?P=_q1)'''] _TESTS = [{ 'url': 'https://www.megatv.com/embed/?p=2020520979', @@ -134,11 +134,6 @@ class MegaTVComEmbedIE(MegaTVComBaseIE): }, }] - @classmethod - def _extract_urls(cls, webpage): - for mobj in cls._EMBED_RE.finditer(webpage): - yield unescapeHTML(mobj.group('url')) - def _match_canonical_url(self, webpage): LINK_RE = r'''(?x)