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

Code before:
                'upload_date': '20220716',
                'duration': 1267,
                'uploader': 'Mahesh Chookolingo',
                'uploader_id': 'maheshchookolingo',
                'uploader_url': 'http://www.youtube.com/user/maheshchookolingo',
                'channel': 'Mahesh Chookolingo',
                'channel_id': 'UCox6YeMSY1PQInbCtTaZj_w',
                'channel_url': 'https://www.youtube.com/channel/UCox6YeMSY1PQInbCtTaZj_w',
                'categories': ['Entertainment'],
                'tags': list,
                'availability': 'public',
                'live_status': 'not_live',
                'view_count': int,
                'comment_count': int,
                'like_count': int,
                'channel_follower_count': int,
                'age_limit': 0,
                'playable_in_embed': True,
            },
        },
    ]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        data = self._download_json(
            'https://api.parler.com/v0/public/parleys/%s' % video_id, video_id)['data']

        if data.get('link'):
            return self.url_result(data.get('link'), YoutubeIE)

        return {
            'id': video_id,
            **traverse_obj(data, {
                'url': ('video', 'videoSrc'),
                'thumbnail': ('video', 'thumbnailUrl'),
                'title': ('title', {strip_or_none}),
                'description': ('body', {clean_html}, {lambda x: x if x else None}),
                'timestamp': ('date_created', {unified_timestamp}),
                'uploader': ('user', 'name', {strip_or_none}),
                'uploader_id': ('user', 'username', {str}),
                'uploader_url': ('user', 'username', {lambda x: urljoin('https://parler.com/', x)}),
                'view_count': ('views', {int_or_none}),
                'comment_count': ('total_comments', {int_or_none}),
                'repost_count': ('echos', {int_or_none}),
            })
        }


Review comment (suggestion):
```suggestion
            f'https://api.parler.com/v0/public/parleys/{video_id}', video_id)['data']
```

Code after:
                'uploader_url': 'http://www.youtube.com/@maheshchookolingo',
            },
        },
    ]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        data = self._download_json(f'https://api.parler.com/v0/public/parleys/{video_id}',
                                   video_id)['data']
        if data.get('link'):
            return self.url_result(data['link'], YoutubeIE)

        return {
            'id': video_id,
            'title': strip_or_none(data.get('title')) or '',
            **traverse_obj(data, {
                'url': ('video', 'videoSrc'),
                'thumbnail': ('video', 'thumbnailUrl'),
                'description': ('body', {clean_html}),
                'timestamp': ('date_created', {unified_timestamp}),
                'uploader': ('user', 'name', {strip_or_none}),
                'uploader_id': ('user', 'username', {str}),
                'uploader_url': ('user', 'username', {functools.partial(urljoin, 'https://parler.com/')}),
                'view_count': ('views', {int_or_none}),
                'comment_count': ('total_comments', {int_or_none}),
                'repost_count': ('echos', {int_or_none}),
            })
        }