I'm not really a developer and only just coded during university and for fun. I'm currently working on a small project involved in web scraping with c# and I can't seem to download the HTML code from the website I want, see code below.
private asynch void GetHTML1()
{
//Crownbet
string crownbet_url = "https://crownbet.com.au/sports-betting/australian-rules/afl/afl-matches/";
HttpClient crownbet_httpClient = new HttpClient();
var crownbet_html = await crownbet_httpClient.GetStringAsync(crownbet_url).Result;
HtmlAgilityPack.HtmlDocument crownbet_htmlDocument = new HtmlAgilityPack.HtmlDocument();
crownbet_htmlDocument.LoadHtml(crownbet_html);
}
When I run this code I get the following error.
Exception thrown:
'System.Net.WebException' in System.dll An unhandled exception of type 'System.Net.WebException' occurred in System.dll The remote server returned an error: (429) Calm down.
I'm not too sure what's wrong here because I've used this method to grab HTML code from other websites and it seems to work fine. Status 429 is usually given when you send too many requests to a website right?