Skip to content

Instantly share code, notes, and snippets.

@ispedals
Created May 20, 2013 22:01
Show Gist options
  • Save ispedals/5615945 to your computer and use it in GitHub Desktop.
Save ispedals/5615945 to your computer and use it in GitHub Desktop.
XBMC for Xbox script for reading the signal strength of the wireless bridge
import re, urllib, xbmcgui
f = urllib.urlopen("http://admin:password@192.168.0.201/status.htm")
data=f.read()
f.close()
try:
strength=re.search('<td width="10%">(\d+%)<\/td>',data).group(1)
dialog = xbmcgui.Dialog()
ok = dialog.ok('Signal Strength', 'Signal Strength: %s'%strength)
except AttributeError:
dialog = xbmcgui.Dialog()
ok = dialog.ok('Signal Strength', 'Signal Strength failed')
print data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment