Web Page Parsing - WP8 - HTMLAgilityPack

c# html html-agility-pack parsing windows-phone-8

Question

I am actually trying to parse the content of this webpage, http://www.cryptocoincharts.info/v2/coins/show/tips

In particular I'd need to get the numbers, like "Current Difficulty", "Mined coins till now" etc

I am not actually sure how to do that, I actually located the section where my numbers are, yet I am not able to write the code to actually get those numbers out :(

enter image description here

Thanks in advance for any help!

EDIT: This is the code I have so far:

protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string htmlPage = "";
            using (var client = new HttpClient())
            {
                try
                {
                    htmlPage = await client.GetStringAsync("http://www.cryptocoincharts.info/v2/coins/show/tips");
                }
                catch (HttpRequestException exc) { }
            }

        HtmlDocument htmlDocument = new HtmlDocument();
        htmlDocument.LoadHtml(htmlPage);

Accepted Answer

HttpClient client = new HttpClient();
var doc = new HtmlAgilityPack.HtmlDocument();
var html = await client.GetStringAsync("http://www.cryptocoincharts.info/v2/coins/show/tips");
doc.LoadHtml(html);

var result = doc.DocumentNode.SelectSingleNode("//table[@class='table table-striped']")
                .Descendants("tr")
                .Skip(1)
                .Select(tr => new
                {
                    Desc = tr.SelectSingleNode("td[1]").InnerText,
                    Val = WebUtility.HtmlDecode(tr.SelectSingleNode("td[2]").InnerText)
                })
                .ToList();



Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why