]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/megatvcom.py
[extractors] Use new framework for existing embeds (#4307)
[yt-dlp.git] / yt_dlp / extractor / megatvcom.py
index ec481d016caa6cf1abc04bcb1c08aefb55403306..54c7b7f9fe2f3df7e1f8e18ff6ee799e9d0995c7 100644 (file)
@@ -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<id>\d+)'
-    _EMBED_RE = re.compile(rf'''<iframe[^>]+?src=(?P<_q1>["'])(?P<url>{_VALID_URL})(?P=_q1)''')
+    _EMBED_REGEX = [rf'''<iframe[^>]+?src=(?P<_q1>["'])(?P<url>{_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)
         <link(?: