YouTube Mp3 Dönüştürücü — C#

YouTube Mp3 Dönüştürücü — C#

[code lang=”csharp”]

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;//www.gorselprogramlama.com

using System.Linq;

using System.Text;

using System.Windows.Forms;

namespace youtube_downloader

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void Form1_Load(object sender, EventArgs e)

{

wb1.Navigate("www.youtube-mp3.org");//www.gorselprogramlama.com

}

private void btnConvert_Click(object sender, EventArgs e)

{

string url = txtUrl.Text; // url

wb1.Document.GetElementById("youtube-url").InnerText = url; // url doldur

wb1.Document.GetElementById("submit").InvokeMember("Click"); // Video dönüştür.

tmrKontrol.Enabled = true;

}

private void btnDownload_Click(object sender, EventArgs e)

{

string adres;

string html;

html = wb1.Document.GetElementById("dl_link").InnerHtml;// download butonu html kodu

adres = html.Replace("<A href=\"", String.Empty);

adres = adres.Replace("\"><B>Download</B></A> · <A onclick=\"showLinkBox(); return false;\" href=\"http://www.youtube-mp3.org/#\">Bu mp3 ‘ü link ettir</A>", String.Empty);

wb1.Navigate(adres);

tmrKontrol.Enabled = false;//www.gorselprogramlama.com

btnDownload.Enabled = false;

}

private void tmrKontrol_Tick(object sender, EventArgs e)

{

string baslik,sure,status;

baslik = wb1.Document.GetElementById("title").InnerText;

sure = wb1.Document.GetElementById("length").InnerText;

status = wb1.Document.GetElementById("status_text").InnerText;

lblBaslik.Text = baslik;

lblSure.Text = sure;

lblStatus.Text = status;

if (status == "Video başarıyla mp3 ‘e çevrildi")

btnDownload.Enabled = true;

else

btnDownload.Enabled = false;

//www.gorselprogramlama.com

}

private void wb1_Navigated(object sender, WebBrowserNavigatedEventArgs e)

{

btnConvert.Enabled = true;

}//www.gorselprogramlama.com

}

}

[/code]

Ümit Demirtaş

Projeyi İNDİR

Yorumlar 6

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir