c# - how to download file from web, windows store app -
What I'm trying to do is to look for html for html to go to this loop. Once it takes up # once it takes the href URL before the # href. And then load the file with that url before #. Now do everything till downloading the code below. How do I download files from URL now? The following is the code that I will download the file, but it is in a console application .. How do I get it? The way I usually was doing is with whom In the case of a simple HTML file, you can download a string - just call ... then you should be able to load it with something like Public Async Zero Songs () {var messageDialog = New Message Diagnosis ("1"); Wait for the message Delog. ShowSync (); // WebClient var HTMLweb = new HtmlWeb () instead use HAP's HtmlWeb; // HTML is loading from the HTML HTML API Account.PhilDocument doc = new HtmlAgilityPack.HtmlDocument (); doc = await htmlweb.LoadFromWebAsync ("http://www.dubstep.net/track/5439"); Int i = 0; & Lt; String & gt; List = new list & lt; String & gt; (); // All `& lt; Use the LINQ API to select the link = doc.DocumentNode with a & gt; `link 'href. Username and self (" A "). Where (o = & gt; ogatevite value ("href", empty)! = Null); Foreign (HtmlNode link in link) {HtmlAttribute href = link.Attributes ["href"]; If (href! = Null) {list.Add (href.Value); I ++; If (href.Value == "#") {int t = i - 2; Uri test = new Uri (list [T]); (Test) start; }}}}
public static zero start (URI t) {string fileName1 = "t", myStringWebResource = null; // Create a new WebClient instance (WebClient myWebClient = New WebClient ()) using {myWebClient.DownloadFileCompleted + = DownloadCompleted; MyWebClient.DownloadProgressChanged + = myWebClient_DownloadProgressChanged; MyWebClient.DownloadFileAsync (t, "file.mp3"); }}
string HTML string = Get new HTTP client (). GetStringAsync (uri);
htmlDocument.Load (htmlString);
Comments
Post a Comment