[ie/RumbleChannel] Fix extractor (#11049)

Closes #10833
Authored by: tony-hn
This commit is contained in:
tony-hn 2024-09-26 17:53:52 +01:00 committed by GitHub
parent 124f058b54
commit ad0b857f45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,14 +8,17 @@
UnsupportedError, UnsupportedError,
clean_html, clean_html,
determine_ext, determine_ext,
extract_attributes,
format_field, format_field,
get_element_by_class, get_element_by_class,
get_elements_html_by_class,
int_or_none, int_or_none,
join_nonempty, join_nonempty,
parse_count, parse_count,
parse_iso8601, parse_iso8601,
traverse_obj, traverse_obj,
unescapeHTML, unescapeHTML,
urljoin,
) )
@ -382,8 +385,10 @@ def entries(self, url, playlist_id):
if isinstance(e.cause, HTTPError) and e.cause.status == 404: if isinstance(e.cause, HTTPError) and e.cause.status == 404:
break break
raise raise
for video_url in re.findall(r'class="[^>"]*videostream__link[^>]+href="([^"]+\.html)"', webpage): for video_url in traverse_obj(
yield self.url_result('https://rumble.com' + video_url) 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): def _real_extract(self, url):
url, playlist_id = self._match_valid_url(url).groups() url, playlist_id = self._match_valid_url(url).groups()