Skip to content

Instantly share code, notes, and snippets.

@idcesares
Created January 6, 2022 17:58
Show Gist options
  • Save idcesares/7be87c345af1f7f317a1c8e9b1ccd60d to your computer and use it in GitHub Desktop.
Save idcesares/7be87c345af1f7f317a1c8e9b1ccd60d to your computer and use it in GitHub Desktop.
fund out what's your IP Address using Python and ipinfo.io
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