From 00edf409b22bc878db1bbabf683a47ca040857af Mon Sep 17 00:00:00 2001 From: Nicolas Dato Date: Sun, 26 Nov 2023 19:50:35 -0300 Subject: [PATCH] [rudovideo] Add rudo.video extractor --- yt_dlp/extractor/_extractors.py | 1 + yt_dlp/extractor/rudovideo.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 yt_dlp/extractor/rudovideo.py diff --git a/yt_dlp/extractor/_extractors.py b/yt_dlp/extractor/_extractors.py index 9b96bd5b45..0a97125369 100644 --- a/yt_dlp/extractor/_extractors.py +++ b/yt_dlp/extractor/_extractors.py @@ -1643,6 +1643,7 @@ from .rumble import ( RumbleIE, RumbleChannelIE, ) +from .rudovideo import RudoVideoIE from .rutube import ( RutubeIE, RutubeChannelIE, diff --git a/yt_dlp/extractor/rudovideo.py b/yt_dlp/extractor/rudovideo.py new file mode 100644 index 0000000000..b512b7103e --- /dev/null +++ b/yt_dlp/extractor/rudovideo.py @@ -0,0 +1,31 @@ +from .common import InfoExtractor +from ..utils import js_to_json, ExtractorError, traverse_obj +from urllib.parse import urlencode + +class RudoVideoIE(InfoExtractor): + _VALID_URL = r'https?://rudo\.video/live/(?P[^/]+)' + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + if "Streaming is not available in your area." in webpage: + self.raise_geo_restricted() + + stream_url = self._search_regex(r'var\s+streamURL\s*=\s*\'([^?\']+)', webpage, "streamUrl") + token_array_string = self._search_regex(r'