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

Code before:
            self._merge_subtitles({
                'de': [
                    {
                        'url': subtitle_url,
                        'ext': f'{subtitle_type}',
                    }
                ],
            }, target=subtitles)

        age_classification = traverse_obj(api_json, ('age_classification'), {str})
        age_limit = None
        if isinstance(age_classification, str) and len(age_classification) != 0:
            # age_classification is in the format `<age:int>+`
            # example: "6+" or "18+"
            age_limit_str = age_classification[:-1]
            if age_limit_str.isdigit():
                age_limit = int(age_limit_str)

        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, display_id = self._match_valid_url(url).group('id', 'slug')
        if display_id is None:
            display_id = video_id
        webpage = self._download_webpage(url, display_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, display_id, fatal=False),
            **self._extract_video(video_id, display_id),
        }


Review comment (suggestion):
I think you can just use `parse_age_limit` from `..utils`
If you can, just inline this in to the `traverse_obj` call below.

Code after:
                    fmts, subs = self._extract_m3u8_formats_and_subtitles(
                        manifest_url, video_id, fatal=False, m3u8_id='hls')
                elif manifest_type == 'dash':
                    fmts, subs = self._extract_mpd_formats_and_subtitles(
                        manifest_url, video_id, fatal=False, mpd_id='dash')
                else:
                    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),
        }