You need to make a HTTP request to the website and then parse the HTML source by identifying unique flags around the variable score.
Sam152
2009-07-03 08:51:37
You need to make a HTTP request to the website and then parse the HTML source by identifying unique flags around the variable score.
Hi!
You can send an http request and parse the output html to retrieve the value. Otherwise you can try to find out, if MetaCritic has a webservice itself, what I think is reasonable because Steam includes MetaCritic scores too.
Best Regards
Oliver Hanappi
Use the HttpWebRequest class to open the site, then search the returned Response for the specific HTML element , probably using something like
responsestring.IndexOf("class=\"scoreelemementclass\"")
For the HTTP request side of things, WebClient
is probably the easiest.
For a simple, blocking HTTP request, do this:
string page = (new WebClient()).DownloadString("http://foo.bar/page");