某DJ音乐网MP4文件下载器-第2版

1次阅读
没有评论

发现有几个坛友说程序报错的,请先看一下原帖:1374014【C#】某DJ音乐网MP4文件下载器 - 『原创发布区』 - 116博客破解 - LCG - LSG |安卓破解|病毒分析|
还有,文件下载到C盘了,不在D盘了,因为我电脑重做系统后只有一个C盘了。
放一个开源软件,可将MP4转MP3,下载地址:https://file-converter.org/download.html

码了好多字,可能由于附带了一个MP4转MP3的工具,被版主删帖了。懒得码字了,简单写写。

DJ下载软件地址:https://pan.baidu.com/s/1RTJep_sPxBtZ9gIJyaPWlg?pwd=52pj

主要代码:
[C#] 纯文本查看 复制代码

private void ThreadProcSafePost()
{
if (this.ucDataGridView1.SelectRows.Count < 1)
{
FrmDialog.ShowDialog(this, "请选择至少一条记录!", "提示", false, true, false, true, null);
return;
}
foreach (IDataGridViewRow dataGridViewRow in this.ucDataGridView1.SelectRows)
{
string title = ((SongObj)dataGridViewRow.DataSource).Title;
string href = ((SongObj)dataGridViewRow.DataSource).Href;
this.driver.Navigate().GoToUrl(href);
string address;
try
{
address = ((IJavaScriptExecutor)this.driver).ExecuteScript("return playurl2", Array.Empty<object>()).ToString();
}
catch
{
address = "http:" + ((IJavaScriptExecutor)this.driver).ExecuteScript("return playurl", Array.Empty<object>()).ToString();
}
string text2 = "C:\\" + title;
if (!File.Exists(text2))
{
if (address.Contains("m3u8"))
{
using (Process process = new Process())
{
process.StartInfo.UseShellExecute = false;
process.StartInfo.FileName = Application.StartupPath + "\\ffmpeg.exe";
process.StartInfo.CreateNoWindow = true;
process.StartInfo.Arguments = string.Concat(new string[]
{
" -i \"",
address,
"\" -vcodec copy -acodec copy -absf aac_adtstoasc \"",
text2,
"\""
});
process.Start();
process.WaitForExit();
goto IL_1B8;
}
goto IL_1AA;
}
goto IL_1AA;
IL_1B8:
(from x in this.lstSource
where x.Title == title && x.Href == href
select x).ToList<SongObj>()[0].State = "1";
goto IL_212;
IL_1AA:
new WebClient().DownloadFile(address, text2);
goto IL_1B8;
}
(from x in this.lstSource
where x.Title == title && x.Href == href
select x).ToList<SongObj>()[0].State = "2";
IL_212:
this.m_SyncContext.Post(new SendOrPostCallback(this.SetDataGridViewSafePost), null);
}
}

正文完
 0
116博客
版权声明:本篇文章由 116博客 于2024-11-27发表,共计1754字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码