There are some HTML parsing libraries in some languages but really it's trivially easy to write your own sufficiently good algorithm to play the game.
Edit:
One easy way to do it might be Greasemonkey (or some old version of Greasemonkey if they've locked down the security a bit). This is what I did for some infamous stunt I pulled.
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177