-1
私はyoutubeからYoutubeExtractorを使用してオーディオをダウンロードしようとしていますが、ボタンをクリックすると「シーケンスに要素がありません」という情報があります。どのように私はそれを解決することができます?youtubeからオーディオをダウンロードするC#
private void button2_Click(object sender, EventArgs e)
{
try
{
IEnumerable<VideoInfo> videos = DownloadUrlResolver.GetDownloadUrls(textBox1.Text);
VideoInfo video = videos.Where(info => info.CanExtractAudio).OrderByDescending(info => info.AudioBitrate).First();
if (video.RequiresDecryption)
{
DownloadUrlResolver.DecryptDownloadUrl(video);
}
AudioDownloader download = new AudioDownloader(video, Path.Combine(Application.StartupPath + "\\", video.Title + video.AudioExtension));
download.Execute();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
YoutubeExtractorのオーディオ抽出機能は現在のところ、Flashビデオでしか動作しないことはご存知ですか? – Jim