File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,8 @@ def channel_name(url: str) -> str:
187
187
188
188
- :samp:`https://youtube.com/c/{channel_name}/*`
189
189
- :samp:`https://youtube.com/channel/{channel_id}/*
190
+ - :samp:`https://youtube.com/u/{channel_name}/*`
191
+ - :samp:`https://youtube.com/user/{channel_id}/*
190
192
191
193
:param str url:
192
194
A YouTube url containing a channel name.
@@ -196,7 +198,9 @@ def channel_name(url: str) -> str:
196
198
"""
197
199
patterns = [
198
200
r"(?:\/(c)\/([\d\w_\-]+)(\/.*)?)" ,
199
- r"(?:\/(channel)\/([\w\d_\-]+)(\/.*)?)"
201
+ r"(?:\/(channel)\/([\w\d_\-]+)(\/.*)?)" ,
202
+ r"(?:\/(u)\/([\d\w_\-]+)(\/.*)?)" ,
203
+ r"(?:\/(user)\/([\w\d_\-]+)(\/.*)?)"
200
204
]
201
205
for pattern in patterns :
202
206
regex = re .compile (pattern )
You can’t perform that action at this time.
0 commit comments