Scraping data using HTMLAgilityPack

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

Question

In HTMLAgailityPack, how to get the data from the website which is not coming in the innerhtml method of it. For example, if in the link below:

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

The table starting with contract symbol is not coming in the innerhtmltext. Please let me know how to get this table data through HTMLAgailityPack?

Regards

Popular Answer

Pleae use this XPath to get that table you want //*[@id="right"]/div/table

e.g.

HtmlNode node = doc.DocumentNode.SelectSingleNode("//*[@id="right"]/div/table"));
string html = node.InnerHtml;



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