public static IEnumerable <VideoInfo> GetDownloadUrls(string videoUrl, bool decryptSignature = true)
        {
            if (videoUrl == null)
            {
                throw new ArgumentNullException(nameof(videoUrl));
            }

            // GetAllVideos normalizes the URL as of libvideo v0.4.1,
            // don't call TryNormalizeYoutubeUrl here.

            return(Service.GetAllVideos(videoUrl).Select(v => new VideoInfo(v)));
        }
Exemple #2
0
        public static IEnumerable <VideoInfo> GetDownloadUrls(string videoUrl, bool decryptSignature = true)
        {
            if (videoUrl == null)
            {
                throw new ArgumentNullException(nameof(videoUrl));
            }

            if (!TryNormalizeYoutubeUrl(videoUrl, out videoUrl))
            {
                throw new ArgumentException("URL is not a valid youtube URL!");
            }

            return(Service.GetAllVideos(videoUrl).Select(v => new VideoInfo(v)));
        }