-
-
Save xhimanshuz/16d6b18ca2c2eaaca9693d54720f0e91 to your computer and use it in GitHub Desktop.
Get public IP with Python & Requests
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 requests | |
r = requests.get(r'http://jsonip.com') | |
ip= r.json()['ip'] | |
print 'Your IP is', ip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment