Sorry for my English. I try to get HTML content from this page https://www.scoreboard.com/game/berankis-ricardas-king-kevin-2018/WC4oWAqE/#h2h;all. In result my code return HTML which doesn't have time to loading.
static string GetHtml(string site)
{
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(site);
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
using (StreamReader stream = new StreamReader(
resp.GetResponseStream(), Encoding.UTF8))
{
return stream.ReadToEnd();
}
}
For example I want to get innerHTML from id="tab-match-head-2-head", because this block loads after few second, I can't get content from there.
How can I wait while all content will be loaded and then GetResponse this? It's like a window.onload
in js but from other site. I really have no idea how to do this, please help.