Created
May 7, 2014 20:00
-
-
Save tjmichael81/5fb2db28a61035339a19 to your computer and use it in GitHub Desktop.
Get public IP address with Python
This file contains 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 urllib | |
import json | |
conn = urllib.urlopen('http://httpbin.org/ip') | |
print json.load(conn)['origin'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment