import requests
import json


result = requests.get('http://ip-api.com/json')

# print(result.text)
# print(result.status_code)

data = json.loads(result.text)

print('Response status code:', result.status_code)
print('Country:', data['country'])
print('IP:', data['query'])

ip = data['query']
print('IP numbers:', ip.split('.'))

9ff7e005caeeaf1b23a4115c3e716ac70a1043d7
<mask token>

<mask token>
print('Response status code:', result.status_code)
print('Country:', data['country'])
print('IP:', data['query'])
<mask token>
print('IP numbers:', ip.split('.'))

<mask token>
result = requests.get('http://ip-api.com/json')
data = json.loads(result.text)
print('Response status code:', result.status_code)
print('Country:', data['country'])
print('IP:', data['query'])
ip = data['query']
print('IP numbers:', ip.split('.'))

import requests
import json
result = requests.get('http://ip-api.com/json')
data = json.loads(result.text)
print('Response status code:', result.status_code)
print('Country:', data['country'])
print('IP:', data['query'])
ip = data['query']
print('IP numbers:', ip.split('.'))

import requests
import json


result = requests.get('http://ip-api.com/json')

# print(result.text)
# print(result.status_code)

data = json.loads(result.text)

print('Response status code:', result.status_code)
print('Country:', data['country'])
print('IP:', data['query'])

ip = data['query']
print('IP numbers:', ip.split('.'))
