I have code to extract audio url using VideoLibrary. But Video.Uri throws an exception.
Invalid request URI provided. The request URI must either be an absolute URI, or BaseAddress must be set.
I do not understand why this is happening. 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);
}
source
share