From 28cbe18a1821249276846b7e262184a0f1c43c30 Mon Sep 17 00:00:00 2001 From: Gabriel Ayala <52719903+LentilStew@users.noreply.github.com> Date: Sat, 18 Feb 2023 01:38:43 -0300 Subject: [PATCH] youtube channel urls can also be @channelname an example this https://www.youtube.com/channel/UCKjaXKTMQMgpyac7WsnNrKw and https://www.youtube.com/@alangomezok are the same, it also crashed because it didn't match, the old url template, but it looks like that is already fixed hope this helps, my first proposed change :) --- youtube_dl/extractor/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 66b0257df..715d534de 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -2123,7 +2123,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): or search_meta('uploadDate')), 'uploader': video_details['author'], 'uploader_id': self._search_regex( - r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, + r'/(?:(?:channel|user)/|@)([^/?&#]+)', owner_profile_url, 'uploader id', fatal=False) if owner_profile_url else None, 'uploader_url': owner_profile_url, 'channel_id': channel_id,