Instantly share code, notes, and snippets.

@Signez /update_status.py Secret
Created Sep 29, 2014

Embed
What would you like to do?
def updateStatus(self):
# ... (so many frenglish code I can't read anymore)
numauditeurs = 0
hosts = ['live.synopslive.net:8000'] #, 'neomat.relay.synopslive.net:8000', 'bardyl.relay.synopslive.net:8000',
# 'bawaaaaah.relay.synopslive.net:8000']
for host in hosts:
for line in urllib2.urlopen('http://' + host + '/status3.xsl'):
try:
numauditeurs += int(line.split(":")[1].rstrip().rstrip(';'))
except:
pass
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment