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

Code before:
            'duration': int_or_none(video_data.get('duration')),
            'chapters': sorted(traverse_obj(config, (
                'embed', 'chapters', lambda _, v: int(v['timecode']) is not None, {
                    'title': ('title', {str}),
                    'start_time': ('timecode', {int_or_none}),
                })), key=lambda c: c['start_time']) or None,
            'formats': formats,
            'subtitles': subtitles,
            'live_status': live_status,
            'release_timestamp': traverse_obj(live_event, ('ingest', 'scheduled_start_time', {parse_iso8601})),
            # Note: Bitrates are completely broken. Single m3u8 may contain entries in kbps and bps
            # at the same time without actual units specified.
            '_format_sort_fields': ('quality', 'res', 'fps', 'hdr:12', 'source'),
        }

    def _call_videos_api(self, video_id, jwt_token, unlisted_hash=None, **kwargs):
        return self._download_json(
            join_nonempty(f'https://api.vimeo.com/videos/{video_id}', unlisted_hash, delim=':'),
            video_id, 'Downloading API JSON', headers={
                'Authorization': f'jwt {jwt_token}',
                'Accept': 'application/json',
            }, query={
                'fields': ','.join((
                    'config_url', 'created_time', 'description', 'download', 'license',
                    'metadata.connections.comments.total', 'metadata.connections.likes.total',
                    'release_time,stats.plays')),
            }, **kwargs)

    def _extract_original_format(self, url, video_id, unlisted_hash=None, jwt=None, api_data=None):
        # Original/source formats are only available when logged in
        if not self._get_cookies('https://vimeo.com/').get('is_logged_in'):
            return

        query = {'action': 'load_download_config'}
        if unlisted_hash:
            query['unlisted_hash'] = unlisted_hash
        download_data = self._download_json(
            url, video_id, 'Loading download config JSON', fatal=False,
            query=query, headers={'X-Requested-With': 'XMLHttpRequest'},
            expected_status=(403, 404)) or {}
        source_file = download_data.get('source_file')
        download_url = try_get(source_file, lambda x: x['download_url'])
        if download_url and not source_file.get('is_cold') and not source_file.get('is_defrosting'):
            source_name = source_file.get('public_name', 'Original')
            if self._is_valid_url(download_url, video_id, f'{source_name} video'):
                ext = (try_get(
                    source_file, lambda x: x['extension'],
                    str) or determine_ext(
                    download_url, None) or 'mp4').lower()
                return {
                    'url': download_url,

Review comment (suggestion):
```suggestion
                    'release_time', 'stats.plays')),
```

Code after:
            'duration': int_or_none(video_data.get('duration')),
            'chapters': sorted(traverse_obj(config, (
                'embed', 'chapters', lambda _, v: int(v['timecode']) is not None, {
                    'title': ('title', {str}),
                    'start_time': ('timecode', {int_or_none}),
                })), key=lambda c: c['start_time']) or None,
            'formats': formats,
            'subtitles': subtitles,
            'live_status': live_status,
            'release_timestamp': traverse_obj(live_event, ('ingest', 'scheduled_start_time', {parse_iso8601})),
            # Note: Bitrates are completely broken. Single m3u8 may contain entries in kbps and bps
            # at the same time without actual units specified.
            '_format_sort_fields': ('quality', 'res', 'fps', 'hdr:12', 'source'),
        }

    def _call_videos_api(self, video_id, jwt_token, unlisted_hash=None, **kwargs):
        return self._download_json(
            join_nonempty(f'https://api.vimeo.com/videos/{video_id}', unlisted_hash, delim=':'),
            video_id, 'Downloading API JSON', headers={
                'Authorization': f'jwt {jwt_token}',
                'Accept': 'application/json',
            }, query={
                'fields': ','.join((
                    'config_url', 'created_time', 'description', 'download', 'license',
                    'metadata.connections.comments.total', 'metadata.connections.likes.total',
                    'release_time', 'stats.plays')),
            }, **kwargs)

    def _extract_original_format(self, url, video_id, unlisted_hash=None, jwt=None, api_data=None):
        # Original/source formats are only available when logged in
        if not self._get_cookies('https://vimeo.com/').get('is_logged_in'):
            return

        query = {'action': 'load_download_config'}
        if unlisted_hash:
            query['unlisted_hash'] = unlisted_hash
        download_data = self._download_json(
            url, video_id, 'Loading download config JSON', fatal=False,
            query=query, headers={'X-Requested-With': 'XMLHttpRequest'},
            expected_status=(403, 404)) or {}
        source_file = download_data.get('source_file')
        download_url = try_get(source_file, lambda x: x['download_url'])
        if download_url and not source_file.get('is_cold') and not source_file.get('is_defrosting'):
            source_name = source_file.get('public_name', 'Original')
            if self._is_valid_url(download_url, video_id, f'{source_name} video'):
                ext = (try_get(
                    source_file, lambda x: x['extension'],
                    str) or determine_ext(
                    download_url, None) or 'mp4').lower()
                return {
                    'url': download_url,