Web Page Parsing - Wp8 - Htmlagilitypack
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',
Solution 1:
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();
Post a Comment for "Web Page Parsing - Wp8 - Htmlagilitypack"