问题
I'm trying to make a bot, how can I read the value like the 1800 / 1800 from a website?

Console.WriteLine("Health: ")
Console.WriteLine("Energy: ")
Console.WriteLine("Cash: ")
Console.WriteLine("Level: ")
I'm making a console application, trying to get the value. Like if the health is lower then 1000/1800 then it's going to execute a send key. Like send the key "0" to the website.
Thanks, Prince
回答1:
trying using WebClient.DownloadString
http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadstring(v=vs.110).aspx
WebClient client = new WebClient ();
string reply = client.DownloadString ("http://google.com");
you then parse the document for the things you want. you can use the HTML Agility pack for that
http://html-agility-pack.net
来源:https://stackoverflow.com/questions/21766408/how-can-i-read-from-a-website-c-sharp