aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortony-hn <25278435+tony-hn@users.noreply.github.com>2024-09-26 17:53:52 +0100
committerGitHub <noreply@github.com>2024-09-26 16:53:52 +0000
commitad0b857f459a6d390fbf124183916218c52f223a (patch)
tree956924c5616364168ad158365710d5429f7a0562
parent124f058b546d652a359c67025bb479789bfbef0b (diff)
[ie/RumbleChannel] Fix extractor (#11049)
Closes #10833 Authored by: tony-hn
-rw-r--r--yt_dlp/extractor/rumble.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/yt_dlp/extractor/rumble.py b/yt_dlp/extractor/rumble.py
index db780a2cf..74c7e4f17 100644
--- a/yt_dlp/extractor/rumble.py
+++ b/yt_dlp/extractor/rumble.py
@@ -8,14 +8,17 @@ from ..utils import (
UnsupportedError,
clean_html,
determine_ext,
+ extract_attributes,
format_field,
get_element_by_class,
+ get_elements_html_by_class,
int_or_none,
join_nonempty,
parse_count,
parse_iso8601,
traverse_obj,
unescapeHTML,
+ urljoin,
)
@@ -382,8 +385,10 @@ class RumbleChannelIE(InfoExtractor):
if isinstance(e.cause, HTTPError) and e.cause.status == 404:
break
raise
- for video_url in re.findall(r'class="[^>"]*videostream__link[^>]+href="([^"]+\.html)"', webpage):
- yield self.url_result('https://rumble.com' + video_url)
+ for video_url in traverse_obj(
+ get_elements_html_by_class('videostream__link', webpage), (..., {extract_attributes}, 'href'),
+ ):
+ yield self.url_result(urljoin('https://rumble.com', video_url))
def _real_extract(self, url):
url, playlist_id = self._match_valid_url(url).groups()