Skip to content

Update get_ip_info.py #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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}")