I am scraping data using HTMLAGILITY Pack, but the page doesn't load properly.
I need that my code should wait until the page is fully loaded.
There is some kind of work around to use browser in form, but I don't need to use that in form.
Here is the Link I need to scrap and following is my code.
HtmlWeb web = new HtmlWeb();
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
HtmlAgilityPack.HtmlDocument doc = web.Load(website);
var goldTypes = doc.DocumentNode.SelectNodes("//h2[@class='gold-box-title']").ToList();
var goldPrices = doc.DocumentNode.SelectNodes("//span[@class='gold-box-price--sale'").ToList();
for (int i = 0; i < 2; i++)
{
string goldPrice = goldPrices[i].InnerText;
string goldType = goldTypes[i].InnerText;
}