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

Code before:
                is_private='Private' in labels,
                needs_subscription='Friends only' in labels,
                is_unlisted='Followers only' in labels),
            '_format_sort_fields': ('quality', 'codec', 'size', 'br'),
        }

    def _parse_aweme_video_web(self, aweme_detail, webpage_url, video_id):
        video_info = aweme_detail['video']
        author_info = traverse_obj(aweme_detail, 'authorInfo', 'author', expected_type=dict, default={})
        music_info = aweme_detail.get('music') or {}
        stats_info = aweme_detail.get('stats') or {}
        channel_id = traverse_obj(author_info or aweme_detail, (('authorSecId', 'secUid'), {str}), get_all=False)
        user_url = self._UPLOADER_URL_FORMAT % channel_id if channel_id else None

        formats = []
        width = int_or_none(video_info.get('width'))
        height = int_or_none(video_info.get('height'))

        if ("tiktok" in webpage_url):
            for play_url in traverse_obj(video_info, ('playAddr', ((..., 'src'), None), {url_or_none})):
                formats.append({
                    'url': self._proto_relative_url(play_url),
                    'ext': 'mp4',
                    'width': width,
                    'height': height,
                })

            for download_url in traverse_obj(video_info, (('downloadAddr', ('download', 'url')), {url_or_none})):
                formats.append({
                    'format_id': 'download',
                    'url': self._proto_relative_url(download_url),
                    'ext': 'mp4',
                    'width': width,
                    'height': height,
                })

        else:
            for play_url in traverse_obj(video_info, ('play_addr', 'url_list', ...)):
                formats.append({
                    'url': play_url,
                    'ext': 'mp4',
                    'width': width,
                    'height': height,
                })

            for download_url in traverse_obj(video_info, ('download_addr', 'url_list', ...)):
                formats.append({
                    'format_id': 'download',
                    'url': download_url,
                    'ext': 'mp4',
                    'width': width,

Review comment (suggestion):
revert
```suggestion
        for play_url in traverse_obj(video_info, ('playAddr', ((..., 'src'), None), {url_or_none})):
            formats.append({
                'url': self._proto_relative_url(play_url),
                'ext': 'mp4',
                'width': width,
                'height': height,
            })
```

Code after:
                needs_subscription='Friends only' in labels,
                is_unlisted='Followers only' in labels),
            '_format_sort_fields': ('quality', 'codec', 'size', 'br'),
        }

    def _parse_aweme_video_web(self, aweme_detail, webpage_url, video_id):
        video_info = aweme_detail['video']
        author_info = traverse_obj(aweme_detail, 'authorInfo', 'author', expected_type=dict, default={})
        music_info = aweme_detail.get('music') or {}
        stats_info = aweme_detail.get('stats') or {}
        channel_id = traverse_obj(author_info or aweme_detail, (('authorSecId', 'secUid'), {str}), get_all=False)
        user_url = self._UPLOADER_URL_FORMAT % channel_id if channel_id else None

        formats = []
        width = int_or_none(video_info.get('width'))
        height = int_or_none(video_info.get('height'))

        for play_url in traverse_obj(video_info, ('playAddr', ((..., 'src'), None), {url_or_none})):
            formats.append({
                'url': self._proto_relative_url(play_url),
                'ext': 'mp4',
                'width': width,
                'height': height,
            })

        for download_url in traverse_obj(video_info, (('downloadAddr', ('download', 'url')), {url_or_none})):
            formats.append({
                'format_id': 'download',
                'url': self._proto_relative_url(download_url),
                'ext': 'mp4',
                'width': width,
                'height': height,
            })

        self._remove_duplicate_formats(formats)

        thumbnails = []
        for thumb_url in traverse_obj(aweme_detail, (
                (None, 'video'), ('thumbnail', 'cover', 'dynamicCover', 'originCover'), {url_or_none})):
            thumbnails.append({
                'url': self._proto_relative_url(thumb_url),
                'width': width,
                'height': height,
            })

        return {
            'id': video_id,
            **traverse_obj(aweme_detail, {
                'title': ('desc', {str}),
                'description': ('desc', {str}),
                'duration': ('video', 'duration', {int_or_none}),