I found online a simple Neopets login but now I'm trying to obtain the value between the HTML element NP.
Here's the code:
WebClient client = new WebClient(); string html = client.DownloadString("http://www.neopets.com/index.phtml"); // This will store the whole website source code as a string var NP = Regex.Matches(html, @"<a id='npanchor' href=' / inventory.phtml'>(.+)</a>"); // This is the line that's not working Console.WriteLine(NP); // This prints "System.Text.RegularExpressions.MatchCollections instead the NP amount
I have no clue what I'm doing wrong. I've already checked and the string "html" stores the proper website source code.