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

Code before:
)


class EplusIbIE(InfoExtractor):
    _NETRC_MACHINE = 'eplus'
    IE_NAME = 'eplus'
    IE_DESC = 'e+ (イープラス)'
    _VALID_URL = [r'https?://live\.eplus\.jp/ex/player\?ib=(?P<id>(?:\w|%2B|%2F){86}%3D%3D)',
                  r'https?://live\.eplus\.jp/(?P<id>sample|\d+)']
    _TESTS = [{
        'url': 'https://live.eplus.jp/ex/player?ib=41K6Wzbr3PlcMD%2FOKHFlC%2FcZCe2Eaw7FK%2BpJS1ooUHki8d0vGSy2mYqxillQBe1dSnOxU%2B8%2FzXKls4XPBSb3vw%3D%3D',
        'info_dict': {
            'id': '335699-0001-006',
            'title': '少女☆歌劇 レヴュースタァライト -The LIVE 青嵐- BLUE GLITTER <定点映像配信>【Streaming+(配信)】',
            'live_status': 'was_live',
            'release_date': '20201221',
            'release_timestamp': 1608544800,
        },
        'params': {
            'skip_download': True,
            'ignore_no_formats_error': True,
        },
        'expected_warnings': [
            'Could not find the playlist URL. This event may not be accessible',
            'No video formats found!',
            'Requested format is not available',
        ],
    }, {
        'url': 'https://live.eplus.jp/ex/player?ib=6QSsQdyRAwOFZrEHWlhRm7vocgV%2FO0YzBZ%2BaBEBg1XR%2FmbLn0R%2F048dUoAY038%2F%2F92MJ73BsoAtvUpbV6RLtDQ%3D%3D&show_id=2371511',
        'info_dict': {
            'id': '348021-0054-001',
            'title': 'ラブライブ!スーパースター!! Liella! First LoveLive! Tour ～Starlines～【東京/DAY.1】',
            'live_status': 'was_live',
            'release_date': '20220115',
            'release_timestamp': 1642233600,
            'description': str,
        },
        'params': {
            'skip_download': True,
            'ignore_no_formats_error': True,
        },
        'expected_warnings': [
            'Could not find the playlist URL. This event may not be accessible',
            'No video formats found!',
            'Requested format is not available',
        ],
    }, {
        'url': 'https://live.eplus.jp/sample',
        'info_dict': {
            'id': 'stream1ng20210719-test-005',
            'title': 'Online streaming test for DRM',

Review comment (suggestion):
`expected_warnings` are checked w/ regex, so we can trim these down a bit
```suggestion
            'This event may not be accessible',
            'No video formats found',
            'Requested format is not available',
```

Code after:
)


class EplusIbIE(InfoExtractor):
    _NETRC_MACHINE = 'eplus'
    IE_NAME = 'eplus'
    IE_DESC = 'e+ (イープラス)'
    _VALID_URL = [r'https?://live\.eplus\.jp/ex/player\?ib=(?P<id>(?:\w|%2B|%2F){86}%3D%3D)',
                  r'https?://live\.eplus\.jp/(?P<id>sample|\d+)']
    _TESTS = [{
        'url': 'https://live.eplus.jp/ex/player?ib=41K6Wzbr3PlcMD%2FOKHFlC%2FcZCe2Eaw7FK%2BpJS1ooUHki8d0vGSy2mYqxillQBe1dSnOxU%2B8%2FzXKls4XPBSb3vw%3D%3D',
        'info_dict': {
            'id': '335699-0001-006',
            'title': '少女☆歌劇 レヴュースタァライト -The LIVE 青嵐- BLUE GLITTER <定点映像配信>【Streaming+(配信)】',
            'live_status': 'was_live',
            'release_date': '20201221',
            'release_timestamp': 1608544800,
        },
        'params': {
            'skip_download': True,
            'ignore_no_formats_error': True,
        },
        'expected_warnings': [
            'This event may not be accessible',
            'No video formats found',
            'Requested format is not available',
        ],
    }, {
        'url': 'https://live.eplus.jp/ex/player?ib=6QSsQdyRAwOFZrEHWlhRm7vocgV%2FO0YzBZ%2BaBEBg1XR%2FmbLn0R%2F048dUoAY038%2F%2F92MJ73BsoAtvUpbV6RLtDQ%3D%3D&show_id=2371511',
        'info_dict': {
            'id': '348021-0054-001',
            'title': 'ラブライブ!スーパースター!! Liella! First LoveLive! Tour ～Starlines～【東京/DAY.1】',
            'live_status': 'was_live',
            'release_date': '20220115',
            'release_timestamp': 1642233600,
            'description': str,
        },
        'params': {
            'skip_download': True,
            'ignore_no_formats_error': True,
        },
        'expected_warnings': [
            'Could not find the playlist URL. This event may not be accessible',
            'No video formats found!',
            'Requested format is not available',
        ],
    }, {
        'url': 'https://live.eplus.jp/sample',
        'info_dict': {
            'id': 'stream1ng20210719-test-005',
            'title': 'Online streaming test for DRM',