Hi i have problem to get data with this site
http://cdn.tsetmc.com/Loader.aspx?ParTree=15131P&i=57875847776839336&d=20170606
In this website we have a lot of data what i need to get is tagged by "//script[contains(text(), 'BestLimitData')]"
and "var IntraTradeData"
what is the vb code to get these data ?
the code in C# is :
string tsetmcUrl = "http://cdn.tsetmc.com/Loader.aspx? ParTree=15131P&i=57875847776839336&d=20170606"
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(tsetmcUrl);
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
request.AutomaticDecompression = DecompressionMethods.GZip;
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("UTF-8")).ReadToEnd();
//parse the values out of HTML
var htmlPack = new HtmlAgilityPack.HtmlDocument();
htmlPack.LoadHtml(responseString);
var results = htmlPack.DocumentNode.SelectSingleNode("//script[contains(text(), 'BestLimitData')]").InnerHtml;
var allResults = htmlPack.DocumentNode.SelectSingleNode("//script[contains(text(), 'ClosingPriceData')]").InnerHtml.Split(';');
var results = allResults.FirstOrDefault(x=>x.Contains("IntraTradeData"));
http://cdn.tsetmc.com/Loader.aspx?ParTree=15131P&i=57875847776839336&d=20170606
In this website we have a lot of data what i need to get is tagged by "//script[contains(text(), 'BestLimitData')]"
and "var IntraTradeData"
what is the vb code to get these data ?
the code in C# is :
string tsetmcUrl = "http://cdn.tsetmc.com/Loader.aspx? ParTree=15131P&i=57875847776839336&d=20170606"
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(tsetmcUrl);
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
request.AutomaticDecompression = DecompressionMethods.GZip;
var response = (HttpWebResponse)request.GetResponse();
var responseString = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("UTF-8")).ReadToEnd();
//parse the values out of HTML
var htmlPack = new HtmlAgilityPack.HtmlDocument();
htmlPack.LoadHtml(responseString);
var results = htmlPack.DocumentNode.SelectSingleNode("//script[contains(text(), 'BestLimitData')]").InnerHtml;
var allResults = htmlPack.DocumentNode.SelectSingleNode("//script[contains(text(), 'ClosingPriceData')]").InnerHtml.Split(';');
var results = allResults.FirstOrDefault(x=>x.Contains("IntraTradeData"));