private void buttonDL_Click(object sender, EventArgs e) { string[] lines = Regex.Split(textBoxAV.Text, "\r\n|\r|\n"); Log.Info("获取所有视频信息"); listb.Clear(); foreach (string s in lines) { if (s != "") { BiliInterfaceInfo info = BiliInterface.GetFlvInfo(s); if (info.flvurl != null) { listb.Add(info); } } } Log.Info("所有视频信息获取完成"); Log.Info("开始批量下载"); timer1.Stop(); try { tsd.Stop(); //tsd.Progressbar = null; } catch { } //verticalProgressBar1.Maximum = 100; DlNext(); //Log.Info("批量下载完成"); }
private void buttonDLold_Click(object sender, EventArgs e) { string[] lines = Regex.Split(textBoxAV.Text, "\r\n|\r|\n"); tsd.Progressbar = verticalProgressBar1; Log.Info("获取所有视频信息"); listb.Clear(); foreach (string s in lines) { if (s != "") { BiliInterfaceInfo info = BiliInterface.GetFlvInfo(s); if (info.flvurl != null) { listb.Add(info); //Log.Info("正在下载视频 - " + info.AVNUM); //tsd = new TSDownload("http://www.bilibilijj.com/DownLoad/Cid/" + info.cid, System.Environment.CurrentDirectory + @"\video\" + info.AVNUM + ".flv"); //tsd.Progressbar = progressBar1; //tsd.Start(); } } } Log.Info("所有视频信息获取完成"); Log.Info("开始批量下载"); if (downloader != null && downloader.Status == DownloadStatus.Downloading) { downloader.Cancel(); } timer1.Enabled = true; DlNextST(); }
public void GetFlvInfoTest() { BiliInterfaceInfo info = new BiliInterfaceInfo(); //info = BiliInterface.GetFlvInfo("av3153761"); //TestContext.WriteLine(info.flvurl); //Debug.WriteLine(info.flvurl); info = BiliInterface.GetFlvInfo("av9472850"); Assert.IsTrue(info.flvurl.Contains(".flv")); }