View Single Post
Old 10th February 2017, 08:44   #2
sqgl
Senior Member
 
sqgl's Avatar
 
Join Date: Sep 2008
Location: Australia
Posts: 188
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.

Remixing listener requests of ambient tracks live http://RePlayScape.com
sqgl is offline   Reply With Quote