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

Code before:
            'timestamp': 1655490556,
            'modified_timestamp': 1655490556,
            'modified_date': '20220617',
        }
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        json_data = self._download_json(
            f'https://booyah.live/api/v3/playbacks/{video_id}', video_id,
            headers={'Booyah-Session-key': BooyahBaseIE._BOOYAH_SESSION_KEY})

        formats = []
        for video_data in json_data['playback']['endpoint_list']:
            formats.append({
                'url': video_data.get('stream_url'),
                'ext': 'mp4',
                'height': video_data.get('resolution'),
            })
            formats.append({
                'url': video_data.get('download_url'),
                'ext': 'mp4',
                'format_note': 'Watermarked',
                'height': video_data.get('resolution'),
                'preference': -10,
            })
        self._sort_formats(formats)

        return {
            'id': video_id,
            'title': traverse_obj(json_data, ('playback', 'name')),
            'thumbnail': traverse_obj(json_data, ('playback', 'thumbnail_url')),
            'formats': formats,
            'view_count': traverse_obj(json_data, ('playback', 'views')),
            'like_count': traverse_obj(json_data, ('playback', 'likes')),
            'duration': traverse_obj(json_data, ('playback', 'duration')),
            'comment_count': traverse_obj(json_data, ('playback', 'comment_cnt')),
            'channel_id': traverse_obj(json_data, ('playback', 'channel_id')),
            'uploader': traverse_obj(json_data, ('user', 'nickname')),
            'uploader_id': str_or_none(traverse_obj(json_data, ('user', 'uid'))),
            'comments': self._get_comment_data(video_id),
            'modified_timestamp': int_or_none(traverse_obj(json_data, ('playback', 'update_time_ms')), 1000),
            'timestamp': int_or_none(traverse_obj(json_data, ('playback', 'create_time_ms')), 1000),
        }


Review comment (suggestion):
```suggestion
            formats.extend(({
                'url': video_data.get('stream_url'),
                'ext': 'mp4',
                'height': video_data.get('resolution'),
            }, {
                'url': video_data.get('download_url'),
                'ext': 'mp4',
                'format_note': 'Watermarked',
                'height': video_data.get('resolution'),
                'preference': -10,
            }))
```

Code after:
            'modified_date': '20220617',
        }
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        json_data = self._download_json(
            f'https://booyah.live/api/v3/playbacks/{video_id}', video_id,
            headers={'Booyah-Session-key': self._BOOYAH_SESSION_KEY})

        formats = []
        for video_data in json_data['playback']['endpoint_list']:
            formats.extend(({
                'url': video_data.get('stream_url'),
                'ext': 'mp4',
                'height': video_data.get('resolution'),
            }, {
                'url': video_data.get('download_url'),
                'ext': 'mp4',
                'format_note': 'Watermarked',
                'height': video_data.get('resolution'),
                'preference': -10,
            }))
        self._sort_formats(formats)

        return {
            'id': video_id,
            'title': traverse_obj(json_data, ('playback', 'name')),
            'thumbnail': traverse_obj(json_data, ('playback', 'thumbnail_url')),
            'formats': formats,
            'view_count': traverse_obj(json_data, ('playback', 'views')),
            'like_count': traverse_obj(json_data, ('playback', 'likes')),
            'duration': traverse_obj(json_data, ('playback', 'duration')),
            'comment_count': traverse_obj(json_data, ('playback', 'comment_cnt')),
            'channel_id': traverse_obj(json_data, ('playback', 'channel_id')),
            'uploader': traverse_obj(json_data, ('user', 'nickname')),
            'uploader_id': str_or_none(traverse_obj(json_data, ('user', 'uid'))),
            'modified_timestamp': int_or_none(traverse_obj(json_data, ('playback', 'update_time_ms')), 1000),
            'timestamp': int_or_none(traverse_obj(json_data, ('playback', 'create_time_ms')), 1000),
            '__post_extractor': self.extract_comments(video_id, self._get_comments(video_id)),
        }