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/xhamster.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'yt_dlp/extractor/xhamster.py') diff --git a/yt_dlp/extractor/xhamster.py b/yt_dlp/extractor/xhamster.py index e42eed7d8..688c6b952 100644 --- a/yt_dlp/extractor/xhamster.py +++ b/yt_dlp/extractor/xhamster.py @@ -373,6 +373,7 @@ class XHamsterIE(InfoExtractor): class XHamsterEmbedIE(InfoExtractor): _VALID_URL = r'https?://(?:.+?\.)?%s/xembed\.php\?video=(?P\d+)' % XHamsterIE._DOMAINS + _EMBED_REGEX = [r']+?src=(["\'])(?P(?:https?:)?//(?:www\.)?xhamster\.com/xembed\.php\?video=\d+)\1'] _TEST = { 'url': 'http://xhamster.com/xembed.php?video=3328539', 'info_dict': { @@ -387,12 +388,6 @@ class XHamsterEmbedIE(InfoExtractor): } } - @staticmethod - def _extract_urls(webpage): - return [url for _, url in re.findall( - r']+?src=(["\'])(?P(?:https?:)?//(?:www\.)?xhamster\.com/xembed\.php\?video=\d+)\1', - webpage)] - def _real_extract(self, url): video_id = self._match_id(url) -- cgit v1.2.3