Youtube audio uri exception using VideoLibrary (libvideo)

953 views Asked by At

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);
}
1

There are 1 answers

0
OverMars On

The VideoLibrary is outdated. Use the Nefarius-VideoLibrary instead