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

Code before:
                    continue
                formats.extend(fmts)
                self._merge_subtitles(subs, target=subtitles)

        for subtitle_type in ['vtt']:  # not working formats 'xml', 'srt', 'sami', 'ttml', 'stl'
            subtitle_url = traverse_obj(api_json, ('_embedded', 'subtitle', f'{subtitle_type}_url'), {str})
            if subtitle_url is None:
                continue
            self._merge_subtitles({
                'de': [
                    {
                        'url': subtitle_url,
                        'ext': f'{subtitle_type}',
                    }
                ],
            }, target=subtitles)

        age_classification = traverse_obj(api_json, ('age_classification'), {str})
        age_limit = parse_age_limit(age_classification)

        return {
            'id': video_id,
            'formats': formats,
            'subtitles': subtitles,
            'age_limit': age_limit,
            **traverse_obj(api_json, {
                'duration': ('duration_second', {float_or_none}),
                'title': (('title', 'headline'), {str}),
                'description': (('description', 'teaser_text'), {str}),
                'media_type': ('video_type', {str}),
            }, get_all=False),
        }

    def _real_extract(self, url):
        video_id = self._match_valid_url(url).group('id')
        webpage = self._download_webpage(url, video_id)

        return {
            'id': video_id,
            'title': self._html_search_meta(['og:title', 'twitter:title'], webpage, default=None),
            'description': self._html_search_meta(
                ['description', 'og:description', 'twitter:description'], webpage, default=None),
            **self._search_json_ld(webpage, video_id, fatal=False),
            **self._extract_video(video_id),
        }


Review comment (suggestion):
You can just inline this:
```suggestion
            **traverse_obj(api_json, {
                'age_limit': ('age_classification', {parse_age_limit}),
```

Code after:
                    continue
                formats.extend(fmts)
                self._merge_subtitles(subs, target=subtitles)

        for sub_url in traverse_obj(api_json, (
                '_embedded', 'subtitle',
                ('xml_url', 'sami_url', 'stl_url', 'ttml_url', 'srt_url', 'vtt_url'), {url_or_none})):
            self._merge_subtitles({'de': [{'url': sub_url}]}, target=subtitles)

        return {
            'id': video_id,
            'formats': formats,
            'subtitles': subtitles,
            **traverse_obj(api_json, {
                'age_limit': ('age_classification', {parse_age_limit}),
                'duration': ('duration_second', {float_or_none}),
                'title': (('title', 'headline'), {str}),
                'description': (('description', 'teaser_text'), {str}),
                'media_type': ('video_type', {str}),
            }, get_all=False),
        }

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id)

        return {
            'id': video_id,
            'title': self._html_search_meta(['og:title', 'twitter:title'], webpage, default=None),
            'description': self._html_search_meta(
                ['description', 'og:description', 'twitter:description'], webpage, default=None),
            **self._search_json_ld(webpage, video_id, fatal=False),
            **self._extract_video(video_id),
        }