Don't know about Python but in Linux i am executing the following within a shell script:
code:
export listener_count_single_digit=`lynx -dump http://replayscape.serverroom.us:4286 | grep "listeners" | sed 's/.*\([0-9]\) of 50 listeners.*/\1/'`
export listener_count_double_digit=`lynx -dump http://replayscape.serverroom.us:4286 | grep "listeners" | sed 's/.*\([0-9][0-9]\) of 50 listeners.*/\1/'`
Just now I had to brush up on sed syntax to
understand the trailing \1 at the end of each of those two lines.