From: bashonly Date: Thu, 16 Feb 2023 14:51:45 +0000 (-0600) Subject: [extractor/youtube] Fix `uploader_id` extraction X-Git-Tag: 2023.02.17~22 X-Git-Url: https://jfr.im/git/yt-dlp.git/commitdiff_plain/149eb0bbf34fa8fdf8d1e2aa28e17479d099e26b [extractor/youtube] Fix `uploader_id` extraction Closes #6247 Authored by: bashonly --- diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 95ca52b3a..4dde4bbaa 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -4120,7 +4120,7 @@ def is_bad_format(fmt): 'thumbnail': traverse_obj(original_thumbnails, (-1, 'url')), 'description': video_description, 'uploader': get_first(video_details, 'author'), - 'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None, + 'uploader_id': self._search_regex(r'/(?:channel/|user/|@)([^/?&#]+)', owner_profile_url, 'uploader id', default=None), 'uploader_url': owner_profile_url, 'channel_id': channel_id, 'channel_url': format_field(channel_id, None, 'https://www.youtube.com/channel/%s'),