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

Code before:

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

        title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
        video_e = self._html_search_regex(r'\|([a-z0-9]{60})\|', webpage, 'video')
        video_url = f'https://wurize.megaupload.to/{video_e}/v.mp4'
        duration = parse_duration(self._html_search_regex(
            r'<i\s*class=["\']fad\s*fa-clock["\']></i>\s*([\d:]+)\s*</div>', webpage, 'duration', fatal=False))
        filesize_approx = parse_filesize(self._html_search_regex(
            r'<i\s*class=["\']fad\s*fa-save["\']></i>\s*([^<]+)\s*</div>', webpage, 'filesize', fatal=False))
        extra_video_info = extract_attributes(self._html_search_regex(
            r'(<video[^>]+>)', webpage, 'video_info', fatal=False))
        description = self._html_search_meta('description', webpage)

        return {
            'id': video_id,
            'formats': [{
                'url': video_url,
                'duration': duration,
                'filesize_approx': filesize_approx,
                'width': int_or_none(extra_video_info.get('width')),
                'height': int_or_none(extra_video_info.get('height')),
                'format_id': extra_video_info.get('height', '') + 'p',
            }],
            'title': title,
            'description': description,
        }


Review comment (suggestion):
```suggestion
            'url': video_url,
            'duration': duration,
            'filesize_approx': filesize_approx,
            'width': int_or_none(extra_video_info.get('width')),
            'height': int_or_none(extra_video_info.get('height')),
            'format_id': extra_video_info.get('height', '') + 'p',
```

If you are setting `formats`, it should be passed though `_sort_formats` even if there is only one

Code after:

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

        title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
        video_e = self._html_search_regex(r'\|([a-z0-9]{60})\|', webpage, 'video')
        video_url = f'https://wurize.megaupload.to/{video_e}/v.mp4'
        duration = parse_duration(self._html_search_regex(
            r'<i\s*class=["\']fad\s*fa-clock["\']></i>\s*([\d:]+)\s*</div>', webpage, 'duration', fatal=False))
        filesize_approx = parse_filesize(self._html_search_regex(
            r'<i\s*class=["\']fad\s*fa-save["\']></i>\s*([^<]+)\s*</div>', webpage, 'filesize', fatal=False))
        extra_video_info = extract_attributes(self._html_search_regex(
            r'(<video[^>]+>)', webpage, 'video_info', fatal=False))
        description = self._html_search_meta('description', webpage)

        return {
            'id': video_id,
            'url': video_url,
            'duration': duration,
            'filesize_approx': filesize_approx,
            'width': int_or_none(extra_video_info.get('width')),
            'height': int_or_none(extra_video_info.get('height')),
            'format_id': extra_video_info.get('height', '') + 'p',
            'title': title,
            'description': description,
        }