Reading date from webpage

c# html-agility-pack

Question

I am trying to read some data from a webpage and this exception keeps getting thrown on every xpath I try.

This is what Im trying to pull from, and I just mainly want the 1

<tr>
    <td class="td_queue" style="border: none;">Support</td>
    <td class="td_totals" style="border: none;" id="support"><span id="changeMe0" class="new">1</span>/4/60</td>
</tr>

The xpath to that is //*[@id="support"] or //*[@id="changeMe0"] specifically and the div container is /html/body/div/div[2]/div[1]/div[1]/div

            HtmlWeb web = new HtmlWeb();
            HtmlDocument doc = web.Load(Url);

            string result = doc.DocumentNode.SelectNodes("//*[@id='support']")[0].InnerHtml;

I also tried InnerText as well, and that didn't work either.

1
0
8/11/2018 3:09:33 AM

Popular Answer

This is resolved.

For anyone wondering what I did, although completely different it worked for what I wanted to do. I ended up just finding the JSON with the raw data in which I scraped the entire page, and split all the data into an array and used RegEx to print out the results I want.

0
8/10/2018 10:12:24 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