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

Code before:

class BrilliantpalaElearnIE(BrilliantpalaIE):
    IE_NAME = 'Brilliantpala:Elearn'
    IE_DESC = 'VoD on elearn.brilliantpala.org'
    _VALID_URL = r'https?://elearn\.brilliantpala\.org/courses/(?P<course_id>\d+)/contents/(?P<content_id>\d+)/?'
    _TESTS = [{
        'url': 'https://elearn.brilliantpala.org/courses/42/contents/12345/',
        'only_matching': True,
    }, {
        'url': 'https://elearn.brilliantpala.org/courses/98/contents/36683/',
        'info_dict': {
            'id': '23577',
            'ext': 'mp4',
            'title': 'Physical World, Units and Measurements  - 1',
            'thumbnail': 'https://d1j3vi2u94ebt0.cloudfront.net/institute/brilliantpalalms/chapter_contents/26237/e657f81b90874be19795c7ea081f8d5c.png',
            'live_status': 'not_live',
        },
        'params': {
            'skip_download': True,
        },
    }]

    _DOMAIN = BrilliantpalaIE._DOMAIN.format(subdomain='elearn')


class BrilliantpalaClassesIE(BrilliantpalaIE):
    IE_NAME = 'Brilliantpala:Classes'
    IE_DESC = 'VoD on classes.brilliantpala.org'
    _VALID_URL = r'https?://classes\.brilliantpala\.org/courses/(?P<course_id>\d+)/contents/(?P<content_id>\d+)/?'
    _TESTS = [{
        'url': 'https://classes.brilliantpala.org/courses/42/contents/12345/',
        'only_matching': True,
    }, {
        'url': 'https://classes.brilliantpala.org/courses/416/contents/25445/',
        'info_dict': {
            'id': '9128',
            'ext': 'mp4',
            'title': 'Motion in a Straight Line - Class 1',
            'thumbnail': 'https://d3e4y8hquds3ek.cloudfront.net/institute/brilliantpalaelearn/chapter_contents/ff5ba838d0ec43419f67387fe1a01fa8.png',
            'live_status': 'not_live',
        },
        'params': {
            'skip_download': True,
        },
    }]

    _DOMAIN = BrilliantpalaIE._DOMAIN.format(subdomain='classes')


Review comment (suggestion):
```suggestion
class BrilliantpalaClassesIE(BrilliantpalaBaseIE):
```

Code after:


class BrilliantpalaElearnIE(BrilliantpalaBaseIE):
    IE_NAME = 'Brilliantpala:Elearn'
    IE_DESC = 'VoD on elearn.brilliantpala.org'
    _VALID_URL = r'https?://elearn\.brilliantpala\.org/courses/(?P<course_id>\d+)/contents/(?P<content_id>\d+)/?'
    _TESTS = [{
        'url': 'https://elearn.brilliantpala.org/courses/42/contents/12345/',
        'only_matching': True,
    }, {
        'url': 'https://elearn.brilliantpala.org/courses/98/contents/36683/',
        'info_dict': {
            'id': '23577',
            'ext': 'mp4',
            'title': 'Physical World, Units and Measurements  - 1',
            'thumbnail': 'https://d1j3vi2u94ebt0.cloudfront.net/institute/brilliantpalalms/chapter_contents/26237/e657f81b90874be19795c7ea081f8d5c.png',
            'live_status': 'not_live',
        },
        'params': {
            'skip_download': True,
        },
    }]

    _DOMAIN = BrilliantpalaBaseIE._DOMAIN.format(subdomain='elearn')


class BrilliantpalaClassesIE(BrilliantpalaBaseIE):
    IE_NAME = 'Brilliantpala:Classes'
    IE_DESC = 'VoD on classes.brilliantpala.org'
    _VALID_URL = r'https?://classes\.brilliantpala\.org/courses/(?P<course_id>\d+)/contents/(?P<content_id>\d+)/?'
    _TESTS = [{
        'url': 'https://classes.brilliantpala.org/courses/42/contents/12345/',
        'only_matching': True,
    }, {
        'url': 'https://classes.brilliantpala.org/courses/416/contents/25445/',
        'info_dict': {
            'id': '9128',
            'ext': 'mp4',
            'title': 'Motion in a Straight Line - Class 1',
            'thumbnail': 'https://d3e4y8hquds3ek.cloudfront.net/institute/brilliantpalaelearn/chapter_contents/ff5ba838d0ec43419f67387fe1a01fa8.png',
            'live_status': 'not_live',
        },
        'params': {
            'skip_download': True,
        },
    }]

    _DOMAIN = BrilliantpalaBaseIE._DOMAIN.format(subdomain='classes')