mardi 27 mars 2018

How to use HtmlAgilityPack to get specific data from stock website

I want to extract the number data from site, link https://www.vndirect.com.vn/portal/bao-cao-ket-qua-kinh-doanh/vjc.shtml

the number in below yellow highlight image:

enter image description here

The yellow number I want to extract so I write code C#:

var html = @"https://www.vndirect.com.vn/portal/bao-cao-ket-qua-kinh-doanh/vjc.shtml";
        HtmlWeb web = new HtmlWeb();
        web.UserAgent = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36";
        var htmlDoc = web.Load(html);
        var node = htmlDoc.DocumentNode.SelectSingleNode("//*[@id='Listed_IncomeStatement_tableResult']/tbody/tr[1]/td[2]");
        string strSo = node.OuterHtml;

        Console.WriteLine(strSo);

but in strSo I cannot find the yellow number (19,749,872). Could you show me the way to extract the number in that website??? Sorry I write English not well.

Thanks a lot




Aucun commentaire:

Enregistrer un commentaire