From d367d424e5c2bca8914607ad095e235cfb6b838e Mon Sep 17 00:00:00 2001 From: rroller Date: Sun, 17 Nov 2024 19:25:38 -0800 Subject: [PATCH] [ie/streamff] Add extractor for streamff --- yt_dlp/extractor/_extractors.py | 1 + yt_dlp/extractor/streamff.py | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 yt_dlp/extractor/streamff.py diff --git a/yt_dlp/extractor/_extractors.py b/yt_dlp/extractor/_extractors.py index 967010826e..3a6dabd3d6 100644 --- a/yt_dlp/extractor/_extractors.py +++ b/yt_dlp/extractor/_extractors.py @@ -1977,6 +1977,7 @@ ) from .streamable import StreamableIE from .streamcz import StreamCZIE +from .streamff import StreamffIE from .streetvoice import StreetVoiceIE from .stretchinternet import StretchInternetIE from .stripchat import StripchatIE diff --git a/yt_dlp/extractor/streamff.py b/yt_dlp/extractor/streamff.py new file mode 100644 index 0000000000..5af714a90e --- /dev/null +++ b/yt_dlp/extractor/streamff.py @@ -0,0 +1,23 @@ +from .common import InfoExtractor + + +class StreamffIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?streamff\.com/v/(?P[a-zA-Z0-9]+)' + _TESTS = [{ + 'url': 'https://streamff.com/v/74341c35', + 'md5': 'afbdb74dc6e53477b1f1083793cfc2df', + 'info_dict': { + 'id': '74341c35', + 'ext': 'mp4', + 'title': '74341c35', + }, + }] + + def _real_extract(self, url): + video_id = self._match_id(url) + + return { + 'id': video_id, + 'title': video_id, + 'url': f'https://ffedge.streamff.com/uploads/{video_id}.mp4', + }