Created
January 6, 2022 17:58
-
-
Save idcesares/7be87c345af1f7f317a1c8e9b1ccd60d to your computer and use it in GitHub Desktop.
fund out what's your IP Address using Python and ipinfo.io
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
from urllib.request import urlopen | |
import json | |
import pprint | |
url = 'https://ipinfo.io/json' | |
result = urlopen(url) | |
data = json.load(result) | |
pprint.pprint(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment