Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dynax60
Created September 27, 2017 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dynax60/41886b9a68e51eddb10f3d009fc759bb to your computer and use it in GitHub Desktop.
Save dynax60/41886b9a68e51eddb10f3d009fc759bb to your computer and use it in GitHub Desktop.
import json, requests
r = requests.get('http://ifconfig.co/json')
data = json.loads(r.content)
print("")
for key, val in data.items():
if key in ['ip_decimal', 'hostname']:
continue
print("{0}: {1}".format(key, val))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment