korasoglu Posted June 15, 2015 Share Posted June 15, 2015 (edited) Arkadaşlar ben webden sayfa kodlarını indirmek istiyorum download yapamayınca takıldım yardım ederseniz sevinirim. string gelen = Clipboard.GetText(); yazi.Text = gelen.Substring(0, (gelen.Length - 11)); string son = gelen.Substring(gelen.Length-11,11); finis.Text = son; string bir = "http://www.youtube.com/oembed?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D"; string iki = "&format=xml"; WebClient WebClient = new WebClient(); WebClient.DownloadFile(bir + finis + iki,@"c:\myfile.txt");//dosya indirmeyle bunun arasındaki fark nasıldır download gerçekleşirse C:\Users\dell\AppData\Local\Temp ifadesini genel nasıl yazarız. c# bu değerleri nasıl alıyoruz yani xml olayı XML.Load(_TempFolder .. "\\Indirelim.xml"); title = XML.GetValue("oembed/title"); Düzenleme : Ben veriyi çektim fakat türkçe karakter sıkıntısı oldu: Uri url = new Uri("http://www.larende.com/"); WebClient client = new WebClient(); string html = client.DownloadString(url); HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); doc.LoadHtml(html); lblIP.Text = doc.DocumentNode.SelectSingleNode("/html/body/div[2]/div[4]/div[2]/div[2]").InnerText; Edited June 16, 2015 by korasoglu Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.