Created
May 20, 2013 22:01
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re, urllib, xbmcgui | |
f = urllib.urlopen("http://admin:[email protected]/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