@ -22,9 +22,21 @@ DataType: TypeAlias = Dict
class YouTubeCollectionExtractor(CollectionExtractor[DataType]):
__uri_regex = re.compile(
r"^https?://(www\.)?youtube\.com/(channel/|playlist\?list=)(?P<id>[^/&?]+)"
r"""^
https?://
((
www
|
m
)\.)?youtube\.com/(
channel/
playlist\?list=
)
(?P<id>[^/&?]+)
""",
re.VERBOSE,
@classmethod
@ -65,7 +65,11 @@ class YoutubeMediaExtractor(MediaExtractor[YoutubeVideoData]):
https?://(
(www\.)?youtube(-nocookie)?\.com/(
)\.)?youtube(-nocookie)?\.com/(
watch\?v=
embed/