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

Code before:
                if stop_time is not None:
                    file = update_url_query(file, {'stopTime': stop_time})
                stream_id = self._search_regex(r'/o2/sejm/([^/]+)/[^./]+\.livx', file, 'stream id')
            common_info = {
                'url': file,
                'duration': duration,
            }
            if legacy_file:
                entries.append({
                    **common_info,
                    'id': video_id,
                    'title': title,
                })
            else:
                entries.append({
                    **common_info,
                    '_type': 'url_transparent',
                    'ie_key': RedCDNLivxIE.ie_key(),
                    'id': stream_id,
                    'title': f'{title} - {stream_id}',
                })

        cameras = self._search_json(
            r'var\s+cameras\s*=', frame, 'camera list', video_id,
            contains_pattern=r'\[(?s:.+)\]', transform_source=js_to_json,
            fatal=not self.get_param('ignore_no_formats_error')) or []
        for camera_file in traverse_obj(cameras, (..., 'file', {dict})):
            if camera_file.get('flv'):
                add_entry(camera_file['flv'])
            elif camera_file.get('mp4'):
                # this is only a thing in 7th term. no streams before, and starting 8th it's redcdn livx
                add_entry(camera_file['mp4'], legacy_file=True)
            else:
                self.report_warning('Unknown camera stream type found')

        if params.get('mig'):
            add_entry(self._search_regex(r"var sliUrl\s*=\s*'([^']+)'", frame, 'sign language interpreter url', fatal=False))

        return {
            '_type': 'playlist',
            'entries': entries,
            'id': video_id,
            'title': title,
            'description': clean_html(data.get('desc')) or None,
            'duration': duration,
            'live_status': live_status,
            'location': strip_or_none(data.get('location')),
        }


Review comment (suggestion):
IMO it's cleaner to just make this always non-fatal -- if there are no formats the user has not passed the param it will error upon return anyways
```suggestion
            fatal=False) or []
```

Code after:
                if stop_time is not None:
                    file = update_url_query(file, {'stopTime': stop_time})
                stream_id = self._search_regex(r'/o2/sejm/([^/]+)/[^./]+\.livx', file, 'stream id')
            common_info = {
                'url': file,
                'duration': duration,
            }
            if legacy_file:
                entries.append({
                    **common_info,
                    'id': video_id,
                    'title': title,
                })
            else:
                entries.append({
                    **common_info,
                    '_type': 'url_transparent',
                    'ie_key': RedCDNLivxIE.ie_key(),
                    'id': stream_id,
                    'title': join_nonempty(title, stream_id, delim=' - '),
                })

        cameras = self._search_json(
            r'var\s+cameras\s*=', frame, 'camera list', video_id,
            contains_pattern=r'\[(?s:.+)\]', transform_source=js_to_json,
            fatal=False) or []
        for camera_file in traverse_obj(cameras, (..., 'file', {dict})):
            if camera_file.get('flv'):
                add_entry(camera_file['flv'])
            elif camera_file.get('mp4'):
                # this is only a thing in 7th term. no streams before, and starting 8th it's redcdn livx
                add_entry(camera_file['mp4'], legacy_file=True)
            else:
                self.report_warning('Unknown camera stream type found')

        if params.get('mig'):
            add_entry(self._search_regex(r"var sliUrl\s*=\s*'([^']+)'", frame, 'sign language interpreter url', fatal=False))

        return {
            '_type': 'playlist',
            'entries': entries,
            'id': video_id,
            'title': title,
            'description': clean_html(data.get('desc')) or None,
            'duration': duration,
            'live_status': live_status,
            'location': strip_or_none(data.get('location')),
        }