Skip to content

Instantly share code, notes, and snippets.

@packetchef
Created December 22, 2016 15:04
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 packetchef/38525b1fbcadcaa3389b576ee531fc97 to your computer and use it in GitHub Desktop.
Save packetchef/38525b1fbcadcaa3389b576ee531fc97 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import urllib2
import simplejson as json
url = 'http://ipinfo.io/json'
ipinfo = urllib2.urlopen(url).read()
jIP = json.loads(ipinfo)
print jIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment