Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/rumble.py (Python)

Code before:
        },
    }, {
        'url': 'https://rumble.com/search/video?q=rumble&sort=views',
        'playlist_mincount': 24,
        'info_dict': {
            'id': 'video?q=rumble&sort=views',
            'title': 'Search results for: rumble',
            'age_limit': 0,
        },
    }]

    def _real_extract(self, url):
        page_id = self._match_id(url)
        webpage = self._download_webpage(url, page_id)
        url_info = next(RumbleEmbedIE.extract_from_webpage(self._downloader, url, webpage), None)
        if not url_info:
            raise UnsupportedError(url)

        return {
            '_type': 'url_transparent',
            'ie_key': url_info['ie_key'],
            'url': url_info['url'],
            'release_timestamp': parse_iso8601(self._search_regex(
                r'(?:Livestream begins|Streamed on):\s+<time datetime="([^"]+)', webpage, 'release date', default=None)),
            'view_count': int(self._search_regex(
                r'"userInteractionCount"\s*:\s*(\d+)', webpage, 'view count', default=None)),
            'like_count': parse_count(self._search_regex(
                r'<span data-js="rumbles_up_votes">\s*([\d,.KM]+)', webpage, 'like count', default=None)),
            'dislike_count': parse_count(self._search_regex(
                r'<span data-js="rumbles_down_votes">\s*([\d,.KM]+)', webpage, 'dislike count', default=None)),
            'description': clean_html(get_element_by_class('media-description', webpage))
        }


class RumbleChannelIE(InfoExtractor):
    _VALID_URL = r'(?P<url>https?://(?:www\.)?rumble\.com/(?:c|user)/(?P<id>[^&?#$/]+))'

    _TESTS = [{
        'url': 'https://rumble.com/c/Styxhexenhammer666',
        'playlist_mincount': 1160,
        'info_dict': {
            'id': 'Styxhexenhammer666',
        },
    }, {
        'url': 'https://rumble.com/user/goldenpoodleharleyeuna',
        'playlist_mincount': 4,
        'info_dict': {
            'id': 'goldenpoodleharleyeuna',
        },
    }]


Review comment (suggestion):
so it's non-fatal when `_search_regex` returns default
```suggestion
            'view_count': int_or_none(self._search_regex(
                r'"userInteractionCount"\s*:\s*(\d+)', webpage, 'view count', default=None)),
```

Code after:
        },
    }, {
        'url': 'https://rumble.com/search/video?q=rumble&sort=views',
        'playlist_mincount': 24,
        'info_dict': {
            'id': 'video?q=rumble&sort=views',
            'title': 'Search results for: rumble',
            'age_limit': 0,
        },
    }]

    def _real_extract(self, url):
        page_id = self._match_id(url)
        webpage = self._download_webpage(url, page_id)
        url_info = next(RumbleEmbedIE.extract_from_webpage(self._downloader, url, webpage), None)
        if not url_info:
            raise UnsupportedError(url)

        return {
            '_type': 'url_transparent',
            'ie_key': url_info['ie_key'],
            'url': url_info['url'],
            'release_timestamp': parse_iso8601(self._search_regex(
                r'(?:Livestream begins|Streamed on):\s+<time datetime="([^"]+)', webpage, 'release date', default=None)),
            'view_count': int_or_none(self._search_regex(
                r'"userInteractionCount"\s*:\s*(\d+)', webpage, 'view count', default=None)),
            'like_count': parse_count(self._search_regex(
                r'<span data-js="rumbles_up_votes">\s*([\d,.KM]+)', webpage, 'like count', default=None)),
            'dislike_count': parse_count(self._search_regex(
                r'<span data-js="rumbles_down_votes">\s*([\d,.KM]+)', webpage, 'dislike count', default=None)),
            'description': clean_html(get_element_by_class('media-description', webpage))
        }


class RumbleChannelIE(InfoExtractor):
    _VALID_URL = r'(?P<url>https?://(?:www\.)?rumble\.com/(?:c|user)/(?P<id>[^&?#$/]+))'

    _TESTS = [{
        'url': 'https://rumble.com/c/Styxhexenhammer666',
        'playlist_mincount': 1160,
        'info_dict': {
            'id': 'Styxhexenhammer666',
        },
    }, {
        'url': 'https://rumble.com/user/goldenpoodleharleyeuna',
        'playlist_mincount': 4,
        'info_dict': {
            'id': 'goldenpoodleharleyeuna',
        },
    }]