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

Code before:
        formats, subtitles = self._get_formats_and_subtitle(video_link_url, video_id)

        return {
            'id': video_id,
            'url': video_link_url,
            'title': remove_end(self._html_extract_title(webpage).replace('\n', ''), 'Chinese homemade video').strip(),
            'formats': formats,
            'subtitles': subtitles,
            # 'ext': 'mp4', # Include this so files are named *.mp4 instead of *.m3u8
            'upload_date': unified_strdate(self._search_regex(
                r'<span\s+class=["\']title-yakov["\']>(\d{4}-\d{2}-\d{2})</span>', webpage, 'upload_date', fatal=False)),
            'description': self._html_search_regex(
                r'<span\s+class=["\']more title["\']>\s*([^<]+)', webpage, 'description', fatal=False),
            'duration': parse_duration(self._search_regex(
                r'时长:\s*<span[^>]*>\s*(\d+(?::\d+){1,2})', webpage, 'duration', fatal=False)),
            'comment_count': int_or_none(self._search_regex(
                r'留言:\s*<span[^>]*>\s*(\d+)\s*</span>', webpage, 'comment count', fatal=False)),
            'view_count': int_or_none(self._search_regex(
                r'热度:\s*<span[^>]*>\s*(\d+)\s*</span>', webpage, 'view count', fatal=False)),
            'age_limit': 18,
        }

    def _get_formats_and_subtitle(self, video_link_url, video_id):
        ext = determine_ext(video_link_url)
        if ext == 'm3u8':
            formats, subtitles = self._extract_m3u8_formats_and_subtitles(video_link_url, video_id)
        else:
            formats = [{'url': video_link_url, 'ext': ext}]
            subtitles = {}

        return formats, subtitles


Review comment (refactor):
```suggestion
            formats, subtitles = self._extract_m3u8_formats_and_subtitles(video_link_url, video_id, ext='mp4')
```
This should fix any issues you are having with ext

Code after:
        formats, subtitles = self._get_formats_and_subtitle(video_link_url, video_id)

        return {
            'id': video_id,
            'title': remove_end(self._html_extract_title(webpage).replace('\n', ''), 'Chinese homemade video').strip(),
            'formats': formats,
            'subtitles': subtitles,
            'upload_date': unified_strdate(self._search_regex(
                r'<span\s+class=["\']title-yakov["\']>(\d{4}-\d{2}-\d{2})</span>', webpage, 'upload_date', fatal=False)),
            'description': self._html_search_regex(
                r'<span\s+class=["\']more title["\']>\s*([^<]+)', webpage, 'description', fatal=False),
            'duration': parse_duration(self._search_regex(
                r'时长:\s*<span[^>]*>\s*(\d+(?::\d+){1,2})', webpage, 'duration', fatal=False)),
            'comment_count': int_or_none(self._search_regex(
                r'留言:\s*<span[^>]*>\s*(\d+)\s*</span>', webpage, 'comment count', fatal=False)),
            'view_count': int_or_none(self._search_regex(
                r'热度:\s*<span[^>]*>\s*(\d+)\s*</span>', webpage, 'view count', fatal=False)),
            'age_limit': 18,
        }

    def _get_formats_and_subtitle(self, video_link_url, video_id):
        ext = determine_ext(video_link_url)
        if ext == 'm3u8':
            formats, subtitles = self._extract_m3u8_formats_and_subtitles(video_link_url, video_id, ext='mp4')
        else:
            formats = [{'url': video_link_url, 'ext': ext}]
            subtitles = {}

        return formats, subtitles