Jump to content

Http Download


korasoglu
 Share

Recommended Posts

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 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 by korasoglu
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...