diff --git a/plugins/tools/youtube/youtube.go b/plugins/tools/youtube/youtube.go index a852ce0e..ea0f6609 100644 --- a/plugins/tools/youtube/youtube.go +++ b/plugins/tools/youtube/youtube.go @@ -60,7 +60,7 @@ func (o *YouTube) GetVideoOrPlaylistId(url string) (videoId string, playlistId s // Video ID pattern //https:((youtu.be/7qZl_5xHoBw - videoPattern := `(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})` + videoPattern := `(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|(?:s(?:horts)\/)|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})` videoRe := regexp.MustCompile(videoPattern) videoMatch := videoRe.FindStringSubmatch(url) if len(videoMatch) > 1 {