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/megaphone.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'yt_dlp/extractor/megaphone.py') diff --git a/yt_dlp/extractor/megaphone.py b/yt_dlp/extractor/megaphone.py index 0c150ef45..af80523e3 100644 --- a/yt_dlp/extractor/megaphone.py +++ b/yt_dlp/extractor/megaphone.py @@ -1,5 +1,3 @@ -import re - from .common import InfoExtractor from ..utils import js_to_json @@ -8,6 +6,7 @@ class MegaphoneIE(InfoExtractor): IE_NAME = 'megaphone.fm' IE_DESC = 'megaphone.fm embedded players' _VALID_URL = r'https://player\.megaphone\.fm/(?P[A-Z0-9]+)' + _EMBED_REGEX = [rf']*?\ssrc=["\'](?P{_VALID_URL})'] _TEST = { 'url': 'https://player.megaphone.fm/GLT9749789991?"', 'md5': '4816a0de523eb3e972dc0dda2c191f96', @@ -45,8 +44,3 @@ class MegaphoneIE(InfoExtractor): 'duration': episode_data['duration'], 'formats': formats, } - - @classmethod - def _extract_urls(cls, webpage): - return [m[0] for m in re.findall( - r']*?\ssrc=["\'](%s)' % cls._VALID_URL, webpage)] -- cgit v1.2.3