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ş

indirme butonunda hata alıyorum bakabilirmisiniz?
Burak :
İndirme linkinde sorun yok. Antivirüs kurulu ise bilgisayarında o engel oluyor olabilir.Antivirüsü devre dışı bırak öyle indir.
@admin
programın indirme butonunda sorun var. Değer beklenen aralıkta değil.hatası alıyorum indir dediğim zaman.
programın indirme butonunda sorun var. Değer beklenen aralıkta değil.hatası alıyorum indir dediğim zaman.
Hasan eryilmaz :
İndirme linkinde sorun yok.Şimdi yine denedim sorun yok indiriyor.Sizin işletim sistemi , tarayıcı ile ilgili bir sorun veya bilgisayarınızda virüs olabilir.
sorunum hala devam ediyor temiz format attım.
ekteki resim de hatayı görebilirsiniz…
http://i63.tinypic.com/wtc28x.png
http://i67.tinypic.com/16jom7r.png