get value from website

Hello! I really need some help. I need to get a value from a website. the website is and I need to get the value from

<span id="donations">8470.71</span>

which is shown as:

any way or method possible is fine by me, (even converting it all to a string and then doing some un-optimized witchcraft) but a really important part of my game depends on that value. I’m also not the direct owner of the website so I can’t edit anything (however I am allowed to use it, so don’t worry about any legal issues, etc)

If possible, I’d really appreciate any help to be in C#

thanks in advance for any help, everyone!

Use the WWW class to grab the web page, then search for the string you’re interested in and parse out the value.

There’s a number of ways you could parse the html. Your best bet would be to use something built-in to .NET to convert it to an object model, or some library to do that. Or you could parse it manually…

Here is some really crappy code to do it… some would argue that you should use regular expressions or something.

string input = "blah blah blah<blah><span id=\"donations\">8470.71</span></blah>";

string search = "<span id=\"donations\">";
int p = input.IndexOf(search);
if (p >= 0)
    // move forward to the value
    int start = p + search.Length;

    // now find the end by searching for the next closing tag starting at the start position, 
    // limiting the forward search to the max value length
    int end = input.IndexOf("</span>", start); 

    if (end >= 0)
        // pull out the substring
        string v = input.Substring(start, end - start);

        // finally parse into a float
        float value = float.Parse(v);

        Debug.Log("Value = " + value);
        Debug.Log("Bad html - closing tag not found");
    Debug.Log("donations span not found");

Hello! I really need some help. I need to get value from a website. the website is Sawgrass Virtuoso SG800 Sublimation Printer Review & Guide and I need to get the value from