X-Git-Url: https://jfr.im/git/yt-dlp.git/blobdiff_plain/1e8fe57e5cd0f33f940df87430d75e1230ec5b7a..bfd973ece3369c593b5e82a88cc16de80088a73e:/yt_dlp/extractor/videopress.py diff --git a/yt_dlp/extractor/videopress.py b/yt_dlp/extractor/videopress.py index 3c5e27a9d..16965dfb0 100644 --- a/yt_dlp/extractor/videopress.py +++ b/yt_dlp/extractor/videopress.py @@ -1,5 +1,3 @@ -import re - from .common import InfoExtractor from ..utils import ( determine_ext, @@ -17,6 +15,7 @@ class VideoPressIE(InfoExtractor): _ID_REGEX = r'[\da-zA-Z]{8}' _PATH_REGEX = r'video(?:\.word)?press\.com/embed/' _VALID_URL = r'https?://%s(?P%s)' % (_PATH_REGEX, _ID_REGEX) + _EMBED_REGEX = [rf']+src=["\'](?P(?:https?://)?{_PATH_REGEX}{_ID_REGEX})'] _TESTS = [{ 'url': 'https://videopress.com/embed/kUJmAcSf', 'md5': '706956a6c875873d51010921310e4bc6', @@ -39,12 +38,6 @@ class VideoPressIE(InfoExtractor): 'only_matching': True, }] - @staticmethod - def _extract_urls(webpage): - return re.findall( - r']+src=["\']((?:https?://)?%s%s)' % (VideoPressIE._PATH_REGEX, VideoPressIE._ID_REGEX), - webpage) - def _real_extract(self, url): video_id = self._match_id(url)