Ali Tor
Ali Tor

Reputation: 2985

Youtube audio uri exception using VideoLibrary (libvideo)

I have a code to extract audio url using VideoLibrary. But Video.Uri throws an exception.

An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set.

I can't understand why this happens. How can I solve this problem?

YouTube yt = YouTube.Default;
string link = "https://www.youtube.com/watch?v=QNJL6nfu__Q";
foreach (var item in yt.GetAllVideos(link))
{
   if (item.AdaptiveKind == AdaptiveKind.Audio)
      Console.WriteLine(item.Uri);
}

Upvotes: 4

Views: 1064

Answers (1)

OverMars
OverMars

Reputation: 1049

The VideoLibrary is outdated. Use the Nefarius-VideoLibrary instead

Upvotes: 1

Related Questions