Scraping data using HTMLAgilityPack

c# html-agility-pack html-parsing web-scraping

Question

How to get information from a website using HTMLAgilityPack that is not included in the inner HTML approach. For instance, if the following link:

https://www.theice.com/productguide/ProductSpec.shtml?specId=1496#expiry

The table with the contract sign at the top does not appear in the innerhtmltext. Please explain to me how to get this table's data using HTMLAgilityPack.

Regards

1
0
7/21/2012 9:44:44 PM

Popular Answer

Please use this XPath to get the desired table.//*[@id="right"]/div/table

e.g.

HtmlNode node = doc.DocumentNode.SelectSingleNode("//*[@id="right"]/div/table"));
string html = node.InnerHtml;
0
7/21/2012 10:21:06 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow