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

Code before:
class ParamountPlusIE(CBSBaseIE):
    _VALID_URL = r'''(?x)
        (?:
            paramountplus:|
            https?://(?:www\.)?(?:
                paramountplus\.com/(?:shows|movies)/(?:video|[^/]+/video|[^/]+)/
        )(?P<id>[\w-]+))'''

    # All tests are blocked outside US
    _TESTS = [{
        'url': 'https://www.paramountplus.com/shows/video/Oe44g5_NrlgiZE3aQVONleD6vXc8kP0k/',
        'info_dict': {
            'id': 'Oe44g5_NrlgiZE3aQVONleD6vXc8kP0k',
            'ext': 'mp4',
            'title': 'CatDog - Climb Every CatDog/The Canine Mutiny',
            'description': 'md5:7ac835000645a69933df226940e3c859',
            'duration': 1426,
            'timestamp': 920264400,
            'upload_date': '19990301',
            'uploader': 'CBSI-NEW',
            'episode_number': 5,
            'thumbnail': r're:https?://.+\.jpg$',
            'season': 'Season 2',
            'chapters': [{'start_time': 0.0, 'end_time': 714.0, 'title': '<Untitled Chapter 1>'},
                {'start_time': 714.0, 'end_time': 1377.0, 'title': '<Untitled Chapter 2>'},
                {'start_time': 1377.0, 'end_time': 1418.0, 'title': '<Untitled Chapter 3>'}],
            'episode': 'Episode 5',
            'season_number': 2,
            'series': 'CatDog',
        },
        'params': {
            'skip_download': 'm3u8',
        },
        'expected_warnings': ['Ignoring subtitle tracks'],  # TODO: Investigate this
    }, {
        'url': 'https://www.paramountplus.com/shows/video/6hSWYWRrR9EUTz7IEe5fJKBhYvSUfexd/',
        'info_dict': {
            'id': '6hSWYWRrR9EUTz7IEe5fJKBhYvSUfexd',
            'ext': 'mp4',
            'title': '7/23/21 WEEK IN REVIEW (Rep. Jahana Hayes/Howard Fineman/Sen. Michael Bennet/Sheera Frenkel & Cecilia Kang)',
            'description': 'md5:f4adcea3e8b106192022e121f1565bae',
            'duration': 2506,
            'timestamp': 1627063200,
            'upload_date': '20210723',
            'uploader': 'CBSI-NEW',
            'episode_number': 81,
            'thumbnail': r're:https?://.+\.jpg$',
            'season': 'Season 2',
            'chapters': [{'start_time': 0, 'end_time': 745.0, 'title': '<Untitled Chapter 1>'},
                {'start_time': 745.0, 'end_time': 1364.0, 'title': '<Untitled Chapter 2>'},
                {'start_time': 1364.0, 'end_time': 1892.0, 'title': '<Untitled Chapter 3>'},

Review comment (suggestion):
```suggestion
            'chapters': 'count:3',
```
is sufficient imo

Code after:

class ParamountPlusIE(CBSBaseIE):
    _VALID_URL = r'''(?x)
        (?:
            paramountplus:|
            https?://(?:www\.)?(?:
                paramountplus\.com/(?:shows|movies)/(?:video|[^/]+/video|[^/]+)/
        )(?P<id>[\w-]+))'''

    # All tests are blocked outside US
    _TESTS = [{
        'url': 'https://www.paramountplus.com/shows/video/Oe44g5_NrlgiZE3aQVONleD6vXc8kP0k/',
        'info_dict': {
            'id': 'Oe44g5_NrlgiZE3aQVONleD6vXc8kP0k',
            'ext': 'mp4',
            'title': 'CatDog - Climb Every CatDog/The Canine Mutiny',
            'description': 'md5:7ac835000645a69933df226940e3c859',
            'duration': 1426,
            'timestamp': 920264400,
            'upload_date': '19990301',
            'uploader': 'CBSI-NEW',
            'episode_number': 5,
            'thumbnail': r're:https?://.+\.jpg$',
            'season': 'Season 2',
            'chapters': 'count:3',
            'episode': 'Episode 5',
            'season_number': 2,
            'series': 'CatDog',
        },
        'params': {
            'skip_download': 'm3u8',
        },
        'expected_warnings': ['Ignoring subtitle tracks'],  # TODO: Investigate this
    }, {
        'url': 'https://www.paramountplus.com/shows/video/6hSWYWRrR9EUTz7IEe5fJKBhYvSUfexd/',
        'info_dict': {
            'id': '6hSWYWRrR9EUTz7IEe5fJKBhYvSUfexd',
            'ext': 'mp4',
            'title': '7/23/21 WEEK IN REVIEW (Rep. Jahana Hayes/Howard Fineman/Sen. Michael Bennet/Sheera Frenkel & Cecilia Kang)',
            'description': 'md5:f4adcea3e8b106192022e121f1565bae',
            'duration': 2506,
            'timestamp': 1627063200,
            'upload_date': '20210723',
            'uploader': 'CBSI-NEW',
            'episode_number': 81,
            'thumbnail': r're:https?://.+\.jpg$',
            'season': 'Season 2',
            'chapters': 'count:4',
            'episode': 'Episode 81',
            'season_number': 2,
            'series': 'Tooning Out The News',