Skip to content

Instantly share code, notes, and snippets.

@sixstringsg
Created July 25, 2018 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sixstringsg/5c6f71d5465feef2e49e801752933f9d to your computer and use it in GitHub Desktop.
Save sixstringsg/5c6f71d5465feef2e49e801752933f9d to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import json
import requests
# Note: Change localhost to the correct IP if needed.
r = requests.get('http://10.22.22.154/admin/api.php')
rstats = json.loads(r.text)
stats = {}
for x in rstats:
stats[x] = float(rstats[x].replace(',', ''))
print json.dumps(stats)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment