Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chapter-1/geolocation/get_ip_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
ip_address = None

# access token for ipinfo.io, pur yours here
access_token = '09d8c3fe6f8ed9'
access_token = '7119254625:AAFwPseUa3d0kJIFTUX_Q5ApiqO5QWnKeMY'
# create a client object with the access token
handler = ipinfo.getHandler(access_token)
# get the ip info
details = handler.getDetails(ip_address)
# print the ip info
for key, value in details.all.items():
print(f"{key}: {value}")
print(f"{key}: {value}")